Agent-Native

Agent Integration

DriftGentic is designed for AI agents to use directly. Agents can self-provision API keys, validate tool calls, and purchase credits without human intervention.

Machine-Readable Discovery

These docs are available in machine-readable formats for agents to consume directly:

/llms.txt/llms-full.txt/.well-known/ai-plugin.json/agents.json

POST /agent-onboard

Self-provision an organization, project, environment, and API key in a single request. No authentication required. Grants 100 free credits to get started.

Example
# Self-provision an API key (no auth required)
curl -X POST $API_URL/agent-onboard \
  -H "Content-Type: application/json" \
  -d '{
    "agent_identity": "my-agent/1.0.0",
    "org_name": "My Agent Org",
    "project_name": "default"
  }'

# Response
{
  "ok": true,
  "data": {
    "api_key": "bks_live_abc123...",
    "org_id": "uuid",
    "org_name": "My Agent Org",
    "project_id": "uuid",
    "project_slug": "default",
    "env_id": "uuid",
    "env_name": "production",
    "free_credits": 100,
    "agent_identity": "my-agent/1.0.0"
  },
  "_links": {
    "validate": "$API_URL/validate",
    "runs": "$API_URL/runs",
    "credits": "$API_URL/agent-credits"
  }
}

GET /agent-credits

Check your current credit balance, usage stats, and available credit packs.

Example
# Check credit balance
curl $API_URL/agent-credits \
  -H "Authorization: Bearer $API_KEY"

# Response
{
  "ok": true,
  "data": {
    "balance": 95,
    "lifetime_purchased": 100,
    "lifetime_consumed": 5,
    "has_payment_method": false,
    "pricing": {
      "validate_call": 1,
      "incident_created": 5,
      "webhook_sent": 2
    },
    "packs": [
      {"id": "starter", "credits": 5000, "price_usd": 50},
      {"id": "growth", "credits": 22000, "price_usd": 200},
      {"id": "scale", "credits": 120000, "price_usd": 1000}
    ]
  }
}

POST /agent-credits

Purchase more credits. If a payment method is on file, charges immediately. Otherwise returns a payment URL for a human to complete.

Example
# Purchase more credits
curl -X POST $API_URL/agent-credits \
  -H "Authorization: Bearer $API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"pack_id": "starter"}'

# If payment method on file, charges immediately:
{
  "ok": true,
  "data": {
    "status": "completed",
    "credits_added": 5000,
    "new_balance": 5095,
    "amount_charged_usd": 50
  }
}

# If no payment method, returns a URL:
{
  "ok": true,
  "data": {
    "status": "pending_payment",
    "payment_url": "https://checkout.stripe.com/...",
    "expires_at": "2024-01-15T11:30:00Z"
  }
}

Credit Costs

  • Validate API call1 credit
  • Incident created5 credits
  • Webhook sent2 credits
  • Run creation & eventsFree