Diagnostics
CompozyOS Diagnostics HTTP endpoints.
7 endpoints32 pages in API Reference
Endpoints7
- GET
/api/daemon/profile/{kind}Capture a runtime profile over the local socket - GET
/api/doctorRun runtime diagnostics - POST
/api/drainStop admitting new work - GET
/api/openapi.jsonGet the running daemon's OpenAPI document - GET
/api/statusGet the runtime status snapshot - GET
/api/status/identityGet the bounded runtime identity - POST
/api/undrainResume admission of new work
GET/api/daemon/profile/{kind}
Capture a runtime profile over the local socket
uds
Path parameters
kind*stringValue in
"cpu""heap""allocs""goroutine""mutex""block""threadcreate"Query parameters
seconds?integerCapture window for cpu, mutex and block only; snapshot profiles reject this parameter
Format
int32Range
1 <= value <= 120Default
30Responses
- 200
- Raw gzip-compressed pprof protobuf
- 400
- daemon_profile_invalid: unsupported kind or duration
- 409
- profile_busy: CPU or contention capture already active
- 500
- profile_failed: capture canceled or failed
Response body
Raw gzip-compressed pprof protobuf
response?unknownapplication/octet-streamRequest
curl -X GET 'http://localhost:2123/api/daemon/profile/cpu'200 Raw gzip-compressed pprof protobuf
nullGET/api/doctor
Run runtime diagnostics
httpuds
Query parameters
only?stringComma-separated probe ids or categories to include
exclude?stringComma-separated probe ids or categories to exclude
quiet?booleanOmit OK diagnostics
Responses
- 200
- OK
- 500
- Internal server error
Response body
OK
application/json- response
duration_ms*integerFormat
int64generated_at*stringFormat
date-timeitems*array<>schema_version*stringstatus*stringsummary*Request
curl -X GET 'http://localhost:2123/api/doctor'200 OK
{ "duration_ms": 0, "generated_at": "2019-08-24T14:15:22Z", "items": [ { "category": "string", "code": "string", "data_freshness": "string", "doc_url": "string", "evidence": { "property1": null, "property2": null }, "id": "string", "message": "string", "severity": "string", "suggested_command": "string", "title": "string" } ], "schema_version": "string", "status": "string", "summary": { "counts_by_severity": { "property1": 0, "property2": 0 }, "total": 0 }}POST/api/drain
Stop admitting new work
httpuds
Responses
- 200
- OK
- 500
- Internal server error
- 503
- Daemon drain controller is unavailable
Response body
OK
application/json- response
active_session_executions*integeractive_task_claims*integeradmission_closed*booleanauthoritative_claims_settled*booleansafe_to_stop*booleansession_execution_settled*booleanstate*stringValue in
"active""draining"Request
curl -X POST 'http://localhost:2123/api/drain'200 OK
{ "active_session_executions": 0, "active_task_claims": 0, "admission_closed": true, "authoritative_claims_settled": true, "safe_to_stop": true, "session_execution_settled": true, "state": "active"}GET/api/openapi.json
Get the running daemon's OpenAPI document
httpuds
Header parameters
If-None-Match?stringPreviously returned document ETag
Accept-Encoding?stringUse gzip to request compressed document bytes
Responses
- 200
- Release OpenAPI JSON; optionally gzip encoded
- 304
- ETag matched; response body is empty
- 500
- Internal server error
Response body
Release OpenAPI JSON; optionally gzip encoded
response?unknownapplication/jsonRequest
curl -X GET 'http://localhost:2123/api/openapi.json'200 Release OpenAPI JSON; optionally gzip encoded
nullGET/api/status
Get the runtime status snapshot
httpuds
Responses
- 200
- OK
- 500
- Internal server error
Response body
OK
application/json- response
automation*config*daemon*generated_at*stringFormat
date-timehealth*log_tail*mcp_servers?array<>otel?|providers?array<>schema_version*stringsessions*skills*subprocess_health*tasks*Request
curl -X GET 'http://localhost:2123/api/status'200 OK
{ "automation": { "enabled": true, "jobs": { "enabled": 0, "total": 0 }, "next_fire": "2019-08-24T14:15:22Z", "scheduled_jobs": [ { "catch_up_policy": "skip_missed", "consecutive_resume_failures": 0, "job_id": "string", "last_fire_id": "string", "last_misfire_at": "2019-08-24T14:15:22Z", "last_run_at": "2019-08-24T14:15:22Z", "last_scheduled_at": "2019-08-24T14:15:22Z", "misfire_count": 0, "misfire_grace_seconds": 0, "next_run_at": "2019-08-24T14:15:22Z", "registered": true, "updated_at": "2019-08-24T14:15:22Z" } ], "scheduler_running": true, "triggers": { "enabled": 0, "total": 0 } }, "config": { "apply_state": "string", "config_file": "string", "diagnostics": [ { "code": "string", "layer": "string", "message": "string", "path": "string", "profile": "string" } ], "home_dir": "string", "restart_required": true, "status": "string", "validated": true, "validation_error": "string" }, "daemon": { "active_sessions": 0, "gateway": { "addresses": [ { "address": "string", "live": true, "tier": "string" } ], "bindings": [ { "confirmed_at": "2019-08-24T14:15:22Z", "confirmed_endpoint_generation": 0, "enable_path": "string", "endpoint_generation": 0, "reachability": "string", "scope_kind": "string", "subject_id": "string", "subject_kind": "string", "url": "string", "workspace_id": "string" } ], "changed": true, "devices": [ { "actor_kind": "string", "created_at": "2019-08-24T14:15:22Z", "id": "string", "last_seen_at": "2019-08-24T14:15:22Z", "name": "string", "pairing_origin": "string", "revoke_epoch": 0, "revoked_at": "2019-08-24T14:15:22Z" } ], "enabled": true, "providers": [ { "cause": "string", "desired": "string", "generation": 0, "health": "string", "name": "string", "observed": "string", "tier": "string" } ], "refusal": { "cause": "string", "fix": "string" }, "surfaces": [ { "desired": "string", "generation": 0, "observed": "string", "surface": "string", "tier": "string" } ], "tiers": [ { "advertised": true, "desired": "string", "listener_address": "string", "observed": "string", "tier": "string" } ] }, "http_host": "string", "http_port": 0, "min_app_version": "string", "pid": 0, "readiness": { "phase": "string", "since": "2019-08-24T14:15:22Z", "step": "string" }, "schema_streams": [ { "applied_count": 0, "stream": "string", "sum_digest": "string", "version": 0 } ], "socket": "string", "started_at": "2019-08-24T14:15:22Z", "status": "string", "total_sessions": 0, "user_home_dir": "string", "version": "string" }, "generated_at": "2019-08-24T14:15:22Z", "health": { "active_agents": 0, "active_sessions": 0, "activities": [ { "current_tool": "string", "deadline_at": "2019-08-24T14:15:22Z", "elapsed_ms": 0, "elapsed_seconds": 0, "idle_seconds": 0, "iteration_current": 0, "iteration_max": 0, "last_activity_at": "2019-08-24T14:15:22Z", "last_activity_detail": "string", "last_activity_kind": "string", "last_progress_at": "2019-08-24T14:15:22Z", "session_id": "string", "stall_reason": "string", "stall_state": "string", "status": "string", "tool_call_id": "string", "turn_id": "string", "turn_source": "string", "turn_started_at": "2019-08-24T14:15:22Z" } ], "agent_probes": [ { "agent_name": "string", "checked_at": "2019-08-24T14:15:22Z", "command": "string", "duration_ms": 0, "error": "string", "executable": "string", "provider": "string", "status": "string" } ], "failures": { "by_kind": { "property1": 0, "property2": 0 }, "recent": [ { "agent_name": "string", "crash_bundle_path": "string", "failure_kind": "string", "provider": "string", "session_id": "string", "state": "string", "summary": "string", "updated_at": "2019-08-24T14:15:22Z", "workspace_id": "string" } ], "status": "string", "total": 0 }, "global_db_size_bytes": 0, "persistence": { "global_db_size_bytes": 0, "session_db_size_bytes": 0, "status": "string" }, "retention": { "deleted_event_summaries": 0, "deleted_permission_log_rows": 0, "deleted_token_stats": 0, "deleted_token_usage_daily": 0, "enabled": true, "last_cutoff_at": "2019-08-24T14:15:22Z", "last_sweep_at": "2019-08-24T14:15:22Z", "last_sweep_error": "string", "last_sweep_status": "string", "retention_days": 0, "sweep_interval_seconds": 0 }, "session_db_size_bytes": 0, "status": "string", "uptime_seconds": 0, "version": "string" }, "log_tail": { "available": true, "status": "string" }, "mcp_servers": [ { "auth_status": "string", "configured": true, "diagnostic": "string", "initialized": true, "name": "string", "probe": "string", "reason": "string", "runtime_status": "string", "scope": "string", "state": "string", "tool_count": 0, "transport": "string", "workspace_id": "string" } ], "otel": { "dropped_spans": 0, "endpoint_host": "string", "forward_to_providers": true, "metrics": { "enabled": true, "failed_exports": 0, "last_error_class": "string", "last_export_at": "2019-08-24T14:15:22Z" }, "protocol": "string", "sample_ratio": 0.1, "state": "string", "traces": { "enabled": true, "failed_exports": 0, "last_error_class": "string", "last_export_at": "2019-08-24T14:15:22Z" } }, "providers": [ { "code": "string", "default": true, "display_name": "string", "env_policy": "string", "home_policy": "string", "last_probe_at": "2019-08-24T14:15:22Z", "login": { "configured": true, "executable": "string", "presence": "present", "recommended_action": "install_cli", "source": "auth_login_command" }, "message": "string", "mode": "string", "name": "string", "state": "string", "status_command": "string" } ], "schema_version": "string", "sessions": { "active": 0, "by_badge": { "property1": 0, "property2": 0 }, "by_status": { "property1": 0, "property2": 0 }, "total": 0 }, "skills": { "diagnostics": [ { "activation_reasons": [ { "code": "platform_mismatch", "gate": "string", "message": "string", "missing": [ "string" ] } ], "failure": { "actual_hash": "string", "code": "string", "expected_hash": "string", "message": "string" }, "name": "string", "path": "string", "source": "string", "state": "valid", "verification_status": "passed", "warnings": [ { "message": "string", "pattern": "string", "severity": "string" } ], "winning_path": "string", "winning_source": "string" } ], "disabled_count": 0, "discovered_count": 0, "runtime_available": true }, "subprocess_health": { "healthy": 0, "monitored": 0, "sessions": [ { "agent_name": "string", "consecutive_failures": 0, "last_checked_at": "2019-08-24T14:15:22Z", "reason": "string", "session_id": "string", "workspace_id": "string" } ], "status": "string", "unhealthy": 0 }, "tasks": { "active_orphan_runs": 0, "forced_stops_since_start": 0, "oldest_queue_age_ms": 0, "oldest_queued_at": "2019-08-24T14:15:22Z", "owner_totals": [ { "count": 0, "owner_kind": "string", "owner_ref": "string" } ], "queue_depth": [ { "count": 0, "oldest_queue_age_ms": 0, "oldest_queued_at": "2019-08-24T14:15:22Z" } ], "queue_depth_total": 0, "recovery_since_start": { "failed": 0, "marked_running": 0, "requeued": 0 }, "run_totals": [ { "count": 0, "origin_kind": "string", "status": "string" } ], "status": "string", "stuck_runs": [ { "age_ms": 0, "origin_kind": "string", "run_id": "string", "session_id": "string", "status": "string", "task_id": "string" } ], "task_totals": [ { "count": 0, "scope": "string", "status": "string" } ] }}GET/api/status/identity
Get the bounded runtime identity
httpuds
Responses
- 200
- OK
Response body
OK
application/json- response
daemon*schema_version*stringRequest
curl -X GET 'http://localhost:2123/api/status/identity'200 OK
{ "daemon": { "http_host": "string", "http_port": 0, "pid": 0, "started_at": "2019-08-24T14:15:22Z", "user_home_dir": "string", "version": "string" }, "schema_version": "string"}POST/api/undrain
Resume admission of new work
httpuds
Responses
- 200
- OK
- 500
- Internal server error
- 503
- Daemon drain controller is unavailable
Response body
OK
application/json- response
active_session_executions*integeractive_task_claims*integeradmission_closed*booleanauthoritative_claims_settled*booleansafe_to_stop*booleansession_execution_settled*booleanstate*stringValue in
"active""draining"Request
curl -X POST 'http://localhost:2123/api/undrain'200 OK
{ "active_session_executions": 0, "active_task_claims": 0, "admission_closed": true, "authoritative_claims_settled": true, "safe_to_stop": true, "session_execution_settled": true, "state": "active"}