🛡️
Policy Engine
Auto-approve, auto-deny, or route to humans based on configurable rules.
A standardized way for AI agents to request and receive human approvals for sensitive actions.
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)
}