Skip to main content

connector.json

Declarative specification for AI-to-AI orchestration. Where MCP defines how AI connects to tools, connector.json defines how AI coordinates with other AI.

What It Solves

Every AI CLI tool (Claude Code, Codex, Gemini CLI, Aider) runs in isolation. There is no standard way to:
  • Route tasks to different LLMs based on cost or capability
  • Run multiple AI sessions in parallel with isolated environments
  • Define multi-phase workflows across heterogeneous AI tools
  • Fail over to a different provider when one goes down
connector.json is that standard.

Spec Overview

Core Sections

session — Environment

How to set up each AI session. Maps to daemon-external plugins that transform PTY session configuration without modifying the terminal engine.

models — Routing

Which AI to use for which role. Named aliases that pipeline phases reference.
When primary is unavailable, the runtime falls back to fallback automatically. Cost-aware routing: cheap models for research, expensive models for implementation.

pipeline — Orchestration

Multi-phase workflow with parallel workers.
Each phase can override session settings. Workers in the same phase run in parallel. Phases execute sequentially. Results flow through scratchpad and mailbox. workers accepts either a number (N identical workers sharing the phase’s model) or an array of worker objects (each with its own model, prompt, machine).

Beyond Pipeline — Communication Topologies

Pipeline is one topology. connector.json supports all: See: Bidirectional Communication, Meeting Protocol, N-to-N Topology, Recursive Teams, Dimensional Growth.

Relationship to MCP

MCP is a field inside connector.json, not a competing spec.
MCP = tool access protocol (AI → tool). connector.json = workflow orchestration spec (AI ↔ AI, including tools).

Relationship to OpenCLIs

connector.json unifies these into a single declarative file.

Runtime

connector.json is a spec. The runtime that executes it is the NIIA daemon + headless PTY infrastructure.
No code modification needed. Drop a JSON file, run niia run connector.json.

Design Principles

  1. Declarative — describe what, not how
  2. LLM-agnostic — any AI CLI that runs in a terminal
  3. Infrastructure-level — orchestration in daemon, not in prompts
  4. MCP-complementary — MCP for tools, connector.json for workflows
  5. File is the plugin — new JSON = new workflow, no code changes

Status