Skip to main content

Overview

The Agent Discovery service automatically registers and tracks agents as they send telemetry to the platform. No manual configuration required - agents are discovered from run data and enriched with real-time metrics.

Automatic registration

When an agent sends its first run via the ingest endpoint, the platform automatically:
  1. Creates an agent record with agent_id from the run
  2. Tracks first seen and last seen timestamps
  3. Begins calculating metrics (runs, actions, costs, success rates)
  4. Monitors intervention and approval rates

Agent endpoints

List agents

Query parameters:
  • agent_id (optional): Filter by agent ID (partial match)
  • sort_by (optional): Sort field - last_seen, first_seen, total_runs, total_cost, intervention_rate
  • sort_order (optional): asc or desc (default: desc)
Example:
Response:

Get agent details

Returns detailed agent information including calculated metrics.

Get agent statistics

Returns comprehensive statistics:

Update agent metadata

Update display name and description (agents cannot be manually created or deleted):
Only display_name and description can be updated. All other fields are automatically calculated from run data.

Calculated metrics

The platform automatically calculates:

Activity metrics

  • Total runs: Count of all runs
  • Total actions: Count of all actions across runs
  • Total cost: Sum of costs (USD)
  • Success rate: Percentage of successful actions
  • Average cost per run: Mean cost per run
  • Average actions per run: Mean actions per run

Intervention metrics

  • Intervention rate: Percentage of actions that triggered interventions
  • Interventions count: Total number of interventions
  • High-risk blocks: Count of critical/high-risk interventions prevented

Approval metrics

  • Total approvals: Count of approval requests
  • Pending approvals: Currently pending approval requests
  • Approval rate: Percentage of approvals granted
  • Average decision time: Mean time to approve/reject (seconds)

Recent activity

  • Last 24 hours: Runs, actions, cost
  • Last 7 days: Runs, actions, cost
  • Last 30 days: Runs, actions, cost

Temporal data

  • Days active: Count of unique days with activity
  • First seen: Timestamp of first run
  • Last seen: Timestamp of most recent run

Filtering agents in the UI

In the web console, navigate to Agents page to:
  • View all discovered agents
  • Sort by activity, cost, or intervention rate
  • Click an agent to see detailed statistics
  • Edit display name and description
  • View recent runs for an agent
  • Link to agent’s actions in Activity Ledger

Gateway decisions

Lists the gateway’s decision rows (every allow, deny and require_approval returned by POST /api/v1/gateway/authorize or an approval redemption), newest first, with each row’s reason code, budget reservation state, budget headroom and per-row integrity. Read-only. Query parameters:
  • agent_id (optional): Only this agent’s decisions. Ignored for agent-bound API keys.
  • decision (optional): allow, deny or require_approval
  • limit (optional): Integer from 1 to 200 (default: 50)
  • before_seq (optional): Integer ≥ 1. Only rows with seq below this value. Pass the previous page’s next_before_seq.
Any other value is rejected with 422. Scope:
  • A user session sees its active organization.
  • An API key sees the key’s organization. A key with no organization sees no decisions.
  • An agent-bound API key sees only its own agent’s decisions, whatever agent_id is passed.
Example:
Response:
  • reserved_usd, reservation_status (reserved, reconciled or released) and actual_cost_usd come from the decision’s budget reservation in the same organization; they are null when the decision held none.
  • remaining_usd is the monthly budget headroom recorded at decision time, null when none was recorded (for example, a deny, or no monthly budget).
  • hash_ok recomputes the row’s hash and compares it with the stored row_hash. signature_ok verifies the row’s signature against the platform key: null for an unsigned row, and false for a signed row when the platform has no signing key configured.
  • next_before_seq is null on the last page.
Per-row integrity tells you whether a single decision was altered. To verify that no rows were removed or reordered, use whole-chain verification: GET /api/v1/ledger/verify.

Agent scoping

Agents are scoped to organizations - each organization sees only their agents. Use the agent discovery system to:
  • Monitor agent performance across your fleet
  • Identify high-cost agents
  • Track agents with high intervention rates (indicating policy issues)
  • Analyze approval patterns by agent

Best practices

Use meaningful agent_id values: Agent IDs should be descriptive and unique (e.g., “trading-bot-prod”, “customer-support-agent-v2”).
Add display names: Update agents with human-readable display names and descriptions for easier identification in the UI.
Monitor intervention rates: High intervention rates indicate agents attempting actions blocked by policies - review and adjust either agent logic or policies.
Agent IDs cannot be changed: Once an agent sends its first run, its agent_id is permanent. Plan your naming scheme carefully.

See also