Documentation Index
Fetch the complete documentation index at: https://docs.emergence.ai/llms.txt
Use this file to discover all available pages before exploring further.
Agent Author Guide
CRAFT is a multi-agent platform built on the A2A protocol. Every capability in CRAFT — from natural-language SQL generation to semiconductor yield analysis — runs as a discrete, independently deployable agent. The short version: CRAFT gives you managed LLMs, tool discovery, and an agent registry. Your agent gets all three by pointing its LLM client at the CRAFT gateway and making one API call to register. Start with the tutorial if you want to be running in under 20 minutes. This overview covers what it means to be an agent on CRAFT, when to build one, how to choose a framework, and how the platform integrates with your agent at runtime.What is an agent on CRAFT?
A CRAFT agent is a service that:- Exposes an Agent Card at
/.well-known/agent-card.jsondescribing its identity, skills, and capabilities - Accepts work via A2A JSON-RPC (
message/sendormessage/stream) - Streams progress and results back as SSE events
- Registers with the Assets API so other agents and the orchestrator can discover and invoke it
When should you build an agent?
Build an agent when...
Build an agent when...
- You have a bounded capability with a clear input/output contract (e.g., “turn natural language into SQL”, “generate yield analysis charts”)
- The capability needs to be independently scalable or deployable
- The capability will be invoked by other agents or orchestrators
- You want the capability to appear in the platform’s agent registry and be discoverable by the orchestrator
- The capability is owned by a separate team with its own release cadence
Don't build an agent when...
Don't build an agent when...
- The capability is a simple function call used only within a single agent — add it as a tool instead
- The capability is a data transformation pipeline with no LLM reasoning — use a standard service
- You need real-time collaboration between multiple LLMs sharing memory — use sub-agents within the same ADK process
- The capability is a UI-layer concern — use CRAFT’s REST API directly
Framework choice
CRAFT supports four agent frameworks. Choose based on your team’s constraints and the nature of your agent.| Framework | Language | Best For | Pros | Cons |
|---|---|---|---|---|
| Google ADK | Python | Analytics, multi-agent orchestration, data pipelines | Native A2A (to_a2a()), RemoteA2aAgent for sub-agent delegation, model-agnostic via LiteLLM, ADK Web for debugging | A2A support still experimental; Python-only |
| Claude Agent SDK | Python, TypeScript | Reasoning-heavy tasks, document analysis, complex multi-step workflows | Extended thinking, strong tool-use, multi-turn conversation handling | No native A2A server — wrap with a2a library manually |
| Pydantic AI | Python | Type-safe agents, data-structured outputs, MCP toolsets | FastMCPToolset for MCP integration, strict typing, clean dependency injection via deps_type | Less mature ecosystem than ADK |
| LangGraph | Python | Stateful workflows, graph-based logic, conditional branching | Explicit state machine, fine-grained control over execution flow | More boilerplate; no native A2A — wrap with a2a library |
Framework decision flowchart
Platform integration points
Every agent on CRAFT integrates with three platform services at runtime.Assets API — agent registry
The Assets API is the source of truth for agent discovery. Before your agent can be invoked by an orchestrator, you must register it:resource_uri (agent:<org>:<project>:<name>), and makes the agent discoverable to orchestrators and other platform consumers.
LiteLLM gateway — model access
All LLM calls from agents on CRAFT route through the shared LiteLLM gateway. This provides:- Unified model access — use Gemini, Claude, GPT-4o, and others with a single OpenAI-compatible endpoint
- Cost tracking — per-org, per-project token usage recorded automatically
- Rate limiting — enforced per tenant to prevent runaway costs
- Model aliasing —
LLM_PRO,LLM_LIGHTconstants resolve to the current best model for each tier
em-runtime-mcp — tool access
CRAFT agents access data and platform capabilities through theem-runtime-mcp MCP server. Tools available include database schema inspection, query execution, artifact upload/download, and context graph queries.
Create a fresh MCP client and toolset per agent request. Do not reuse a single long-lived client across requests — MCP sessions can expire or the MCP server pod can restart.
Guide contents
A2A Protocol Primer
Agent Cards, JSON-RPC methods, SSE streaming, and the task lifecycle.
Your First Agent
Framework-by-framework tutorial: Google ADK, Claude Agent SDK, Pydantic AI, LangGraph.
Tool Authoring
Function tools, MCP tools via FastMCPToolset, schema discipline.
Multi-Agent Patterns
Delegation, supervision, and parallel fan-out via A2A.
Streaming Idioms
SSE streaming, partial results, cooperative cancellation.
Eval Harness
Langfuse evaluators, regression suites, golden traces.
Debugging Agents
Trace inspection, prompt iteration, common failure modes.

