Skip to content

AgentGateHuman-in-the-loop approvals for AI agents

A standardized way for AI agents to request and receive human approvals for sensitive actions.

AgentGate

Quick Example

typescript
import { AgentGateClient } from '@agentgate/sdk'

const client = new AgentGateClient({
  baseUrl: 'http://localhost:3000',
  apiKey: process.env.AGENTGATE_API_KEY,
})

// Request approval for a sensitive action
const request = await client.request({
  action: 'send_email',
  params: { to: 'customer@example.com', subject: 'Order shipped!' },
  urgency: 'normal',
})

// Wait for human decision
const decided = await client.waitForDecision(request.id)

if (decided.status === 'approved') {
  await sendEmail(decided.params)
}

Released under the MIT License.