Integrating Your First Agent Start Guide

To connect an autonomous agent to BridgeControl, follow these three steps to establish the Human Oversight Layer.

1. Generate Your API Key

Security is our first priority. Every agent must authenticate via a unique Bearer token.

2. Register the Agent (The Handshake)

BridgeControl treats agents as first-class identities. When your agent first connects, it registers itself in your Registry.

The Payload:

Send a POST request to /api/v1/escalations (see https://bridgecontrol.io/api/docs for API schema). Optional: use the agent_name that corresponds to your local process (e.g., refund-agent-01).

curl -X POST <https://bridgecontrol.io/api/v1/escalations> \\
  -H "X-API-KEY: YOUR_GENERATED_KEY" \\
  -H "AGENT-NAME: refund-agent-01" \\
  -H "Content-Type: application/json" \\
  -d '{
		    "escalation": {
		      "title": "Initial Connection",
		      "description": "Agent active and monitoring order mutations.",
		      "context": {"order_id": "12345", "amount": 150},
		      "priority": "high",
			    "status": "pending",
			    "callback_url": { "type": "string", "example": "<https://webhook.com/1234>" },
			    "expires_at": { "type": "string", "format": "date-time" },
			    "reason": { "type": "string", "description": "Human feedback/instruction provided upon resolution" }
		    }
		  }'

3. Implementing the Escalation Loop

Your agent should be programmed to "Pause and Post" whenever it hits a high-stakes decision (e.g., spending over $100, deleting data, or sending a bulk email).

  1. POST the escalation to BridgeControl.
  2. HALT the agent's local execution.
  3. LISTEN for the Webhook callback on your provided callback_url.
  4. RESUME once the status changes to approve or rejected.