Agent SDK Quickstart
Benchmarked against: Anthropic — Agent SDK Quickstart Time: 10 minutes to a working agent Prerequisites: Python 3.11+, Claude Code or LangGraph installed
This quickstart gets you from zero to a functioning SuperPortia agent. Choose your line and follow the steps.
Option A: Line 1 — Claude Code agent
The fastest path. Claude Code CLI is already a complete agent.
1. Install Claude Code
# Claude Code CLI
npm install -g @anthropic-ai/claude-code
2. Configure MCP servers
Add SuperPortia MCP servers to your Claude Code config:
{
"mcpServers": {
"cloud-ub": {
"url": "https://your-worker.workers.dev/mcp"
},
"local-ubi": {
"command": "python",
"args": ["-m", "ub.mcp_server"],
"env": {
"SP_SHIP_ID": "SS1",
"SP_AGENT_ID": "Mac CLI 小克"
}
}
}
}
3. Add CLAUDE.md
Create a CLAUDE.md in your project root with agent identity and rules. See CLAUDE.md + PD for the template.
4. Test
claude
# In the session:
# > agent_heartbeat()
# > search_brain("test")
Your Line 1 agent is online.
Option B: Line 2 — LangGraph agent
Build a custom agent with LangGraph.
1. Install dependencies
pip install langgraph langgraph-checkpoint-sqlite langchain-mcp-adapters
2. Create the agent
# superportia_agent.py
from langgraph.graph import StateGraph, MessagesState
from langgraph.prebuilt import ToolNode
# Define tools (MCP adapters or custom)
tools = [...] # Your MCP tool bindings
# Build the graph
graph = StateGraph(MessagesState)
graph.add_node("agent", agent_node)
graph.add_node("tools", ToolNode(tools))
graph.add_edge("agent", "tools")
graph.add_edge("tools", "agent")
# Compile
app = graph.compile()
3. Run
result = app.invoke({"messages": [("user", "Search UB for architecture docs")]})
See Python SDK and LangGraph Quickstart for complete examples.
What both lines need
Regardless of line, every SuperPortia agent needs:
| Requirement | How |
|---|---|
| Cloud UB access | MCP server configured |
| Ship identity | SP_SHIP_ID set |
| Agent identity | SP_AGENT_ID set |
| Heartbeat on start | agent_heartbeat() |
| Constitution knowledge | Rules loaded or referenced |
| Cost awareness | Engine selection discipline |
Next steps
| Path | Page |
|---|---|
| Deep dive Line 1 | TypeScript Agent SDK |
| Deep dive Line 2 | Python SDK |
| LangGraph from scratch | LangGraph Quickstart |
| Move between lines | Line Migration |