Network-AI
AGENTS.md78 starsChanged 7 months agoMITView on GitHub
Instructions for AI coding agents (OpenAI Codex, Gemini CLI, Cursor, Factory, and any other AGENTS.md-compatible tool) working in this repository. Claude Code users: see CLAUDE.md (same content, Claude-specific extras). Network-AI is a TypeScript/Node.js multi-agent orchestrator — shared state, guardrails, budgets, and cross-framework coordination. It ships as an npm package (network-ai), an MCP server, a CLI, a Claude Code plugin, a Gemini CLI extension, and an OpenClaw skill. All tests must pass before any commit. No test may be skipped or…
- Installs packages
Where files are headingNew AGENTS.md files have more rules about keeping secrets out of the code, and fewer about checking a change actually works.
Of the AGENTS.md files we read, the 11,773 first seen in the last six months, against the older ones: the kind of rule that gained most share, and the kind that lost most. About files like this in general, not this one, and an estimate, since a kind is a pattern in the words.
In this repository3 other files it gives its agents.
- CLAUDE.mdCLAUDE.md
- .github/copilot-instructions.mdCopilot instructions
- network-aiSkill
The file
We split this AGENTS.md into the rules it gives an agent
3 rules. About 1 is common, 2 are distinctive, and 0 are very specific to this project.
≈1
Common · estimate
Many files like this have a rule of this kind.
≈2
Distinctive · estimate
This author's own choices. Worth a look.
0
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Distinctive: line 59
No new runtime dependencies without explicit approval
- Distinctive: line 61
Keep adapter files self-contained — no cross-adapter imports
- Common: line 67
No hardcoded secrets, keys, or credentials anywhere
≈ “Common” is an estimate: at least 1 in 5 of the 16,595 AGENTS.md files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
AGENTS.md
Instructions for AI coding agents (OpenAI Codex, Gemini CLI, Cursor, Factory, and any other AGENTS.md-compatible tool) working in this repository. Claude Code users: see CLAUDE.md (same content, Claude-specific extras).
Project Overview
Network-AI is a TypeScript/Node.js multi-agent orchestrator — shared state,
guardrails, budgets, and cross-framework coordination. It ships as an npm
package (network-ai), an MCP server, a CLI, a Claude Code plugin, a Gemini
CLI extension, and an OpenClaw skill.
Build & Test Commands
npm install # Install dependencies
npx tsc --noEmit # Type-check (zero errors expected)
npm run test:all # Run the full test suite (all suites)
npm test # Core orchestrator tests only
npm run test:security # Security module tests
npm run test:adapters # All framework adapter tests
npm run test:cli # CLI layer testsAll tests must pass before any commit. No test may be skipped or marked .only.
Project Structure
index.ts— Core engine: SwarmOrchestrator, AuthGuardian, FederatedBudget, QualityGateAgent, all exportssecurity.ts— SecureTokenManager, InputSanitizer, RateLimiter, DataEncryptor, SecureAuditLoggerlib/locked-blackboard.ts— LockedBlackboard: atomic propose → validate → commit with file-system mutexlib/auth-guardian.ts— AuthGuardian: weighted permission scoring (justification 40%, trust 30%, risk 30%)lib/claude-hooks.ts— ClaudeHookBridge: AuthGuardian-backed permission gating for coding-agent tool callslib/mcp-elicitation.ts— MCP elicitation channel: native in-client approval promptslib/a2a-server.ts— A2AServer: expose the orchestrator as a Google A2A agentadapters/— 32 framework adapters (LangChain, AutoGen, CrewAI, MCP, Gemini, OpenAI Responses, Claude Agent SDK, etc.)bin/cli.ts— CLI entry point (npx network-ai)bin/mcp-server.ts— MCP server (stdio + SSE transports)types/— TypeScript declaration filesdata/— Runtime data (gitignored): audit log, pending changes
Key Architecture Patterns
- Blackboard pattern — all agent coordination goes through
LockedBlackboard(propose()→validate()→commit()). Never write shared state directly. - Permission gating —
AuthGuardian.requestPermission()before sensitive resource access. Grants are signed (HMAC-SHA256 / Ed25519) with TTL. - Adapter system — all adapters extend
BaseAdapterand are dependency-free (BYOC — bring your own client). No cross-adapter imports. - Audit trail — every write, grant, and state transition is logged to
data/audit_log.jsonl.
Code Conventions
- TypeScript strict mode, target ES2022
- No
anytypes — use proper generics orunknown - JSDoc on all exported functions and classes
- No new runtime dependencies without explicit approval
- Input validation on all public API entry points
- Keep adapter files self-contained — no cross-adapter imports
Security Requirements
- AES-256-GCM encryption for data at rest
- HMAC-SHA256 / Ed25519 signed tokens with TTL
- No hardcoded secrets, keys, or credentials anywhere
- Path traversal and injection protections on all file operations
- Rate limiting on public-facing endpoints
MCP Server
The repo exposes its tool suite over MCP (stdio and SSE):
npx network-ai-server --stdio # stdio (Claude Code, Codex, Gemini CLI, Cursor)
npx network-ai-server --port 3001 # SSE/HTTPTools: blackboard_read, blackboard_write, blackboard_list, budget_status,
budget_spend, token_create, token_validate, audit_query, agent_list,
agent_spawn, fsm_transition, and more.
Releasing
See RELEASING.md. Version files: package.json, skill.json, openapi.yaml,
README badge, CHANGELOG.md, plugin manifests (.claude-plugin/,
gemini-extension.json, server.json).
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

