Reference documentation for the Continuum agentic framework
(shyftlabs-continuum on PyPI, importable as continuum).
Note: every example in these docs has been verified against the actual source under
src/continuum/. Imports, parameter names, defaults, and signatures match the codebase as of the latest release.
If you've never used Continuum before, read in this order:
installation.md— Python 3.13 setup, env vars, troubleshootingagent.md— theBaseAgent/AgentRunnermental model; the most important filellm.md— provider routing (no LiteLLM), structured outputs, context compressiontools.md— connecting MCP servers, tool-context capture, run artifactsmemory.mdandsession.md— persistent memory and conversation historyobservability.md— tracing, metrics, error reportingcore.md— the DI container, lifecycle, health checks, protocolstemporal/— durable workflows with approval gates
| Module | Doc | What it gives you |
|---|---|---|
continuum.agent |
agent.md | BaseAgent, AgentRunner, 9 workflow patterns, handoffs |
continuum.llm |
llm.md | LLMClient, provider routing, structured outputs, compression |
continuum.memory |
memory.md | mem0 + Qdrant long-term memory; IntelligentMemoryClient |
continuum.session |
session.md | Redis-backed conversation history |
continuum.tools |
tools.md | MCP servers (Stdio/SSE/StreamableHTTP), ToolExecutor, artifacts |
continuum.observability |
observability.md | Langfuse tracing, metrics, error reporter |
continuum.core |
core.md | Container, OrchestratorLifecycle, health checks |
continuum.temporal |
temporal/ | Durable workflows, approval gates |
continuum.config, protocols, exceptions |
core.md §7-§8 | Settings, runtime-checkable protocols, exception hierarchy |
- Async-first — every public API is
async; wrap inasyncio.run(main()). The few sync entry points are clearly marked (*_syncmethods). - Direct provider SDKs — Continuum calls OpenAI / Anthropic / Gemini directly. No LiteLLM anywhere.
- Provider routing by model prefix —
gemini/...→ Gemini,claude-…/anthropic/...→ Anthropic, everything else → OpenAI. - MCP-native tooling — every tool is exposed via the Model Context Protocol; no bespoke adapters.
- Three IDs that travel together —
trace_id(Langfuse),session_id(Redis), andrun_id(mem0). The framework keeps them synchronized viacontextvars. OPENAI_API_KEYis required at startup — mem0's default embedder is OpenAI. Set the key, change the embedder provider, or disable memory entirely.
The repository ships a playground/ tree with end-to-end example apps
that exercise different feature combinations:
| Path | Demonstrates |
|---|---|
../playground/sdk_feature_test/ |
SDK-feature smoke test |
../playground/memory-modes-demo/ |
All four memory scopes (USER / AGENT / RUN / SHARED) |
../playground/commerce-chat/ |
Plan-and-execute multi-agent + MCP tool restriction |
../playground/fetch-agent/ |
Tool-using agent with MCP fetch server |
../playground/assortment/ |
FastAPI-served agent endpoint |
A separate continuum-hackathon kit packages a pre-built wheel and
minimal starter examples for downstream users; this repository is the
source of truth.
The repo ships AI-assistant configuration so Claude Code / Codex / Cursor can write Continuum code correctly without prompting:
../AGENTS.md— canonical knowledge pack../CLAUDE.md— Claude Code project rules../.cursor/rules/continuum.mdc— Cursor always-on rule../.claude/skills/— invocable per-topic skills
If you stumble across older docs, READMEs, or example code that mentions any of the following, they are stale:
- LiteLLM — removed in framework commit
657607a. UseLLMClientwith direct provider SDKs. SessionClient.add_message(session_id, role=..., content=...)— the real signature isadd_message(session_id, message: ChatMessage).from continuum.agent import RouterAgent, create_router_agentwith aRoute(target=...)— the field isRoute(agent_name=..., description=...).from continuum.memory import MemoryClientwithclient.add(text, user_id=...)— works, butadd()accepts strings, lists of strings, OR lists of{role,content}dicts; the messages-style is the recommended path.