Package Exports
- @fsdevninja/ninja-bridge
- @fsdevninja/ninja-bridge/dist/index.js
This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (@fsdevninja/ninja-bridge) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.
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 config
Start 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