Network 标志

Network

社区
Jovancoding

Traffic light for AI Agents and TypeScript/Node multi-agent orchestrator with shared state, guardrails, and adapters for 32 AI frameworks

发布者Jovancoding
代码仓库Network-AI
语言TypeScript
复刻数
12
星标数
76
可用工具
0
传输类型stdio
分类
许可协议MIT
链接
  • 将工具接入 AI 工作流

    Network 提供 MCP 功能,可供兼容的 AI 客户端和智能体使用。

  • 0 个可用工具

    浏览下方可调用的操作;如果服务器提供了名称和描述,也会一并显示。

  • 可直接复制的配置

    使用安装配置片段,在您首选的 MCP 客户端中配置此服务器。

  • 开源社区热度

    关联的代码仓库有 76 个 Star 和 12 个 Fork。

Network-AI

TypeScript/Node.js multi-agent orchestrator — shared state, guardrails, budgets, and cross-framework coordination

Website CI CodeQL Release npm Tests Adapters License Socket Node.js TypeScript ClawHub Integration Guide Sponsor Discord Glama

Network-AI is a TypeScript/Node.js multi-agent orchestrator that adds coordination, guardrails, and governance to any AI agent stack.

  • Shared blackboard with locking — atomic propose → validate → commit prevents race conditions and split-brain failures across parallel agents
  • Guardrails and budgets — FSM governance, per-agent token ceilings, HMAC / Ed25519 audit trails, and permission gating
  • Context signal-over-noise (v5.15) — ContextComposer assembles token-budgeted, relevance-ranked context packs (semantic/lexical × recency decay × scope affinity, position-aware layout); context_pack + blackboard_search MCP tools let agents pull curated state instead of dumping the whole board into their window
  • 32 adapters — LangChain (+ streaming), AutoGen, CrewAI, OpenAI Assistants, OpenAI Responses (Assistants successor), LlamaIndex, Semantic Kernel, Haystack, DSPy, Agno, MCP, Custom (+ streaming), OpenClaw, A2A, Codex, MiniMax, NemoClaw, APS, Copilot, LangGraph, Anthropic Computer Use, Claude Agent SDK (agentic loops), OpenAI Agents SDK, Vertex AI, Gemini (Developer API), Pydantic AI, Browser Agent, Hermes (NousResearch Hermes / any OpenAI-compatible endpoint), Orchestrator (hierarchical multi-orchestrator), and RLM (Recursive Language Model / any RLM-compatible HTTP endpoint) — no glue code, no lock-in
  • Persistent project memory (Layer 3) — context_manager.py injects decisions, goals, stack, milestones, and banned patterns into every system prompt so agents always have full project context
  • v5.0 modules — Agent VCR (record/replay), comparison runner, coverage reporter, goal DSL, approval inbox, job queue, gRPC/HTTP transport, playground REPL, adapter test harness, and more
  • Model-interaction lifecycle governance (v5.13) — GovernedModelGateway absorbs the model refusal → fallback → billing chain (cross-model fallback, fallback-credit repricing, effort governance, thinking-block handoff) behind one governed, budgeted, audited call

The silent failure mode in multi-agent systems: parallel agents writing to the same key use last-write-wins by default — one agent's result silently overwrites another's mid-flight. The outcome is split-brain state: double-spends, contradictory decisions, corrupted context, no error thrown. Network-AI's propose → validate → commit mutex prevents this at the coordination layer, before any write reaches shared state.

Use Network-AI as:

  • A TypeScript/Node.js library — import { createSwarmOrchestrator } from 'network-ai'
  • An MCP server — npx network-ai-server --port 3001
  • A CLI — network-ai bb get status / network-ai audit tail
  • A Claude Code plugin — /plugin install network-ai@network-ai
  • A Gemini CLI extension — gemini extensions install https://github.com/Jovancoding/Network-AI
  • An OpenClaw skill — clawhub install network-ai

5-minute quickstart →  |  Architecture →  |  All adapters →  |  Benchmarks →


🛡️ Model-Interaction Lifecycle Governance

Most governance tools stop at the agent boundary — they police which tools an agent may call before it acts. Network-AI also governs the layer underneath: how an agent talks to the model. When a frontier model declines a request with a classifier refusal, Network-AI absorbs the refusal → fallback → billing chain and presents one governed, budgeted, audited call.

  • GovernedModelGateway — detect stop_reason:"refusal", audit which classifier fired, route to a fallback model, and redeem the fallback-credit token so the retry is repriced as a cache read.
  • ModelBudget — per-model USD accounting with fallback-credit repricing; never sums tokens across models.
  • RefusalTelemetry — a refusal is an HTTP 200, invisible to error-rate monitoring; emitted as a discrete non-error signal with an unservedRefusalCount gap to alert on.
  • EffortPolicy — turn the effort cost dial into a policy object: cap sub-agents at low, require justification for xhigh/max.
  • ThinkingBlockManager — keep thinking blocks unchanged on the same model; strip them on a cross-model fallback; guard prompts against reasoning_extraction refusals.
  • Per-sub-agent fallback — FanOutFanIn steps and TeamRunner tasks each carry their own fallback agent and per-request retry budget (RetryBudget), because a turn can refuse independently across an agent and its sub-agents.
typescript
import { AnthropicMessagesAdapter, ModelBudget, RefusalTelemetry } from 'network-ai';

const adapter = new AnthropicMessagesAdapter();
await adapter.initialize({});
adapter.registerModelAgent('analyst', {
  client,                              // bring your own Anthropic client
  model: 'claude-fable-5',
  fallbackModels: ['claude-opus-4-8'], // classifier refusals fall through here
  budget: new ModelBudget({
    ceilingUsd: 5,
    pricing: {
      'claude-fable-5': { inputPerMTok: 10, outputPerMTok: 50 },
      'claude-opus-4-8': { inputPerMTok: 5, outputPerMTok: 25 },
    },
  }),
  telemetry: new RefusalTelemetry(),
});
const result = await adapter.executeAgent('analyst', { action: 'Summarize Q3 results', params: {} }, { agentId: 'cli' });
// result.data: { servedModel, servedByFallback, refused, refusalCategories, attempts, totalCostUsd }

OWASP Agentic AI Top 10 (2026) — engine coverage

Verify programmatically with verifyOwaspCoverage() (exported from network-ai):

RiskStatusPrimary control
ASI-01 Agent Goal Hijack✅ CoveredAuthGuardian gating + JourneyFSM control plane
ASI-02 Tool Misuse & Exploitation✅ CoveredAgentRuntime SandboxPolicy + ApprovalGate
ASI-03 Identity & Privilege Abuse✅ CoveredHMAC / Ed25519 signed tokens + trust scoring
ASI-04 Supply Chain Risks✅ Covered1 runtime dep + socket / clawhub / codeql gates
ASI-05 Unsafe Code Execution✅ CoveredShellExecutor shell:false argv + path guards
ASI-06 Memory & Context Poisoning✅ CoveredLockedBlackboard + injection detection
ASI-07 Insecure Inter-Agent Comms🟡 PartialFS-mutex + signed handoffs (local-trust boundary)
ASI-08 Cascading Failures✅ CoveredCircuitBreaker + budgets + RetryBudget
ASI-09 Human-Agent Trust Exploitation✅ CoveredApprovalGate + tamper-evident audit trail
ASI-10 Rogue Agents✅ CoveredComplianceMonitor + circuit-breaker kill switch

⚡ Try in 60 Seconds

bash
npm install network-ai
typescript
import { LockedBlackboard } from 'network-ai';

const board = new LockedBlackboard('.');
const id    = board.propose('status', { ready: true }, 'agent-1');
board.validate(id, 'agent-1');
board.commit(id);

console.log(board.read('status'));  // { ready: true }

Two agents, atomic writes, no race conditions. That's it.

Want the full stress test? No API key, ~3 seconds:

bash
npx ts-node examples/08-control-plane-stress-demo.ts

Runs priority preemption, AuthGuardian permission gating, FSM governance, and compliance monitoring — all without a single LLM call.

If it saves you from a race condition, a ⭐ helps others find it.


What's Included

✅ Atomic shared statepropose → validate → commit with filesystem mutex — no split-brain
✅ Token budgetsHard per-agent ceilings with live spend tracking
✅ Permission gatingHMAC / Ed25519-signed tokens, scoped per agent and resource
✅ Append-only audit logEvery write, grant, and transition signed and logged
✅ 32 framework adaptersLangChain, CrewAI, AutoGen, MCP, Codex, Gemini, APS, RLM, and 24 more — zero lock-in
✅ FSM governanceHard-stop agents at state boundaries, timeout enforcement
✅ Compliance monitoringReal-time violation detection (tool abuse, turn-taking, timeouts)
✅ Claim verificationTier 1 agent honesty — outcome-bound signed receipts, manifest reconciliation, trust decay for liars
✅ QA orchestrationScenario replay, feedback loops, regression tracking, contradiction detection
✅ Deferred adapter initLazy-load adapters on first use — zero startup cost for unused frameworks
✅ Hook middlewarebeforeExecute / afterExecute / onError hooks on any adapter call
✅ Flow controlPause / resume / throttle writes on the blackboard
✅ Skill compositionchain() / batch() / loop() / verify() meta-operations over agent calls
✅ Semantic memory searchBYOE vector store with cosine similarity over blackboard data
✅ Phase pipelineMulti-phase workflows with human-in-the-loop approval gates; approvalTimeoutMs fail-closed timeout prevents indefinite hangs
✅ Confidence filteringMulti-agent result scoring, threshold validation, and consensus aggregation
✅ Matcher-based hooksGlob patterns on agent/action/tool for targeted hook filtering
✅ Fan-out / fan-inParallel agent spawning with pluggable aggregation strategies
✅ Agent runtime sandboxSandboxed shell execution with policy enforcement and approval gates
✅ Interactive consoleTUI dashboard for live monitoring, agent control, blackboard/budget/FSM management
✅ Pipe modeJSON stdin/stdout protocol for programmatic AI-to-orchestrator control
✅ Strategy agentMeta-orchestrator with elastic agent pools, workload partitioning, and adaptive scaling
✅ Goal decomposerLLM-powered goal → task DAG → parallel execution with runTeam() one-liner
✅ Context ThrottlerPrune blackboard keys per agent scope before LLM calls — prevent context pollution
✅ Partition PlannerAssign non-overlapping focus areas to agents before DAG execution — no redundant research
✅ Coverage GateRecursive refinement loop — re-run decomposer for gaps until coverage score ≥ threshold
✅ Route ClassifierShort-circuit routing — classify goals as factual lookup vs. complex synthesis before planning
✅ Goal DSLYAML/JSON goal definitions with cycle detection and topological compilation
✅ Agent VCRRecord and replay LLM/agent interactions for deterministic tests
✅ Comparison runnerSide-by-side adapter comparison with scoring, timing, cost analysis
✅ Coverage reporterV8 coverage collection with threshold enforcement
✅ Job queuePersistent priority FIFO with retries, crash recovery, pluggable backends
✅ Approval inboxWeb-accessible approval queue with REST API and SSE streaming
✅ TTL auto-evictionpurgeExpired() on-demand eviction; startSweep(intervalMs) / stopSweep() background timer (unref'd, default 60 s)
✅ WAL crash recoveryLockedBlackboard Write-Ahead Log survives process crashes; replayWAL() replays uncommitted ops on restart; compactWAL() for manual truncation
✅ Circuit BreakerAdapterRegistry per-adapter CLOSED/OPEN/HALF_OPEN state machine; fallbackChain for automatic failover; CircuitOpenError; zero added dependencies
✅ OTel telemetry hooksITelemetryProvider BYOT abstraction — NullTelemetryProvider, CapturingTelemetryProvider, createOtelHooks() factory; plug in any OTel SDK without modifying adapters
✅ Transport layerJSON-RPC 2.0 over HTTP with HMAC auth, TTL, node allowlisting
✅ Playground REPLInteractive sandbox with mock agents for rapid prototyping
✅ Adapter test harnessParameterized test battery for any adapter implementation
✅ IAuthValidatorInterface to decouple authorization from concrete AuthGuardian
✅ Kill switchnetwork-ai pause / resume — SYSTEM_PAUSED sentinel; doctor self-diagnostics; inspect <key> metadata + audit trail
✅ Minimal mode--minimal / NETWORK_AI_MINIMAL=1 — skips WAL replay and sweep for fast CI/test startup
✅ TypeScript nativeES2022 strict mode, zero native dependencies

Why teams use Network-AI

ProblemHow Network-AI solves it
Race conditions in parallel agentsAtomic blackboard: propose → validate → commit with file-system mutex
Agent overspend / runaway costsFederatedBudget — hard per-agent token ceilings with live spend tracking
No visibility into what agents didHMAC / Ed25519-signed audit log on every write, permission grant, and FSM transition
Locked into one AI framework32 adapters — mix LangChain + AutoGen + CrewAI + Codex + Gemini + MiniMax + NemoClaw + APS + LangGraph + Vertex AI + Hermes + RLM + custom in one swarm
Agents escalating beyond their scopeAuthGuardian — scoped permission tokens required before sensitive operations
Agents lack project context between runsProjectContextManager (Layer 3) — inject decisions, goals, stack, and milestones into every system prompt
No regression tracking on agent output qualityQAOrchestratorAgent — scenario replay, feedback loops, cross-agent contradiction detection, historical trend tracking

Architecture

FederatedBudget is a standalone export — instantiate it separately and optionally wire it to a blackboard backend for cross-node token budget enforcement.

ProjectContextManager is a Layer-3 Python helper (scripts/context_manager.py) that injects persistent project goals, decisions, and milestones into agent system prompts — see ARCHITECTURE.md § Layer 3.

→ Full architecture, FSM journey, and handoff protocol


Install

bash
npm install network-ai

No native dependencies, no build step. Adapters are dependency-free (BYOC — bring your own client).


Use as MCP Server

Start the server (no config required, zero dependencies):

bash
npx network-ai-server --port 3001
# or from source:
npx ts-node bin/mcp-server.ts --port 3001

Then wire any MCP-compatible client to it.

Claude Desktop — add to ~/Library/Application Support/Claude/claude_desktop_config.json (macOS) or %APPDATA%\Claude\claude_desktop_config.json (Windows):

json
{
  "mcpServers": {
    "network-ai": {
      "url": "http://localhost:3001/sse"
    }
  }
}

Cursor / Cline / any SSE-based MCP client — point to the same URL:

json
{
  "mcpServers": {
    "network-ai": {
      "url": "http://localhost:3001/sse"
    }
  }
}

Verify it's running:

bash
curl http://localhost:3001/health   # { "status": "ok", "tools": <n>, "uptime": <ms> }
curl http://localhost:3001/tools    # full tool list

Tools exposed over MCP:

  • blackboard_read / blackboard_write / blackboard_list / blackboard_delete / blackboard_exists
  • context_pack — token-budgeted, relevance-ranked context brief for a task (use instead of dumping the whole board into your window)
  • blackboard_search — ranked top-K search over blackboard entries (semantic when an embedder is wired, lexical otherwise)
  • budget_status / budget_spend / budget_reset — federated token tracking
  • token_create / token_validate / token_revoke — HMAC / Ed25519-signed permission tokens
  • audit_query — query the append-only audit log
  • config_get / config_set — live orchestrator configuration
  • agent_list / agent_spawn / agent_stop — agent lifecycle
  • fsm_transition — write FSM state transitions to the blackboard

Each tool takes an agent_id parameter — all writes are identity-verified and namespace-scoped, exactly as they are in the TypeScript API.

Options: --no-budget, --no-token, --no-control, --ceiling <n>, --board <name>, --audit-log <path>.


Use as a Claude Code Plugin

Network-AI ships as a Claude Code plugin — the MCP server wires in automatically, so every tool listed above becomes available inside Claude Code with no manual config.

Install from the self-hosted marketplace (zero approval needed):

bash
/plugin marketplace add Jovancoding/Network-AI
/plugin install network-ai@network-ai

That's it — blackboard_read, budget_status, audit_query, token_create, and the rest load as native Claude Code tools. Under the hood the plugin runs npx -y -p network-ai network-ai-server --stdio (stdio MCP transport), so it always uses the published npm package.

The repo root carries the standard plugin layout:

FileRole
.claude-plugin/plugin.jsonPlugin manifest
.mcp.jsonRegisters the Network-AI MCP server (stdio)
.claude-plugin/marketplace.jsonSelf-hosted marketplace catalog
commands/Slash commands — /network-ai:status, /network-ai:budget, /network-ai:audit, /network-ai:blackboard

Validate the manifests locally with claude plugin validate ..

Gate Claude Code itself with AuthGuardian (hooks). Every tool call Claude Code makes — shell commands, file edits, web fetches — can be audited and permission-gated through the same weighted scoring (justification 40%, trust 30%, risk 30%) Network-AI applies to swarm agents:

jsonc
// .claude/settings.json — see examples/claude-code-hooks.json for the full config
{
  "hooks": {
    "PreToolUse": [{
      "matcher": "Bash|Write|Edit|WebFetch",
      "hooks": [{ "type": "command",
                  "command": "npx -y -p network-ai network-ai hook pre-tool-use --mode enforce" }]
    }]
  }
}

--mode observe (default) audits every call to data/hooks_audit.jsonl without blocking; --mode enforce maps tools to resource types (Bash → SHELL_EXEC, Write/Edit → FILE_SYSTEM, WebFetch → EXTERNAL_SERVICE) and requires an AuthGuardian grant — denied calls escalate to you as an interactive prompt. --deny "rm -rf" patterns hard-block regardless of mode.


Use with OpenAI Codex

Network-AI also runs as an OpenAI Codex MCP server — in both the Codex CLI and the IDE extension. The same tools that load in Claude Code become available in Codex.

Add it with one command (uses the published npm package):

bash
codex mcp add network-ai -- npx -y -p network-ai network-ai-server --stdio

In the Codex TUI, run /mcp to confirm network-ai is connected.

Or scope it to a project — the repo root ships a .codex/config.toml so any trusted checkout picks the server up automatically. To register it globally instead, drop the same block into ~/.codex/config.toml:

toml
[mcp_servers.network-ai]
command = "npx"
args = ["-y", "-p", "network-ai", "network-ai-server", "--stdio"]

Either route exposes the full tool set (blackboard_read, budget_status, audit_query, token_create, …) over stdio MCP — no API keys, no running server to manage.


Use with Gemini CLI

Network-AI ships as a Gemini CLI extension — the repo root carries gemini-extension.json, which wires in the stdio MCP server and a GEMINI.md context file automatically:

bash
gemini extensions install https://github.com/Jovancoding/Network-AI

Or register just the MCP server directly:

bash
gemini mcp add network-ai npx -- -y -p network-ai network-ai-server --stdio

Run /mcp inside Gemini CLI to confirm the network-ai tools are loaded. For building Gemini-powered swarm agents, use the GeminiAdapter (Gemini Developer API / AI Studio) or VertexAIAdapter (Vertex AI on GCP) — and for Google's Agent2Agent ecosystem, A2AServer exposes this orchestrator as a discoverable A2A agent:

typescript
import { A2AServer } from 'network-ai';

const a2a = new A2AServer({
  name: 'Network-AI Orchestrator',
  secret: process.env.A2A_SECRET,
  executor: async (text) => ({ text: await runSwarmTask(text) }),
});
a2a.startServer(4310); // serves /.well-known/agent.json + tasks/send

CLI

Control Network-AI directly from the terminal — no server required. The CLI imports the same core engine used by the MCP server.

bash
# One-off commands (no server needed)
npx ts-node bin/cli.ts bb set status running --agent cli
npx ts-node bin/cli.ts bb get status
npx ts-node bin/cli.ts bb snapshot

# After npm install -g network-ai:
network-ai bb list
network-ai audit tail          # live-stream the audit log
network-ai auth token my-bot --resource blackboard
Command groupWhat it controls
network-ai bbBlackboard — get, set, delete, list, snapshot, propose, commit, abort
network-ai authAuthGuardian — issue tokens (--why for scoring breakdown), revoke, check permissions
network-ai budgetFederatedBudget — spend status, set ceiling
network-ai auditAudit log — print, live-tail, clear
network-ai envEnvironment management — init, list, chain, diff, promote, backup, restore
network-ai doctorSelf-diagnostics — validate data dir, env routing, audit log, WAL, kill-switch, MCP secret
network-ai inspect <key>Inspect a blackboard key — value, metadata, pending history, audit trail
network-ai pause / resumeKill switch — write/remove SYSTEM_PAUSED sentinel

Global flags on every command: --data <path> (data directory, default ./data) · --env <name> (environment) · --json (machine-readable output) · --minimal (skip WAL replay + sweep — CI/test fast startup)

→ Full reference in QUICKSTART.md § CLI


Two agents, one shared state — without race conditions

The real differentiator is coordination. Here is what no single-framework solution handles: two agents writing to the same resource concurrently, atomically, without corrupting each other.

typescript
import { LockedBlackboard, CustomAdapter, createSwarmOrchestrator } from 'network-ai';

const board   = new LockedBlackboard('.');
const adapter = new CustomAdapter();

// Agent 1: writes its analysis result atomically
adapter.registerHandler('analyst', async () => {
  const id = board.propose('report:status', { phase: 'analysis', complete: true }, 'analyst');
  board.validate(id, 'analyst');
  board.commit(id);                           // file-system mutex — no race condition possible
  return { result: 'analysis written' };
});

// Agent 2: runs concurrently, writes to its own key safely
adapter.registerHandler('reviewer', async () => {
  const id = board.propose('report:review', { approved: true }, 'reviewer');
  board.validate(id, 'reviewer');
  board.commit(id);
  const analysis = board.read('report:status');
  return { result: `reviewed phase=${analysis?.phase}` };
});

createSwarmOrchestrator({ adapters: [{ adapter }] });

// Both fire concurrently — mutex guarantees no write is ever lost
const [, ] = await Promise.all([
  adapter.executeAgent('analyst',  { action: 'run', params: {} }, { agentId: 'analyst' }),
  adapter.executeAgent('reviewer', { action: 'run', params: {} }, { agentId: 'reviewer' }),
]);

console.log(board.read('report:status'));   // { phase: 'analysis', complete: true }
console.log(board.read('report:review'));   // { approved: true }

Add budgets, permissions, and cross-framework agents with the same pattern. → QUICKSTART.md


Demo — Control-Plane Stress Test (no API key)

Runs in ~3 seconds. Proves the coordination primitives without any LLM calls.

bash
npm run demo -- --08

What it shows: atomic blackboard locking, priority preemption (priority-3 wins over priority-0 on same key), AuthGuardian permission gate (blocked → justified → granted with token), FSM hard-stop at 700 ms, live compliance violation capture (TOOL_ABUSE, TURN_TAKING, RESPONSE_TIMEOUT, JOURNEY_TIMEOUT), and FederatedBudget tracking — all without a single API call.

Control Plane Demo

8-agent AI pipeline (requires OPENAI_API_KEY — builds a Payment Processing Service end-to-end):

bash
npm run demo -- --07

Code Review Swarm Demo

NemoClaw sandbox swarm (no API key) — 3 agents in isolated NVIDIA NemoClaw sandboxes with deny-by-default network policies:

bash
npx ts-node examples/10-nemoclaw-sandbox-swarm.ts

NemoClaw Sandbox Demo


Adapter System

32 adapters, zero adapter dependencies. You bring your own SDK objects.

AdapterFramework / ProtocolRegister method
CustomAdapterAny function or HTTP endpointregisterHandler(name, fn)
LangChainAdapterLangChainregisterAgent(name, runnable)
AutoGenAdapterAutoGen / AG2registerAgent(name, agent)
CrewAIAdapterCrewAIregisterAgent or registerCrew
MCPAdapterModel Context ProtocolregisterTool(name, handler)
LlamaIndexAdapterLlamaIndexregisterQueryEngine(), registerChatEngine()
SemanticKernelAdapterMicrosoft Semantic KernelregisterKernel(), registerFunction()
OpenAIAssistantsAdapterOpenAI AssistantsregisterAssistant(name, config)
HaystackAdapterdeepset HaystackregisterPipeline(), registerAgent()
DSPyAdapterStanford DSPyregisterModule(), registerProgram()
AgnoAdapterAgno (formerly Phidata)registerAgent(), registerTeam()
OpenClawAdapterOpenClawregisterSkill(name, skillRef)
A2AAdapterGoogle A2A ProtocolregisterRemoteAgent(name, url)
CodexAdapterOpenAI Codex / gpt-4o / Codex CLIregisterCodexAgent(name, config)
MiniMaxAdapterMiniMax LLM API (M2.5 / M2.5-highspeed)registerAgent(name, config)
NemoClawAdapterNVIDIA NemoClaw (sandboxed agents via OpenShell)registerSandboxAgent(name, config)
APSAdapterAgent Permission Service (delegation-chain trust)apsDelegationToTrust(delegation)
CopilotAdapterGitHub Copilot (generate/review/explain/fix/test/refactor/chat)registerAgent(name, config)
LangGraphAdapterLangGraph (compiled StateGraph)registerGraph(name, graph)
AnthropicComputerUseAdapterAnthropic Computer Use (screenshot/click/type/scroll)registerAgent(name, config)
OpenAIAgentsAdapterOpenAI Agents SDK (tool use, handoffs, guardrails)registerAgent(name, runner)
VertexAIAdapterGoogle Vertex AI / Gemini (function calling, multi-modal)registerAgent(name, config)
PydanticAIAdapterPydantic AI (structured output, validation, deps injection)registerAgent(name, config)
BrowserAgentAdapterBrowser automation (Playwright/Puppeteer/CDP)registerAgent(name, driver)
HermesAdapterNousResearch Hermes / any OpenAI-compatible endpoint (Ollama, Together AI, Fireworks, llama.cpp)registerAgent(name, config)
OrchestratorAdapterHierarchical multi-orchestrator coordinationregisterOrchestrator(id, orchestrator)
RLMAdapterRecursive Language Model / any RLM-compatible HTTP endpoint (arxiv 2512.24601)registerAgent(name, config)

Streaming variants (drop-in replacements with .stream() support):

AdapterExtendsStreaming source
LangChainStreamingAdapterLangChainAdapterCalls .stream() on the Runnable if available; falls back to .invoke()
CustomStreamingAdapterCustomAdapterPipes AsyncIterable<string> handlers; falls back to single-chunk for plain Promises

Extend BaseAdapter (or StreamingBaseAdapter for streaming) to add your own in minutes. See references/adapter-system.md.


Works with LangGraph, CrewAI, and AutoGen

Network-AI is the coordination layer you add on top of your existing stack. Keep your LangChain chains, CrewAI crews, and AutoGen agents — and add shared state, governance, and budgets around them.

CapabilityNetwork-AILangGraphCrewAIAutoGen
Cross-framework agents in one swarm✅ 29 built-in adapters⚠️ Nodes can call any code; no adapter abstraction⚠️ Extensible via tools; CrewAI-native agents only⚠️ Extensible via plugins; AutoGen-native agents only
Atomic shared state (conflict-safe)✅ propose → validate → commit mutex⚠️ State passed between nodes; last-write-wins⚠️ Shared memory available; no conflict resolution⚠️ Shared context available; no conflict resolution
Hard token ceiling per agent✅ FederatedBudget (first-class API)⚠️ Via callbacks / custom middleware⚠️ Via callbacks / custom middleware⚠️ Built-in token tracking in v0.4+; no swarm-level ceiling
Permission gating before sensitive ops✅ AuthGuardian (built-in)⚠️ Possible via custom node logic⚠️ Possible via custom tools⚠️ Possible via custom middleware
Append-only audit log✅ plain JSONL (data/audit_log.jsonl)⚠️ Not built-in⚠️ Not built-in⚠️ Not built-in
Encryption at rest✅ AES-256-GCM (TypeScript layer)⚠️ Not built-in⚠️ Not built-in⚠️ Not built-in
LanguageTypeScript / Node.jsPythonPythonPython

Testing

bash
npm run test:all          # All suites in sequence
npm test                  # Core orchestrator
npm run test:security     # Security module
npm run test:adapters     # All 32 adapters
npm run test:streaming    # Streaming adapters
npm run test:a2a          # A2A protocol adapter
npm run test:codex        # Codex adapter
npm run test:priority     # Priority & preemption
npm run test:cli          # CLI layer
npm run test:phase9       # Agent runtime, console, strategy agent
npm run test:phase12      # Context Throttler, Partition Planner, Coverage Gate, Route Classifier

3,638 passing assertions across 41 test suites (npm run test:all):

SuiteAssertionsCovers
test-phase4.ts147FSM governance, compliance monitor, adapter integration
test-phase5f.ts127SSE transport, McpCombinedBridge, extended MCP tools
test-phase5g.ts121CRDT backend, vector clocks, bidirectional sync
test-phase6.ts129MCP server, control-plane tools, audit tools
test-adapters.ts271All 32 adapters, registry routing, integration, edge cases
test-phase5d.ts117Pluggable backend (Redis, CRDT, Memory)
test-standalone.ts88Blackboard, auth, integration, persistence, parallelisation, quality gate
test-phase5e.ts87Federated budget tracking
test-phase5c.ts73Named multi-blackboard, isolation, backend options
test-codex.ts51Codex adapter: chat, completion, CLI, BYOC client, error paths
test-minimax.ts50MiniMax adapter: lifecycle, registration, chat mode, temperature clamping
test-nemoclaw.ts93NemoClaw adapter: sandbox lifecycle, policies, blueprint, handoff, env forwarding
test-priority.ts64Priority preemption, conflict resolution, backward compat
test-a2a.ts35A2A protocol: register, execute, mock fetch, error paths
test-streaming.ts32Streaming adapters, chunk shapes, fallback, collectStream
test-phase5b.ts55Pluggable backend part 2, consistency levels
test-phase5.ts42Named multi-blackboard base
test-security.ts34Tokens, sanitization, rate limiting, encryption, audit
test-cli.ts65CLI layer: bb, auth, budget, audit commands
test-qa.ts67QA orchestrator: scenarios, feedback loop, regression, contradictions
test-phase7.ts94Deferred init, hook middleware, flow control, skill composer, semantic search
test-phase8.ts146Phase pipeline, confidence filter, matcher-based hooks, fan-out/fan-in
test-phase9.ts293Agent runtime, sandbox policy, shell executor, file accessor, approval gate, console UI, orchestrator wiring, pipe mode, strategy agent
test-phase10.ts153Goal decomposer, task DAG validation, topological layers, JSON parsing, team runner, concurrency, timeouts, events, runTeam one-liner, dependency injection, LLM planner
test-phase11.ts55TTL background sweep, WAL crash recovery, CircuitBreaker, ITelemetryProvider / OTel hooks
test-topology.ts304WorkTree, ControlPlane, dashboard server, topology visualization, WebSocket protocol
test-rlm-phases.ts123FederatedBudget child spending, blackboard metadata API, best-partial result, HookContext depth, sub-goal recursion, semaphore fan-out, PhasePipeline compaction, RLMAdapter end-to-end
test-phase12.ts65Context Throttler, Partition Planner, Coverage Gate, Route Classifier, EVALUATING FSM state, runTeam integration
test-env-manager.ts77Multi-environment isolation, promotion chain, backup/restore, source protection, NETWORK_AI_ENV, blackboard env routing
test-transport.ts117Basis transport tier: TransportAgent state machine, LandscapeAgent health tracking, AgentPool drain/pause, fleet coordination, canary, rollback
test-claim-verifier.ts50ClaimVerifier: receipt generation/tamper/expiry, corroborated/unsupported/undisclosed, trust decay/reset/DoS protection
test-phase13.ts58ESM dual-build config, McpStreamableServer dispatch + resources + prompts, PhasePipeline checkpoint/resume/clear, SemanticMemory save/load/autoSave/clearPersisted
test-phase14.ts52Model lifecycle governance: GovernedModelGateway refusal→fallback, ModelBudget credit repricing, RefusalTelemetry, Anthropic Messages adapter
test-phase15.ts32Orchestration resilience: RetryBudget, per-sub-agent fallback in FanOutFanIn + TeamRunner, EffortPolicy
test-phase16.ts21ThinkingBlockManager lifecycle + reasoning-extraction guard, OWASP Agentic Top 10 coverage matrix
test-phase17.ts13ApprovalInbox GHSA-m4jg-6w3q-gm86 fix: read-route auth gating, token validation, backward compatibility, CORS allowlist
test-phase18.ts85ClaudeHookBridge observe/enforce gating, MCP elicitation channel + fail-closed approval callback, A2AServer agent card / tasks / auth / eviction
test-phase19.ts78ContextComposer ranking/budget/pinning/staleness/layout, estimateTokens, context_pack + blackboard_search MCP tools (lexical + semantic modes)
test-phase20.ts35Security regressions: ClaudeHookBridge full-target deny/allow matching (GHSA-743h-jr5x-mpcr), SandboxPolicy canonicalized command matching (GHSA-9v4f-j8cv-fhxw)
test.ts39Core orchestrator smoke tests

Documentation

DocContents
QUICKSTART.mdInstallation, first run, CLI reference, PowerShell guide, Python scripts CLI
ARCHITECTURE.mdRace condition problem, FSM design, handoff protocol, model-interaction lifecycle governance, module inventory, project structure
BENCHMARKS.mdProvider performance, rate limits, local GPU, max_completion_tokens guide
SECURITY.mdSecurity module, permission system, trust levels, audit trail, OWASP Agentic Top 10 coverage, disclosure SLA, ClawHub scan findings
THREAT_MODEL.mdAdversary profiles, trust boundaries, explicit non-goals, security controls summary
DATA_LOCATIONS.mdEvery file Network-AI creates — path, purpose, data classification, operator responsibilities
SUPPLY_CHAIN.mdRuntime dependencies, what runs at install, network surface, SLSA/npm provenance verification
ENTERPRISE.mdEvaluation checklist, stability policy, security summary, integration entry points
AUDIT_LOG_SCHEMA.mdAudit log field reference, all event types (including model.refusal / model.attempt), scoring formula
ADOPTERS.mdKnown adopters — open a PR to add yourself
INTEGRATION_GUIDE.mdEnd-to-end integration walkthrough with v5.15 modules
SKILL.mdOpenClaw/ClawHub Python skill — setup, orchestrator protocol, OWASP engine coverage, security scan findings
AGENTS.mdCross-vendor agent instructions (Codex, Gemini CLI, Cursor, Factory) — build commands, conventions, architecture patterns
references/adapter-system.mdAdapter architecture, all 32 adapters (incl. AnthropicMessagesAdapter), writing custom adapters
references/auth-guardian.mdPermission scoring, resource types, scoreRequest(), IAuthValidator interface
references/trust-levels.mdTrust level configuration, APS delegation-chain mapping

Use with Claude, ChatGPT & Codex

Using Claude Code (the CLI)? See Use as a Claude Code Plugin — one command installs every tool.

Using OpenAI Codex (CLI or IDE)? See Use with OpenAI Codex — add the MCP server with a single codex mcp add.

Using Gemini CLI? See Use with Gemini CLI — install the extension with a single gemini extensions install.

Three integration files are included in the repo root:

FileUse
claude-tools.jsonClaude API tool use & OpenAI Codex — drop into the tools array
openapi.yamlCustom GPT Actions — import directly in the GPT editor
claude-project-prompt.mdClaude Projects — paste into Custom Instructions (includes lifecycle governance context)

Claude API / Codex:

js
import tools from './claude-tools.json' assert { type: 'json' };
// Pass tools array to anthropic.messages.create({ tools }) or OpenAI chat completions

Custom GPT Actions: In the GPT editor → Actions → Import from URL, or paste the contents of openapi.yaml. Set the server URL to your running npx network-ai-server --port 3001 instance.

Claude Projects: Copy the contents of claude-project-prompt.md (below the horizontal rule) into a Claude Project's Custom Instructions field. No server required for instruction-only mode.


Community

Join our Discord server to discuss multi-agent AI coordination, get help, and share what you're building:

Discord


Contributing

  1. Fork → feature branch → npm run test:all → pull request
  2. Bugs and feature requests via Issues

MIT License — LICENSE  ·  CHANGELOG  ·  CONTRIBUTING  ·  Code of Conduct  ·  Security Policy  ·  RSS

multi-agent · agent orchestration · AI agents · agentic AI · agentic workflow · TypeScript · Node.js · LangGraph · CrewAI · AutoGen · MCP · model-context-protocol · LlamaIndex · Semantic Kernel · OpenAI Assistants · Haystack · DSPy · Agno · OpenClaw · ClawHub · shared state · blackboard pattern · atomic commits · guardrails · token budgets · permission gating · audit trail · agent coordination · agent handoffs · governance · cost-awareness · refusal handling · fallback routing · model lifecycle · OWASP agentic AI · effort policy · thinking blocks

Download History

Download History

将 Network MCP 与多个 AI 模型配合使用

TypingMind 在工作区级别连接 MCP 工具,因此连接 Network 后,您就可以在 TypingMind 中搭配不同的 AI 模型使用,无需为每个模型单独设置。 此 MCP 通过您设备上的 TypingMind MCP 连接器在本地运行。

本地连接器设置指南

如果 MCP 服务器需要访问您电脑上的本地文件、应用或私有资源,请选择此方式。

1

打开 MCP 设置

在 TypingMind 中,依次前往“设置”、“高级设置”和“模型上下文协议”,然后选择“设置连接器”。

  1. 在您的浏览器中打开 TypingMind。
  2. 点击“设置”图标。
  3. 进入“高级设置”。
  4. 打开“模型上下文协议”部分。
  5. 点击“设置连接器”,然后选择“此设备”。
TypingMind MCP 连接器设置界面,已选择“此设备”
2

运行连接器命令

选择“此设备”,从 TypingMind 复制命令并在终端中运行。使用 MCP 时,请保持该进程运行。

  1. 复制 TypingMind 显示的设置命令。
  2. 在 macOS 上打开“终端”,或在 Windows 上打开 Windows Terminal。
  3. 粘贴并运行命令。
  4. 如果终端询问您是否继续,请确认安装软件包。
  5. 使用 MCP 工具时,请保持终端窗口及其中的进程运行。
3

将 Network 添加为服务器

当连接器状态为“就绪”时,点击“编辑服务器”,然后粘贴 MCP 服务器配置。

  1. 等待连接器状态显示为“就绪”。
  2. 点击“编辑服务器”。
  3. 粘贴 Network MCP 服务器配置。
  4. 保存服务器列表。
  5. 如需确认连接器是否仍处于就绪状态,请刷新。
TypingMind MCP 设置界面,显示正在运行的服务器和“编辑服务器”按钮
{
  "mcpServers": {
    "network-ai": {
      "command": "npx",
      "args": [
        "-y",
        "<mcp-server-package>"
      ]
    }
  }
}
4

在不同模型中使用同一连接

保存服务器列表,打开“插件”,启用 Network MCP 工具,然后在 TypingMind 中选择任意受支持的 AI 模型,即可在聊天中使用这些工具,或将其分配给智能体。

  1. 在 TypingMind 中打开“插件”页面。
  2. 启用 Network MCP 工具。
  3. 开始聊天并选择您想使用的 AI 模型。
  4. 在聊天中使用 MCP 工具,或将其分配给 AI 智能体。
  5. 根据需要随时切换到其他 AI 模型,无需重新连接 MCP。
在 TypingMind 聊天中使用已启用的 MCP 工具和选定的 AI 模型
您能使用 Network 帮我完成这项任务吗?
Network
当然。我已阅读。
以下是我使用 Network 得到的结果。

常见问题

Network MCP 服务器有什么用途?

Network 是一个 MCP 服务器,可让兼容的 AI 客户端连接外部工具并获取上下文。在 TypingMind 中,只需添加一次此 MCP 服务器,即可在您的 AI 工作区中使用其工具。

可以在 TypingMind 中让多个 AI 模型使用 Network MCP 吗?

可以。TypingMind 在工作区层面连接 MCP 工具,因此您可以让 Claude、ChatGPT、Gemini 等不同 AI 模型,或您在 TypingMind 中配置的其他模型使用 Network,而无需为每个模型单独配置 MCP 服务器。

为什么在 TypingMind 中使用 Network MCP?

TypingMind 将多个 AI 模型、提示词、插件、AI 智能体、API 密钥和 MCP 工具整合到同一个工作区中,是优秀的大语言模型聊天前端之一。连接 Network 后,您可以在偏好的不同模型中使用其 MCP 工具,同时在 TypingMind 中井然有序地管理聊天工作流程。

如何将 Network MCP 连接到 TypingMind?

Network 通过 TypingMind 本地 MCP 连接器运行。当 MCP 服务器需要访问您计算机上的本地文件、桌面应用、命令行工具或私有资源时,这种方式最合适。

Network MCP 在 TypingMind 中提供哪些工具?

Network 提供 MCP 功能,您可以在 TypingMind 的插件页面启用这些功能,然后在聊天中使用,或将其分配给 AI 智能体。

使用 Network MCP 需要向 TypingMind 提供我的 API 密钥吗?

不需要。TypingMind 采用本地优先的设计,让您自行掌控模型提供商、API 密钥、提示词和 MCP 配置。如果 Network 需要身份验证,请在创建连接时,为该 MCP 服务器添加所需的请求头、OAuth 设置或本地配置。

相关 MCP 服务器

查看全部

立即创建您自己的 AI 工作区

订阅我们的电子简报,获取新功能和后续赠奖活动的通知 👇