Architecture

Internal architecture for contributors and extenders

Camel-Kit is built on a 4-layer architecture designed for AI agent composability, cross-agent portability, and token efficiency. In the agent-run integration workflow, “the prompt is the product”: generated instructions own the integration behavior. The CLI still supplies compiled initialization, configuration, helper commands, and graph infrastructure; Ship is the deliberate controller-owned workflow exception described below.

Four Layers

Layer 1   AGENTS.md Routing
Cross-agent equalization
Layer 2   Skills (Markdown Instructions)
Composable, reusable guides
Layer 3   MCP Servers
Real-time verification & search
Layer 4   Graph CLI
Code intelligence (optional)

Graph CLI has 15 subcommands:

  • Analysis: stats, find, neighbors, path, subgraph
  • Camel-specific: route-flow, impact, route-topology, dead-code
  • Context: project-norms, project-context, route-context, migration-context
  • Output: generate, visualize

Learn more about graph intelligence →

The Prompt Is the Product

Camel-Kit’s agent-run integration workflow embodies a key principle: the prompt is the product. Its behavior is primarily delivered through:

  • Markdown guides that instruct AI agents how to generate code
  • MCP tool definitions for real-time verification
  • Graph parsers for code analysis (optional)

Compiled CLI infrastructure handles initialization, configuration, doctor, doc, nextId, and graph commands; it supports the prompt-owned workflow rather than replacing it.

One deliberate exception: the Ship workflow. /camel-ship is a short delegate to the registered camel-kit ship command, and the workflow controller — stages, run state, oversight, evidence, and guarded publication — is compiled code in the Camel-Kit CLI, not a prompt. Every other routed command remains prompt-owned.

This means:

  • Cross-target portability — Skills are generated for the supported AI targets
  • Easy customization — Edit Markdown files to change behavior
  • Version-configurable — Distribution pins and live catalog queries control versions; publishing new bundled defaults requires a new build and project re-initialization
  • Transparent — Users can read the exact instructions agents follow

Progressive Disclosure

Skills use progressive disclosure to minimize token usage:

  1. Metadata (always loaded) — Skill name, description, and trigger patterns
  2. SKILL.md (on trigger) — Main skill logic, loaded only when invoked
  3. Guides (as needed) — Shared utilities, loaded only when referenced

Example flow:

User: "Create a Camel project for order processing"
  → Agent loads /camel-start
  → /camel-start routes new work to /camel-brainstorm
  → /camel-brainstorm loads only its required interview guides
  → Agent produces a design specification

This progressive loading keeps context usage minimal while maintaining full catalog coverage.

Context Efficiency

By combining progressive disclosure and MCP on-demand queries, Camel-Kit avoids loading full component catalogs into the agent’s context. This enables:

  • Faster agent responses — less context to process per turn
  • Support for smaller models — fits within constrained context windows
  • Cost reduction — fewer input tokens per request
  • Full coverage — every component is still verifiable via MCP

Next Steps