Skip to main content

Framework Comparison

create-context-graph supports 8 agent frameworks. Each generates a different agent.py implementation with the same tool interface. This guide helps you choose the right one.

New to Create Context Graph?

Start with PydanticAI -- it offers the best combination of type safety, full streaming, and documentation. If you prefer working directly with the Anthropic API, Claude Agent SDK is the lightest-weight option.

Comparison Table​

FrameworkLLM ProviderStreamingAsyncPerformance Notes
PydanticAIAnthropic (configurable)Full (text + tools)Native asyncFast startup, type-safe tool definitions. Low overhead.
Claude Agent SDKAnthropicFull (text + tools)Native asyncMinimal abstraction over Anthropic API. Lowest latency to first token.
OpenAI Agents SDKOpenAIFull (text + tools)Native asyncRequires OPENAI_API_KEY. Text-matching tools need specific search terms.
LangGraphAnthropic (configurable)Full (text + tools)Native asyncSlightly higher startup (graph compilation). Rich observability hooks.
Anthropic ToolsAnthropicFull (text + tools)Native asyncNo framework dependency. Direct API control over agentic loop.
StrandsAnthropicTools onlyThread-bridgedSync framework in worker thread. Text arrives at end, tools stream live.
CrewAIAnthropicTools onlyThread-bridgedHigher startup (multi-agent init). Text arrives at end. Needs crewai[anthropic].
Google ADKGoogle GeminiFull (text + tools)Native asyncRequires GOOGLE_API_KEY. Uses nest_asyncio for reentrant async.

Choosing a Framework​

Best for most users: PydanticAI or Claude Agent SDK​

Both offer full streaming, excellent tool execution, and native async support. PydanticAI adds type-safe tool definitions with RunContext; Claude Agent SDK provides the most direct Anthropic integration.

Best for OpenAI users: OpenAI Agents SDK​

If you're already using OpenAI's API and models, this framework integrates naturally. Note that broad semantic queries (e.g., "who are the top players?") may return empty results because the text-matching tools require specific search terms.

Best for LangChain ecosystem: LangGraph​

If you're building within the LangChain ecosystem and want access to LangChain's tool ecosystem, agent memory, and observability integrations.

Best for multi-agent workflows: CrewAI​

CrewAI's agent/task/crew paradigm is designed for multi-agent collaboration. The generated template uses a single agent, but you can extend it to multi-agent crews for complex workflows.

Best for modular agentic loops: Anthropic Tools​

A lightweight, no-framework approach that uses the Anthropic API directly with a custom @register_tool registry and bounded agentic loop. Good for understanding how agentic loops work under the hood.

Best for Google Cloud: Google ADK​

Uses Google's Gemini models via the Agent Development Kit. Requires a separate Google API key (GOOGLE_API_KEY). Best if you're building within the Google Cloud ecosystem.

Streaming Behavior​

Full streaming (6 frameworks): Text tokens stream to the frontend as they're generated, and tool calls appear in real-time in the tool call timeline. The user sees the response build progressively.

Tools-only streaming (CrewAI, Strands): Tool call events stream in real-time, but the final text response arrives all at once after the agent completes. This is because these frameworks run synchronously in a worker thread.

Thread Safety​

Most frameworks use native async/await. CrewAI and Strands are synchronous and run in worker threads via asyncio.to_thread(). Their tools use asyncio.run_coroutine_threadsafe() to bridge back to the async event loop for Neo4j queries. This is handled automatically in the generated code.

Framework-Specific Dependencies​

FrameworkKey Dependencies
PydanticAIpydantic-ai>=0.1
Claude Agent SDKclaude-agent-sdk>=0.1, anthropic>=0.30
OpenAI Agents SDKopenai-agents>=0.1
LangGraphlanggraph>=0.1, langchain-anthropic>=0.3
CrewAIcrewai[anthropic]>=0.1
Strandsstrands-agents[anthropic]>=0.1
Google ADKgoogle-adk>=0.1, nest-asyncio>=1.5
Anthropic Toolsanthropic>=0.30