Agentica server + Claude proxy setup - architecture, startup sequence, debugging
Complete reference for running Agentica SDK with a local Claude proxy. This enables Python agents to use Claude CLI as their inference backend.
Use this skill when:
Agentica SDK (client code)
| S_M_BASE_URL=http://localhost:2345
v
ClientSessionManager
|
v
Agentica Server (agentica-server)
| INFERENCE_ENDPOINT_URL=http://localhost:8080/v1/chat/completions
v
Claude Proxy (claude_proxy.py)
|
v
Claude CLI (claude -p)
| Variable | Set By | Used By | Purpose |
|---|---|---|---|
INFERENCE_ENDPOINT_URL | Human | agentica-server | Where server sends LLM inference requests |
S_M_BASE_URL | Human | Agentica SDK client | Where SDK connects to session manager |
KEY: These are NOT the same endpoint!
Must start in this order (each in a separate terminal):
uv run python scripts/agentica/claude_proxy.py --port 8080
MUST run from its directory:
cd workspace/agentica-research/agentica-server
INFERENCE_ENDPOINT_URL=http://localhost:8080/v1/chat/completions uv run agentica-server --port 2345
S_M_BASE_URL=http://localhost:2345 uv run python scripts/agentica/your_script.py
# Claude proxy health
curl http://localhost:8080/health
# Agentica server health
curl http://localhost:2345/health
Symptom: Agent spawns successfully but fails on first call with connection error.
Cause: Claude proxy returning plain JSON instead of SSE format.
Fix: Proxy must return Server-Sent Events format: