AgentWatch provides clean, OpenAPI-compliant REST endpoints and WebSocket channels for telemetry collection and real-time monitoring.
Base URL: http://localhost:8000 (Default)
Register a new agent instance or update an existing registration.
Request Body:
{
"agent_id": "coding-agent-1",
"name": "Coding Agent",
"model": "gpt-4o",
"system_info": {
"cpu_percent": 15.2,
"memory_mb": 340.5
}
}Send a periodic liveness heartbeat from an agent.
Request Body:
{
"agent_id": "coding-agent-1",
"system_info": {
"cpu_percent": 12.0,
"memory_mb": 310.0
}
}List registered agents with optional status filtering.
Query Parameters:
status(optional): Filter byactive,idle, oroffline.
Record the start of a named task execution.
Request Body:
{
"task_id": "task-8f92a1",
"agent_id": "coding-agent-1",
"name": "Fix authentication bug"
}Record task completion or failure.
Request Body:
{
"task_id": "task-8f92a1",
"agent_id": "coding-agent-1",
"status": "SUCCESS",
"result": "Resolved token verification logic."
}Retrieve historical task execution records.
Query Parameters:
agent_id(optional): Filter by agent ID.status(optional): Filter byRUNNING,SUCCESS, orFAILED.limit(optional, default: 50): Number of records to return.
Log process resource utilization and LLM token counts.
Request Body:
{
"agent_id": "coding-agent-1",
"task_id": "task-8f92a1",
"cpu_percent": 35.2,
"memory_mb": 420.0,
"tokens": 1520,
"prompt_tokens": 1000,
"completion_tokens": 520,
"model": "gpt-4o"
}Fetch recorded metric data points.
Post a log entry from an agent.
Query historical log streams.
Record an exception event, retry attempt, or stack trace.
Retrieve logged error events.
Get high-level summary metrics across agents, tasks, token consumption, and cost.
Aggregated daily, weekly, and monthly cost reports broken down by agent and model.
View active token pricing per 1,000 tokens for supported models.
Register or update custom model pricing.
- Endpoint:
ws://localhost:8000/ws/telemetry - Format: JSON Payload
agent_registerheartbeattask_starttask_endmetriclogerroralert