@chiron-ai/bridge
v0.1.0
Published
Local bridge daemon — connects your local AI agent to AF Engineers
Downloads
179
Maintainers
Readme
@chiron/bridge — Local Agent Bridge
What it is
@chiron/bridge is a CLI daemon the client installs once on their machine. It polls AF Engineers for pending tasks, executes them locally using the client's own agent (with all their MCPs, credentials, and environment intact), and returns the result to AF.
Why
Clients already have configured agents — Claude Code with their Figma MCP, Cursor with GitHub tools, etc. They don't want to reconfigure everything in AF. The bridge lets their existing local agent receive AF tasks without exposing a public URL.
Architecture
AF Engineers (cloud)
└─ /external/agents/:id/inbox ← bridge polls here
└─ /external/tasks/:id/result ← bridge POSTs result here
Client machine
└─ chiron-bridge (daemon)
└─ adapter (claude | opencode | codex | bash)
└─ executes task with full local env (MCPs, secrets, tools)Adapters
| Adapter | Runs | When to use |
|------------|------------------------------------------------|------------------------------------|
| claude | claude --print "<task>" | Claude Code CLI installed |
| opencode | opencode run --print "<task>" | OpenCode installed |
| codex | codex --approval-mode full-auto "<task>" | Codex CLI installed |
| bash | ~/.chiron/run.sh with TASK_* env vars | Custom script / any other agent |
Setup
# 1. Install (once, globally)
npm install -g @chiron/bridge
# 2. Init — get agent_id and integration_code from AF > Agent Settings > API Key
chiron-bridge init \
--agent-id <your-agent-id> \
--token <integration-code> \
--url https://your-af-instance.com \
--adapter claude \
--work-dir /path/to/your/project
# 3. Run as daemon
chiron-bridge start
# Check config
chiron-bridge statusConfig file
Stored at ~/.chiron/config.json:
{
"agent_id": "abc123",
"integration_code": "ic_...",
"af_url": "https://af.yourcompany.com",
"adapter": "claude",
"poll_interval_ms": 5000,
"work_dir": "/Users/you/dev/project"
}Running as a system daemon
macOS (launchd)
Create ~/Library/LaunchAgents/com.chiron.bridge.plist:
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>Label</key>
<string>com.chiron.bridge</string>
<key>ProgramArguments</key>
<array>
<string>/usr/local/bin/chiron-bridge</string>
<string>start</string>
</array>
<key>RunAtLoad</key>
<true/>
<key>KeepAlive</key>
<true/>
<key>StandardOutPath</key>
<string>/tmp/chiron-bridge.log</string>
<key>StandardErrorPath</key>
<string>/tmp/chiron-bridge.log</string>
</dict>
</plist>launchctl load ~/Library/LaunchAgents/com.chiron.bridge.plistLinux (systemd)
[Unit]
Description=Chiron Bridge — AF local agent daemon
[Service]
ExecStart=/usr/local/bin/chiron-bridge start
Restart=on-failure
[Install]
WantedBy=default.targetsystemctl --user enable chiron-bridge
systemctl --user start chiron-bridgeAF side — how to configure the agent
In AF Engineers > Agent Settings:
- Set Agent Type to
External - Set Mode to
Polling(bridge polls, no public URL needed) - Leave Agent URL blank or set to your AF instance
- Copy the API Key — this is the
integration_codefor the bridge
Relationship to External Agents (Caso A vs Caso B)
| Case | Agent type | How tasks get to the agent | |------|------------------|-------------------------------------| | A | External (webhook) | AF POSTs directly to agent URL | | B | External (polling) | Bridge polls AF, executes locally |
The bridge covers Caso B: agents that live locally and can't receive inbound HTTP.
Package location
packages/chiron-bridge/
src/
index.ts — CLI entry point (init | start | status)
config.ts — load/save ~/.chiron/config.json
poller.ts — poll inbox loop, dispatch to adapter, submit result
adapters/
base.ts — AgentAdapter interface
claude-local.ts — runs `claude --print`
opencode-local.ts
codex-local.ts
bash-local.ts — runs ~/.chiron/run.sh
package.json
tsconfig.json