@fsdevninja/ninja-bridge
v0.4.0
Published
Bridge your AI agents to Ninja Agents dashboard
Maintainers
Readme
@ninjaagents/bridge
Bridge your AI agents to the Ninja Agents dashboard for real-time monitoring.
Installation
npm install -g @ninjaagents/bridgeQuick Start
Configure the bridge:
ninja-bridge configStart the bridge:
ninja-bridge start
Commands
ninja-bridge start
Start the bridge to forward events from Clawdbot to Ninja Agents.
# Use saved config
ninja-bridge start
# Override with CLI options
ninja-bridge start --api-key sk_xxx --ninja ws://localhost:8787/agent
# Use environment variables
API_KEY=sk_xxx ninja-bridge startOptions:
-c, --clawdbot <url>- Clawdbot gateway URL (default:ws://127.0.0.1:18789)-n, --ninja <url>- Ninja Agents gateway URL (default:ws://localhost:8787/agent)-k, --api-key <key>- Ninja Agents API key-a, --agent-id <id>- Agent ID
ninja-bridge config
Interactive configuration wizard. Saves to ~/.ninja-agents/bridge.json.
ninja-bridge configninja-bridge status
Show current configuration and environment variables.
ninja-bridge statusEnvironment Variables
| Variable | Description |
|----------|-------------|
| CLAWDBOT_GATEWAY | Clawdbot gateway WebSocket URL |
| CLAWDBOT_GATEWAY_TOKEN | Clawdbot authentication token |
| NINJAAGENTS_GATEWAY | Ninja Agents gateway WebSocket URL |
| API_KEY | Ninja Agents API key |
| AGENT_ID | Agent identifier |
Programmatic Usage
import { NinjaAgentsBridge } from "@ninjaagents/bridge";
const bridge = new NinjaAgentsBridge({
clawdbotGateway: "ws://127.0.0.1:18789",
ninjaAgentsGateway: "ws://localhost:8787/agent",
apiKey: "sk_xxx",
agentId: "my_agent",
}, {
onConnect: () => console.log("Connected!"),
onEvent: (event) => console.log("Event:", event.type),
});
await bridge.start();License
MIT
