deployments-wrap-sdk package (Google ADK) or the LangGraph Functional API (Claude Agent SDK, Strands, CrewAI, AutoGen, and other libraries).
Supported frameworks
The following frameworks have end-to-end examples in this guide. Each example exports a LangGraph-compatible graph fromagent.py that Agent Server can serve:
Don’t see your framework? The Functional API accepts any callable, so you can apply the same pattern shown in the following examples to any agent library. Wrap your agent’s entrypoint with
@task and @entrypoint, then deploy.How the Functional API works
When a run arrives on Agent Server for a Functional API-wrapped agent:- The platform invokes your
@entrypoint-decoratedagentfunction with the run input and any saved state from prior turns on the same thread (passed as thepreviousargument). - The entrypoint calls your
@task-decorated function, which delegates to the framework agent (Claude Agent SDK, Strands, CrewAI, AutoGen, or another library). - The entrypoint returns
entrypoint.final(value=..., save=...). Thevalueis the response for this turn;saveis the checkpointed state used aspreviouson the next turn. - Agent Server persists the checkpoint, streams partial output when supported, and records traces when tracing is configured.
Prerequisites
Regardless of framework, you need:- Python 3.10+ for Functional API frameworks (Strands Agents supports Python 3.9+)
- A LangSmith API key
General deployment pattern
Follow the same steps for each framework. Choose your stack in the tabs inside each step, combine the snippets in one module (for exampleagent.py), and export the @entrypoint-decorated function as a module-level variable named agent. The end-to-end example section shows complete files you can copy.
1
Install dependencies
Install Python packages for your framework plus LangGraph and LangSmith.
- Claude Agent SDK
- Strands Agents
- CrewAI
- AutoGen
For Claude Agent SDK:Set
ANTHROPIC_API_KEY in your environment. For an Anthropic API key, refer to the Claude console.2
Define your agent
Build your agent using the framework of your choice, exactly as you would outside of LangSmith.
- Claude Agent SDK
- Strands Agents
- CrewAI
- AutoGen
3
Wrap with the Functional API
Expose your agent through an
@entrypoint-decorated function named agent. Inside, use @task for the unit of work that calls into the framework. Use entrypoint.final() to return the response and persist conversation history across turns on the same thread.- Claude Agent SDK
- Strands Agents
- CrewAI
- AutoGen
4
Configure tracing
Forward the framework’s native traces to LangSmith. Call tracing setup once at application startup, before creating or invoking agents.For full setup details, see Trace Claude Agent SDK applications.
- Claude Agent SDK
- Strands Agents
- CrewAI
- AutoGen
End-to-end example
The following examples combine agent definition, Functional API wrapping, tracing setup, and export of theagent symbol in a single agent.py file. Pick the tab for your framework.
- Claude Agent SDK
- Strands Agents
- CrewAI
- AutoGen
agent.py
- Export the
@entrypoint-decorated function asagentat module scope. Agent Server imports this symbol when serving the graph. - Return
entrypoint.final()with asaveargument so conversation state persists across turns on the same thread.
Project layout
A deployable project needs these files:langgraph.json points Agent Server at the exported symbol:
- Claude Agent SDK
- Strands Agents
- CrewAI
- AutoGen
langgraph.json
pyproject.toml
.env
Install dependencies
From your project directory:Enable tracing
Use the framework-specific.env template in Project layout. Agent Server loads this file when "env": ".env" is set in langgraph.json.
Set LANGSMITH_PROJECT and your framework provider credentials in that file. For Claude Agent SDK and Strands Agents, also set LANGSMITH_TRACING=true. For CrewAI and AutoGen, tracing is enabled in agent.py through OtelSpanProcessor() and the framework instrumentors, so set LANGSMITH_API_KEY and LANGSMITH_PROJECT only.
Traces show agent invocations, tool calls, and LLM interactions in the LangSmith UI. For framework-specific tracing options, see the links in Configure tracing.
Run locally
Start the local Agent Server with the LangGraph CLI:If
langgraph dev reports that langgraph-api is missing, install langgraph-cli[inmem] in the same environment.http://127.0.0.1:2024 and opens LangSmith Studio. Send a request with curl:
langgraph dev may serve on a different port. Check the URL in the terminal output and update the curl commands below if needed.- Claude Agent SDK, CrewAI, AutoGen
- Strands Agents
ASSISTANT_ID with the graph key from your langgraph.json graphs object. For example, if your config is "graphs": {"claude_agent": "./agent.py:agent"}, use claude_agent; if your config is "graphs": {"strands_agent": "./agent.py:agent"}, use strands_agent.
Verify that the LangGraph API runs locally before deploying. If
langgraph dev fails, deployment to LangSmith will fail as well.Deploy to LangSmith
Once the agent runs locally, deploy it withlanggraph deploy:
Connect these docs to Claude, VSCode, and more via MCP for real-time answers.

