agentica-server

5
0
Source

Agentica server + Claude proxy setup - architecture, startup sequence, debugging

Install

mkdir -p .claude/skills/agentica-server && curl -L -o skill.zip "https://mcp.directory/api/skills/download/2319" && unzip -o skill.zip -d .claude/skills/agentica-server && rm skill.zip

Installs to .claude/skills/agentica-server

About this skill

Agentica Server + Claude Proxy Setup

Complete reference for running Agentica SDK with a local Claude proxy. This enables Python agents to use Claude CLI as their inference backend.

When to Use

Use this skill when:

  • Starting Agentica development with Claude proxy
  • Debugging connection issues between SDK, server, and proxy
  • Setting up a fresh Agentica environment
  • Troubleshooting agent tool access or hallucination issues

Architecture

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)

Environment Variables

VariableSet ByUsed ByPurpose
INFERENCE_ENDPOINT_URLHumanagentica-serverWhere server sends LLM inference requests
S_M_BASE_URLHumanAgentica SDK clientWhere SDK connects to session manager

KEY: These are NOT the same endpoint!

  • SDK connects to server (port 2345)
  • Server connects to proxy (port 8080)

Startup Sequence

Must start in this order (each in a separate terminal):

Terminal 1: Claude Proxy

uv run python scripts/agentica/claude_proxy.py --port 8080

Terminal 2: Agentica Server

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

Terminal 3: Your Agent Script

S_M_BASE_URL=http://localhost:2345 uv run python scripts/agentica/your_script.py

Health Checks

# Claude proxy health
curl http://localhost:8080/health

# Agentica server health
curl http://localhost:2345/health

Common Errors & Fixes

1. APIConnectionError after agent spawn

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

2. ModuleNotFoundError for agentica-server

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.

3. Agent can't use Read/Write/Edit tools

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

4. Agent claims success but didn't do task

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.

5. Timeout on agent.call()

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.

Key Files

FilePurpose
scripts/agentica/claude_proxy.pyOpenAI-compatible proxy with SSE streaming
workspace/agentica-research/agentica-server/Local agentica-server installation
scripts/agentica/PATTERNS.mdMulti-agent pattern documentation

Quick Verification

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"}]}'

Checklist

Before running agents:

  • Claude proxy running on port 8080
  • Agentica server running on port 2345 (from its directory)
  • S_M_BASE_URL set for client scripts
  • INFERENCE_ENDPOINT_URL set for server
  • Both health checks return 200

You might also like

flutter-development

aj-geddes

Build beautiful cross-platform mobile apps with Flutter and Dart. Covers widgets, state management with Provider/BLoC, navigation, API integration, and material design.

643969

drawio-diagrams-enhanced

jgtolentino

Create professional draw.io (diagrams.net) diagrams in XML format (.drawio files) with integrated PMP/PMBOK methodologies, extensive visual asset libraries, and industry-standard professional templates. Use this skill when users ask to create flowcharts, swimlane diagrams, cross-functional flowcharts, org charts, network diagrams, UML diagrams, BPMN, project management diagrams (WBS, Gantt, PERT, RACI), risk matrices, stakeholder maps, or any other visual diagram in draw.io format. This skill includes access to custom shape libraries for icons, clipart, and professional symbols.

591705

ui-ux-pro-max

nextlevelbuilder

"UI/UX design intelligence. 50 styles, 21 palettes, 50 font pairings, 20 charts, 8 stacks (React, Next.js, Vue, Svelte, SwiftUI, React Native, Flutter, Tailwind). Actions: plan, build, create, design, implement, review, fix, improve, optimize, enhance, refactor, check UI/UX code. Projects: website, landing page, dashboard, admin panel, e-commerce, SaaS, portfolio, blog, mobile app, .html, .tsx, .vue, .svelte. Elements: button, modal, navbar, sidebar, card, table, form, chart. Styles: glassmorphism, claymorphism, minimalism, brutalism, neumorphism, bento grid, dark mode, responsive, skeuomorphism, flat design. Topics: color palette, accessibility, animation, layout, typography, font pairing, spacing, hover, shadow, gradient."

318398

godot

bfollington

This skill should be used when working on Godot Engine projects. It provides specialized knowledge of Godot's file formats (.gd, .tscn, .tres), architecture patterns (component-based, signal-driven, resource-based), common pitfalls, validation tools, code templates, and CLI workflows. The `godot` command is available for running the game, validating scripts, importing resources, and exporting builds. Use this skill for tasks involving Godot game development, debugging scene/resource files, implementing game systems, or creating new Godot components.

339397

nano-banana-pro

garg-aayush

Generate and edit images using Google's Nano Banana Pro (Gemini 3 Pro Image) API. Use when the user asks to generate, create, edit, modify, change, alter, or update images. Also use when user references an existing image file and asks to modify it in any way (e.g., "modify this image", "change the background", "replace X with Y"). Supports both text-to-image generation and image-to-image editing with configurable resolution (1K default, 2K, or 4K for high resolution). DO NOT read the image file first - use this skill directly with the --input-image parameter.

451339

fastapi-templates

wshobson

Create production-ready FastAPI projects with async patterns, dependency injection, and comprehensive error handling. Use when building new FastAPI applications or setting up backend API projects.

304231

Stay ahead of the MCP ecosystem

Get weekly updates on new skills and servers.