Skip to content

[roadmap/later] External API tracing #883

@vivekchand

Description

@vivekchand

What the roadmap promises

External API tracing

Listed under the Planned section as of 2026-05-05.

What this means in concrete terms

Capture and visualise outbound HTTP calls made by an agent session to all external APIs — not just LLM providers (already tracked via clawmetry/interceptor.py) but any third-party service: GitHub, Slack, weather APIs, custom webhooks. Each call should be linked to its originating session and show: host, method, status code, latency, and an optional request/response summary. The goal is to answer "what external services did my agent call, at what latency, and did any fail?"

Where in the codebase

Likely affects:

  • clawmetry/interceptor.py (~465 lines) — already patches httpx/requests; needs scope expansion beyond LLM hosts to all outbound calls
  • routes/sessions.py — link captured HTTP calls to sessions by correlation ID or thread context
  • dashboard.py — new panel: "External API calls" with host, latency, status timeline (fits in Flow or Security tab)

How we'll know it shipped

  • All outbound HTTP calls (not just LLM providers) are captured by the interceptor and queryable via GET /api/external-calls?session=<id>
  • Session detail view shows outbound API call log: host, method, status, latency, timestamp
  • Aggregated view on Tokens/Usage tab: top external hosts by call count + total latency
  • Opt-out mechanism to exclude specific hosts from capture (privacy/noise control)
  • No performance regression: interceptor overhead remains < 1 ms per call

Sizing

Estimated complexity: MEDIUM: 2-3 filesinterceptor.py already does the monkey-patching; scope expansion + session correlation is the core work.

Bot meta

Filed by the weekly roadmap reconciler. The triage bot will leave it alone (already labelled triaged). The autofix bot may pick this up if SMALL.

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions