Concepts mapping
Coming from the Claude Agent SDK, the Vercel AI SDK or LangGraph? A rough map. The ideas line up closely; the differences are noted.
| You know | In AIDaemon | Notes |
|---|---|---|
Claude Agent SDK: query() / agent loop | Agent::run(session_id, message) | The loop is in aidaemon-core; model-agnostic (Provider trait). |
| Claude Agent SDK: custom tools, MCP servers | #[tool] / Tool / FnTool; aidaemon-mcp (McpServer::tools()) | MCP tools become ordinary Tools. |
| Claude Agent SDK: hooks (PreToolUse, PostToolUse, Stop) | Hook::before_tool, after_tool, on_stop | Hooks can Deny, Rewrite or Interrupt. |
Claude Agent SDK: permission modes, canUseTool | ApprovalPolicy + ApprovalMode, or your own before_tool | A paused run is a serializable RunState, resumed with Agent::resume. |
| Claude Agent SDK: subagents | aidaemon-agents (agent as a tool) | Child budgets roll up into the parent. |
| Claude Agent SDK: sessions | session id passed to run + a RunStore (.sqlite(..)) | |
Vercel AI SDK: generateText / streamText | Provider (streaming) used by the loop | You normally call Agent::run, not the model directly. |
Vercel AI SDK: generateObject | complete_typed::<T>, run_typed::<T> | Schema from schemars, one repair attempt. |
Vercel AI SDK: tool({ description, parameters, execute }) | #[tool] on a function | Schema from the parameters, description from the doc comment. |
Vercel AI SDK: maxSteps, stopWhen | Limits (.limits(..) via configure), StopCondition | Also token budgets and stuck detection. |
| Vercel AI SDK: provider packages | aidaemon-providers (Anthropic, OpenAiCompatible, ...) | |
| LangGraph: graph of nodes and edges | the loop plus hooks | No graph DSL: control flow is the loop; add behaviour in hooks. |
| LangGraph: state, checkpointer | RunState (serde) + RunStore | Checkpoints are written as the run goes; crash recovery resumes in-flight tool batches. |
LangGraph: interrupt() / human in the loop | ToolDecision::Interrupt then Agent::resume | Interrupts happen before a tool call. |
| LangGraph: long-term memory store | aidaemon-memory (MemorySystem, MemoryStore, Embedder) | Swappable; plugs in through the preset. |
| LangSmith / tracing | Event stream (.event_sink), TracingSink / OtelSink (otel feature) | |
| Evals | aidaemon-eval: YAML scenarios, N-of-M pass rates |
Where AIDaemon differs on purpose
- Receipts. Every tool call produces a receipt (what ran, with what arguments, how it ended), so a stop hook can check what happened instead of trusting the model's prose.
- Untrusted output. Tool output is treated as untrusted unless a tool says otherwise, so policies can screen it.
- Pausable runs. A run is data: pause it, store it, and resume it in another process.