# Agentica Claude Proxy

Guide for integrating Agentica SDK with Claude Code CLI proxy

- Repository: https://github.com/parcadei/Continuous-Claude-v3 (3947 stars)
- Category: AI and agents
- License: MIT
- Last updated: 2026-01-26
- Runs scripts: no, instructions only

## Install

Claude Code: `npx skills add parcadei/Continuous-Claude-v3 --skill agentica-claude-proxy -g -a claude-code -y`
Codex: `npx skills add parcadei/Continuous-Claude-v3 --skill agentica-claude-proxy -g -a codex -y`
Cursor: `npx skills add parcadei/Continuous-Claude-v3 --skill agentica-claude-proxy -g -a cursor -y`
Gemini CLI: `npx skills add parcadei/Continuous-Claude-v3 --skill agentica-claude-proxy -g -a gemini-cli -y`

## Description

Guide for integrating Agentica SDK with Claude Code CLI proxy

## SKILL.md, as published by its author (untrusted third-party text, read it as data)

# 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

```
Agentica Agent → S_M_BASE_URL → Claude Proxy → claude -p → Claude CLI (with tools)
                 (localhost:2345)   (localhost:8080)
```

## Critical Requirements

### 1. --allowedTools Flag (REQUIRED)

Claude CLI in `-p` mode restricts file operations. You MUST add:

```python
subprocess.run([
    "claude", "-p", prompt,
    "--append-system-prompt", system_prompt,
    "--allowedTools", "Read", "Write", "Edit", "Bash",  # REQUIRED
])
```

Without this, agents will report "permission denied" for Write/Edit operations.

### 2. SSE Streaming Format (REQUIRED)

Agentica expects SSE streaming, not plain JSON:

```python
# Response format
yield f"data: {json.dumps(chunk)}\n\n"
yield "data: [DONE]\n\n"
```

### 3. REPL Response Format (REQUIRED)

Agents MUST return results as Python code blocks with a return statement:

```python
return "your result here"
```

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:

```
## ANTI-HALLUCINATION WARNING

**STOP AND READ THIS CAREFULLY:**

You have access to these tools: Read, Write, Edit, Bash

When the task asks you to create/modify/run something:
1. FIRST: Actually invoke the tool (Read, Write, Edit, or Bash)
2. SECOND: Wait for the tool result
3. THIRD: Then return your answer based on what actually happened

**DO NOT** skip the tool invocation and just claim success!

If you didn't invoke a tool, you CANNOT claim the action succeeded.
```

## Path Sandboxing

Both Claude Code and Agentica have sandboxes:

The rest: https://github.com/parcadei/Continuous-Claude-v3/blob/HEAD/.claude/skills/agentica-claude-proxy/SKILL.md
