API Reference
Discovery API
API endpoints for configuring and running knowledge discovery.
Get Discovery Config
GET /agents/{agent_id}/discovery/configGet the current discovery configuration for an agent.
Response: 200
{
"agent_id": "550e8400-...",
"mode": "manual",
"interval_hours": 24,
"max_tokens_per_action": 500,
"daily_action_limit": 3,
"min_compatibility_score": 0.5,
"max_candidates_per_gap": 3,
"last_run_at": null,
"actions_today": 0
}Update Discovery Config
PUT /agents/{agent_id}/discovery/configUpdate discovery settings.
Request Body:
{
"mode": "scheduled",
"interval_hours": 12,
"max_tokens_per_action": 1000,
"daily_action_limit": 5,
"min_compatibility_score": 0.7,
"max_candidates_per_gap": 5
}All fields are optional - only include fields you want to change.
Response: 200 - Updated config
Run Discovery
POST /agents/{agent_id}/discovery/runTrigger an on-demand discovery cycle.
Response: 202
{
"status": "accepted",
"message": "Discovery cycle initiated"
}List Discovery Actions
GET /agents/{agent_id}/discovery/actionsList the history of discovery actions.
Query Parameters:
| Param | Type | Default | Description |
|---|---|---|---|
limit | integer | 20 | Max results |
offset | integer | 0 | Pagination offset |
Response: 200 - ActionSummaryResponse[]
[
{
"id": "abc123",
"agent_id": "550e8400-...",
"action_type": "gap_analysis",
"status": "completed",
"summary": { ... },
"created_at": "2026-03-30T10:00:00Z"
}
]Get Discovery Action
GET /agents/{agent_id}/discovery/actions/{action_id}Get details of a specific discovery action.
Response: 200 - ActionDetailResponse
SDK Equivalent
# Get config
config = await client.discovery.get_config(agent_id="...")
# Update config
config = await client.discovery.configure(
agent_id="...",
mode="scheduled",
interval_hours=12,
)
# Run discovery
result = await client.discovery.run(agent_id="...")
# List actions
actions = await client.discovery.list_actions(agent_id="...")