agentleFS
JovancodingJovancoding/Network-AI/AGENTS.md

Network-AI

AGENTS.md91 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 code style.

    Of the AGENTS.md files we read, the 33,398 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.

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
  1. Distinctive:

    No new runtime dependencies without explicit approval

    line 61
  2. Distinctive:

    Keep adapter files self-contained — no cross-adapter imports

    line 63
  3. Common:

    No hardcoded secrets, keys, or credentials anywhere

    line 69

≈ “Common” is an estimate: at least 1 in 5 of the 43,423 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.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
AGENTS.md

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
npm run typecheck              # 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 tests

All 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 exports
  • security.ts — SecureTokenManager, InputSanitizer, RateLimiter, DataEncryptor, SecureAuditLogger
  • lib/locked-blackboard.ts — LockedBlackboard: atomic propose → validate → commit with file-system mutex
  • lib/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 calls
  • lib/mcp-elicitation.ts — MCP elicitation channel: native in-client approval prompts
  • lib/a2a-server.ts — A2AServer: expose the orchestrator as a Google A2A agent
  • lib/asi/ — ASI Strict Mode (opt-in ASI_STRICT_MODE=audit|enforce): proof-gated actions, BFT consensus, auditor receipts, kill switch
  • lib/perpetual/ — Perpetual Runtime (opt-in): operator-signed leases + dead-man switch, egress proxy, guarded paths, sandbox runner, sentry swarm, self-improvement pipeline, verified snapshots, budget balancer (network-ai perpetual CLI)
  • adapters/ — 32 framework adapters (LangChain, AutoGen, CrewAI, MCP, Gemini, OpenAI Responses, Claude Agent SDK, etc.)
  • bin/cli.ts — CLI entry point (npx -y network-ai@6.0.1)
  • bin/mcp-server.ts — MCP server (stdio + SSE transports)
  • types/ — TypeScript declaration files
  • data/ — 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 BaseAdapter and 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 any types — use proper generics or unknown
  • 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 -y -p network-ai@6.0.1 network-ai-server --stdio        # stdio (Claude Code, Codex, Gemini CLI, Cursor)
npx -y -p network-ai@6.0.1 network-ai-server --port 3001    # SSE/HTTP

Tools: 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).

Download now (ZIP)

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
What did you use it for? e.g. Reviewing pull requests in a Rails app

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.