agentica-claude-proxy
Guide for integrating Agentica SDK with Claude Code CLI proxy
By parcadei · 479 installs
npx skills add parcadei/continuous-claude-v3 --skill agentica-claude-proxy
Source repository · Upstream listing
Agentica Claude Code Proxy Integration
Use this skill when developing or debugging the Agentica Claude proxy integration.
When to Use
Setting up Agentica agents to use Claude Code tools
Debugging agent hallucination issues
Fixing permission errors in file operations
Understanding the REPL response format
Architecture Overview
Critical Requirements
1. allowedTools Flag (REQUIRED)
Claude CLI in p mode restricts file operations. You MUST add:
Without this, agents will report "permission denied" for Write/Edit operations.
2. SSE Streaming Format (REQUIRED)
Agentica expects SSE streaming, not plain JSON:
3. REPL Response Format (REQUIRED)
Agents MUST return results as Python code blocks with a return statement:
Agentica's REPL parser extracts code between \ \ \ python and \ \ \ .
Anti Hallucination Prompt Engineering
Agents will hallucinate success without actually using tools unless you explicitly warn them:
Path Sandboxing
Both Claude Code and Agentica have sandboxes:
/tmp/ paths are blocked by Claude Code
Files outside project directory blocked by Agentica
Solution: Use project relative paths like workspace/ instead of /tmp/
Debugging
Check Agent Logs
Note: Logs only show final conversational response, not tool invocations.
Test Proxy Directly
Verify File Operations
Server Commands
Start Servers
Use Swarm
Health Checks
Reference Files
Proxy implementation: scripts/agentica/claude proxy.py
REPL BASELINE prompt: scripts/agentica/claude proxy.py:49 155
Comprehensive test: workspace/test swarm all tools.py
DependencySwarm: scripts/agentica/dependency swarm.py
Common Errors
Error Cause Fix
"Permission denied" Missing allowedTools Add allowedTools Read Write Edit Bash
Agent claims success but file not created Hallucination Add anti hallucination prompt section
"Cannot access /tmp/..." Sandbox restriction Use project relative paths
"APIConnectionError" Wrong response format Use SSE streaming (data: {...}\n\n)
"NameError: view file" Agent using REPL functions Add REPL BASELINE with native tool examples