agentica-server by parcadei/continuous-claude-v3
npx skills add https://github.com/parcadei/continuous-claude-v3 --skill agentica-server运行 Agentica SDK 与本地 Claude 代理的完整参考。这使 Python 代理能够使用 Claude CLI 作为其推理后端。
在以下情况下使用此技能:
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)
| 变量 | 设置者 | 使用者 | 用途 |
|---|---|---|---|
INFERENCE_ENDPOINT_URL | 人工 | agentica-server | 服务器发送 LLM 推理请求的目标地址 |
广告位招租
在这里展示您的产品或服务
触达数万 AI 开发者,精准高效
S_M_BASE_URL | 人工 | Agentica SDK 客户端 | SDK 连接到会话管理器的地址 |
关键提示: 这些是不同的端点!
必须按此顺序启动(每个在单独的终端中):
uv run python scripts/agentica/claude_proxy.py --port 8080
必须从其目录运行:
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 代理健康状态
curl http://localhost:8080/health
# Agentica 服务器健康状态
curl http://localhost:2345/health
症状: 代理成功生成,但在首次调用时因连接错误而失败。
原因: Claude 代理返回的是纯 JSON 而不是 SSE 格式。
修复: 代理必须返回服务器发送事件格式:
data: {"choices": [...]}\n\n
症状: ModuleNotFoundError: No module named 'agentica_server'
原因: 从错误的目录运行 uv run agentica-server。
修复: 必须先执行 cd workspace/agentica-research/agentica-server。
症状: 代理请求文件内容而不是读取它们。
原因: claude_proxy.py CLI 调用中缺少 --allowedTools。
修复: 代理必须传递工具权限:
claude -p ... --allowedTools Read Write Edit Bash
症状: 代理说"我已创建文件",但文件不存在。
原因: 幻觉 - 代理描述了预期操作但未执行。
修复: 在 REPL_BASELINE 中添加了强调性的反幻觉提示:
CRITICAL: Use ACTUAL tools. Never DESCRIBE using tools.
症状: 调用挂起 30 秒以上然后超时。
原因: Claude CLI 耗时过长或陷入循环。
修复: 检查代理日志以获取实际的 CLI 输出。可能需要简化提示。
| 文件 | 用途 |
|---|---|
scripts/agentica/claude_proxy.py | 支持 SSE 流式传输的 OpenAI 兼容代理 |
workspace/agentica-research/agentica-server/ | 本地 agentica-server 安装目录 |
scripts/agentica/PATTERNS.md | 多代理模式文档 |
测试完整堆栈:
# 1. 验证代理响应
curl http://localhost:8080/health
# 2. 验证服务器响应
curl http://localhost:2345/health
# 3. 通过代理测试推理
curl http://localhost:8080/v1/chat/completions \
-H "Content-Type: application/json" \
-d '{"model":"claude","messages":[{"role":"user","content":"Say hello"}]}'
运行代理前:
S_M_BASE_URLINFERENCE_ENDPOINT_URL每周安装量
200
代码仓库
GitHub 星标
3.6K
首次出现
2026年1月22日
安全审计
已安装于
codex193
opencode193
gemini-cli191
cursor189
github-copilot187
amp183
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:
data: {"choices": [...]}\n\n
Symptom: ModuleNotFoundError: No module named 'agentica_server'
Cause: Running uv run agentica-server from wrong directory.
Fix: Must cd workspace/agentica-research/agentica-server first.
Symptom: Agent asks for file contents instead of reading them.
Cause: Missing --allowedTools in claude_proxy.py CLI call.
Fix: Proxy must pass tool permissions:
claude -p ... --allowedTools Read Write Edit Bash
Symptom: Agent says "I've created the file" but file doesn't exist.
Cause: Hallucination - agent describing intended actions without executing.
Fix: Added emphatic anti-hallucination prompt in REPL_BASELINE:
CRITICAL: Use ACTUAL tools. Never DESCRIBE using tools.
Symptom: Call hangs for 30+ seconds then times out.
Cause: Claude CLI taking too long or stuck in a loop.
Fix: Check proxy logs for the actual CLI output. May need to simplify prompt.
| File | Purpose |
|---|---|
scripts/agentica/claude_proxy.py | OpenAI-compatible proxy with SSE streaming |
workspace/agentica-research/agentica-server/ | Local agentica-server installation |
scripts/agentica/PATTERNS.md | Multi-agent pattern documentation |
Test the full stack:
# 1. Verify proxy responds
curl http://localhost:8080/health
# 2. Verify server responds
curl http://localhost:2345/health
# 3. Test inference through proxy
curl http://localhost:8080/v1/chat/completions \
-H "Content-Type: application/json" \
-d '{"model":"claude","messages":[{"role":"user","content":"Say hello"}]}'
Before running agents:
S_M_BASE_URL set for client scriptsINFERENCE_ENDPOINT_URL set for serverWeekly Installs
200
Repository
GitHub Stars
3.6K
First Seen
Jan 22, 2026
Security Audits
Gen Agent Trust HubPassSocketPassSnykPass
Installed on
codex193
opencode193
gemini-cli191
cursor189
github-copilot187
amp183
AI Elements:基于shadcn/ui的AI原生应用组件库,快速构建对话界面
62,200 周安装