-
Notifications
You must be signed in to change notification settings - Fork 2
FAQ
OCC (Claude Chain Orchestrator) is a workflow engine that lets you define multi-step AI agent chains in YAML and execute them with automatic parallel processing, dependency resolution, and real-time streaming.
Not directly. OCC uses the Claude CLI by default, which handles its own authentication (claude auth login). But you can also use other providers (OpenRouter, OpenAI, Ollama, HuggingFace) — each with their own key setup.
OCC supports 6 LLM providers:
-
Claude CLI —
claude-opus-4-6,claude-sonnet-4-6,claude-haiku-4-5 - OpenRouter — 200+ models (GPT-4o, Gemini, Llama, DeepSeek, Mistral...)
- OpenAI — GPT-4o, GPT-4o-mini, o3-mini, o4-mini
- Ollama — Any local model (Llama, Mistral, Phi, Qwen...)
- HuggingFace — 118 free models via Inference API (DeepSeek R1, Qwen 3, Gemma 4...)
- Custom — Any OpenAI-compatible API
Specify per-step with the model field: model: "openrouter/gpt-4o" or model: "ollama/llama3.2".
Depends on your chain and provider. A typical 6-step chain costs ~0ドル.05-0.15 with Claude Sonnet. With HuggingFace free tier or Ollama local models, it costs 0ドル. See Token Optimization for cost reduction techniques.
Yes. OCC is cross-platform (macOS, Linux, Windows). CI runs on all three with Node.js 20 and 22.
Yes. OCC includes a React dashboard (frontend-react/) with:
- Chain/pipeline management
- Visual canvas editor (BLOB)
- Workflow chat (conversational chain builder)
- Real-time SSE execution monitoring with mini-terminals
- Settings panel (providers, Ollama, HuggingFace, schedules, MCP servers)
- Run at
http://localhost:5173withcd frontend-react && npm run dev
The Claude CLI is not installed or not in your PATH.
# Install Claude CLI npm install -g @anthropic-ai/claude-code # Verify which claude # macOS/Linux where claude # Windows # Or set path explicitly export CLAUDE_BIN=/path/to/claude
TypeScript is a dev dependency. Use npx:
cd mcp-server npm install npx tsc --noEmit # Type check npm run build # Build
Change the port:
REST_PORT=8080 npm run rest
Your steps have circular depends_on references. Example:
# BAD: A depends on B, B depends on A - id: a depends_on: [b] - id: b depends_on: [a]
Fix: restructure so dependencies form a DAG (directed acyclic graph).
Your chain defines required inputs that weren't provided:
inputs: - name: topic # Required (optional: false is the default) - name: depth optional: true # This one can be omitted
Provide all required inputs when executing:
curl -X POST http://localhost:4242/execute/my-chain \
-d '{"input": {"topic": "AI"}}'Common causes:
-
Timeout — step took too long. Increase
timeout_ms -
Claude error — check the step's
errorfield in the execution result -
Wrong variable — check that
{variable}names matchoutput_varvalues -
Condition false — step was skipped because its
conditionevaluated to false
-
Check execution status:
curl http://localhost:4242/executions/{id} -
Stream real-time logs:
curl -N http://localhost:4242/executions/{id}/stream -
Look at individual step outputs in the execution result — each step has
status,output,error, anddurationMs.
Yes. Add the tools field:
- id: analyze tools: [Read, Write, Bash, Glob, Grep, WebSearch, WebFetch] prompt: "Read and analyze the code at {input.path}" output_var: analysis
Default limit is 5. Wait for running executions to finish, or increase:
MAX_CONCURRENT_EXECUTIONS=10 npm run rest
curl -X DELETE http://localhost:4242/executions/{id}This kills all active processes and marks pending steps as skipped.
curl -X POST http://localhost:4242/executions/{id}/resumeCompleted steps are skipped. Execution resumes from the first non-completed step.
OCC sends heartbeat pings every 30s to prevent this. If you're behind a proxy (Nginx, Cloudflare), configure it to allow long-lived connections:
proxy_read_timeout 3600s; proxy_send_timeout 3600s;
- Check
.mcp.jsonexists in your project root - Verify paths are absolute (not relative)
- Restart Claude Code after editing
.mcp.json - Check that
npm run buildwas run (needsdist/index.js)
The path in .mcp.json → env.CHAINS_DIR doesn't point to a valid directory. Use an absolute path:
"CHAINS_DIR": "/Users/you/projects/OCC/chains"
-
Use parallel steps — remove unnecessary
depends_onso steps run simultaneously -
Use cheaper models —
claude-haiku-4-5for simple classification/extraction - Enable caching — avoid re-running identical prompts
-
Reduce timeout — set
timeout_msper step instead of waiting 30 min default -
Use transforms —
json_extractinstead of asking the LLM to extract
- Reduce
MAX_CONCURRENT_EXECUTIONS - Set
EXECUTION_MAX_AGE_DAYSto a lower value (default: 7) - Large step outputs (>1MB) accumulate in memory — use transforms to reduce size
Use pre_tools to read files and tools: [Write] to create them:
- id: generate tools: [Write] prompt: "Generate code and write to /tmp/output.py" output_var: gen_result - id: review depends_on: [generate] pre_tools: - type: read_file path: "/tmp/output.py" inject_as: code prompt: "Review this code: {code}" output_var: review
pre_tools: - type: env_var var_name: "DATABASE_URL" inject_as: db_url prompt: "Connect to {db_url} and..."
curl -X POST http://localhost:4242/schedules \ -H "Content-Type: application/json" \ -d '{ "label": "Morning briefing", "chainName": "smart-briefing", "input": {"topic": "tech news"}, "cron": "0 8 * * *", "enabled": true }'
- Getting Started — Initial setup
- Chain Format — YAML reference
- Configuration — Environment variables
- Token Optimization — Cost reduction