🎩 You're Invited:Meet the Socket team at Black Hat in Las Vegas, August 3-6.RSVP
Sign In

@blackms/aistack

Package Overview
Dependencies
Maintainers
1
Versions
19
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@blackms/aistack

Clean agent orchestration for Claude Code

Source
npmnpm
Version
1.2.0
Version published
Weekly downloads
57
1040%
Maintainers
1
Weekly downloads
 
Created
Source

aistack

Multi-Agent Orchestration for Claude Code

CI codecov npm version npm downloads License: MIT


Production-ready agent orchestration with persistent memory and MCP integration.


Get Started · Architecture · API Reference · Documentation


Why aistack?

Coordinate specialized AI agents through Claude Code with persistent context, hierarchical task management, and seamless extensibility.

7 agents · 30 MCP tools · 3 LLM providers · SQLite + FTS5 · Plugin system

Tech Stack

Node.js
Node.js 20+
TypeScript
TypeScript
SQLite
SQLite
Anthropic
Anthropic
OpenAI
OpenAI
Ollama
Ollama

Features

FeatureDescription
Specialized Agents7 built-in agent types: coder, researcher, tester, reviewer, architect, coordinator, analyst
Persistent MemorySQLite with FTS5 full-text search and optional vector embeddings
MCP Integration30 tools exposed via Model Context Protocol for Claude Code
Hierarchical CoordinationTask queue, message bus, and coordinator pattern
Multi-Provider SupportAnthropic, OpenAI, and Ollama with unified interface
Plugin SystemRuntime extensibility for agents, tools, hooks, and providers
Workflow EngineMulti-phase workflows with adversarial validation

Quick Start

Installation

npm install @blackms/aistack

Initialize & Connect

# Initialize project
npx @blackms/aistack init

# Add to Claude Code
claude mcp add aistack -- npx @blackms/aistack mcp start

# Verify installation
npx @blackms/aistack status

Configuration

Create aistack.config.json:

{
  "version": "1.0.0",
  "providers": {
    "default": "anthropic",
    "anthropic": { "apiKey": "${ANTHROPIC_API_KEY}" }
  },
  "memory": {
    "path": "./data/aistack.db",
    "vectorSearch": { "enabled": false }
  }
}

Architecture

graph TB
    subgraph "Claude Code"
        CC[Claude Code IDE]
    end

    subgraph "aistack"
        MCP["MCP Server<br/><small>stdio transport</small>"]

        subgraph Core["Core Services"]
            AM[Agent Manager]
            MM[Memory Manager]
            TQ[Task Queue]
            MB[Message Bus]
        end

        subgraph Agents["Agent Pool"]
            direction LR
            A1[Coder]
            A2[Tester]
            A3[Reviewer]
            A4[Architect]
            A5[Researcher]
            A6[Coordinator]
            A7[Analyst]
        end

        subgraph Storage["Persistence"]
            SQL[(SQLite)]
            FTS[FTS5 Index]
            VEC[Vector Store]
        end

        subgraph Providers["LLM Providers"]
            ANT[Anthropic]
            OAI[OpenAI]
            OLL[Ollama]
        end
    end

    CC <-->|"MCP Protocol"| MCP
    MCP --> AM & MM
    AM --> TQ --> MB
    MB --> A1 & A2 & A3 & A4 & A5 & A6 & A7
    MM --> SQL --> FTS & VEC
    AM -.-> ANT & OAI & OLL

Request Flow

sequenceDiagram
    participant CC as Claude Code
    participant MCP as MCP Server
    participant AM as Agent Manager
    participant MM as Memory
    participant DB as SQLite

    CC->>MCP: agent_spawn("coder")
    MCP->>AM: spawnAgent("coder")
    AM-->>MCP: SpawnedAgent
    MCP-->>CC: { id, type, status }

    CC->>MCP: memory_store(key, content)
    MCP->>MM: store(key, content)
    MM->>DB: INSERT/UPDATE
    DB-->>MM: MemoryEntry
    MM-->>MCP: { success: true }
    MCP-->>CC: { entry }

    CC->>MCP: memory_search(query)
    MCP->>MM: search(query)
    MM->>DB: FTS5 MATCH
    DB-->>MM: Results
    MM-->>MCP: SearchResults
    MCP-->>CC: { results }

Agents

AgentPurposeCapabilities
coderWrite and modify codewrite-code edit-code refactor debug implement-features
researcherGather informationsearch-code read-documentation analyze-patterns gather-requirements explore-codebase
testerTest and validatewrite-tests run-tests identify-edge-cases coverage-analysis test-debugging
reviewerQuality assurancecode-review security-review performance-review best-practices feedback
architectSystem designsystem-design technical-decisions architecture-review documentation trade-off-analysis
coordinatorOrchestrate worktask-decomposition agent-coordination progress-tracking result-synthesis workflow-management
analystData insightsdata-analysis performance-profiling metrics-collection trend-analysis reporting

MCP Tools

Agent Tools (6)

agent_spawn          agent_list           agent_stop
agent_status         agent_types          agent_update_status

Memory Tools (5)

memory_store         memory_search        memory_get
memory_list          memory_delete

Task Tools (5)

task_create          task_assign          task_complete
task_list            task_get

Session Tools (4)

session_start        session_end          session_status
session_active

System Tools (3)

system_status        system_health        system_config

GitHub Tools (7)

github_issue_create  github_issue_list    github_issue_get
github_pr_create     github_pr_list       github_pr_get
github_repo_info

Programmatic API

import {
  spawnAgent,
  getMemoryManager,
  startMCPServer,
  getConfig,
} from '@blackms/aistack';

// Spawn an agent
const agent = spawnAgent('coder', { name: 'my-coder' });

// Use memory with search
const memory = getMemoryManager(getConfig());
await memory.store('pattern', 'Use dependency injection', {
  namespace: 'architecture'
});
const results = await memory.search('injection');

// Start MCP server
const server = await startMCPServer(getConfig());

Submodule Imports

import { MemoryManager } from '@blackms/aistack/memory';
import { spawnAgent, listAgentTypes } from '@blackms/aistack/agents';
import { startMCPServer } from '@blackms/aistack/mcp';

Plugin System

Extend aistack with custom agents, tools, and hooks:

import type { AgentStackPlugin } from '@blackms/aistack';

export default {
  name: 'my-plugin',
  version: '1.0.0',

  agents: [{
    type: 'custom-agent',
    name: 'Custom Agent',
    description: 'Specialized behavior',
    systemPrompt: 'You are a custom agent...',
    capabilities: ['custom-task'],
  }],

  tools: [{
    name: 'custom_tool',
    description: 'A custom MCP tool',
    inputSchema: { type: 'object', properties: { input: { type: 'string' } } },
    handler: async (params) => ({ result: 'done' })
  }],

  async init(config) { /* setup */ },
  async cleanup() { /* teardown */ }
} satisfies AgentStackPlugin;

CLI Reference

CommandDescription
initInitialize project structure
agent spawn -t <type>Spawn agent
agent listList active agents
agent stop -n <name>Stop agent
agent typesShow available types
agent status -n <name>Get agent status
agent run -t <type> -p <prompt>Spawn and execute task
agent exec -n <name> -p <prompt>Execute task with existing agent
memory store -k <key> -c <content>Store entry
memory search -q <query>Search memory
memory listList entries
memory delete -k <key>Delete entry
mcp startStart MCP server
mcp toolsList MCP tools
workflow run <name>Run workflow
workflow listList workflows
statusSystem status

LLM Providers

API Providers

ProviderDefault ModelEmbeddings
Anthropicclaude-sonnet-4-20250514-
OpenAIgpt-4otext-embedding-3-small
Ollamallama3.2nomic-embed-text

CLI Providers

ProviderCLI ToolDefault Model
Claude Codeclaudesonnet
Gemini CLIgeminigemini-2.0-flash
Codexcodex-

CLI providers enable agent execution through external CLI tools, useful for interactive workflows.

Project Structure

src/
├── agents/         # Agent registry, spawner, definitions
├── cli/            # CLI commands
├── coordination/   # Task queue, message bus, topology
├── github/         # GitHub integration
├── hooks/          # Lifecycle hooks
├── mcp/            # MCP server and 30 tools
├── memory/         # SQLite, FTS5, vector search
├── plugins/        # Plugin loader and registry
├── providers/      # LLM provider implementations
├── workflows/      # Workflow engine
└── utils/          # Config, logger, validation

Development

npm install          # Install dependencies
npm run build        # Build
npm test             # Run tests
npm run test:coverage # With coverage
npm run typecheck    # Type check
npm run lint         # Lint

Roadmap

PriorityFeature
P1HTTP transport for MCP server
P1Streaming responses
P2Agent state persistence
P2Built-in workflow templates
P3Web dashboard
P3Metrics and observability

Roadmap items are planned features, not current capabilities.

Contributing

  • Fork the repository
  • Create a feature branch (git checkout -b feature/amazing)
  • Commit changes (git commit -m 'Add amazing feature')
  • Push to branch (git push origin feature/amazing)
  • Open a Pull Request

All PRs must pass CI (tests, lint, typecheck, build).

License

MIT © 2024

Documentation · Issues · Discussions

Built with TypeScript · Made for Claude Code

Keywords

agent

FAQs

Package last updated on 25 Jan 2026

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts