Architecture
Jan Agent Framework is organized into two architectural levels: the MVP (what's implemented and shipping) and the complete design (what's planned for v2).
Quick comparison
| Aspect | v1 (MVP) | v2 (Complete) |
|---|---|---|
| Agent Core | AgentCore trait, ReActCore impl | + TurnEngine, typed I/O, ErasedAgentCore |
| LLM Provider | LlmProvider trait, OpenAiProvider | + streaming, ChatOptions, LlmResponse trait |
| Tool Dispatch | ToolDispatcher trait, inline in cores | + centralized ToolDispatchEngine with hooks |
| Memory | MemoryPlugin trait, NullMemory | Same (v1 design is sufficient) |
| Policy | RuntimePolicy trait, 3 implementations | Same + hook-based guardrails |
| Hooks | Not included | AgentHook trait, HookChain, 10 lifecycle points |
| Events | AgentEvent enum, broadcast channel | + SessionId correlation, typed protocol |
| Builder | AgentRuntime::new() | AgentRuntimeBuilder fluent API |
| Errors | Basic AgentError | Layered strategy (fatal / conversation / degraded / silent) |