Overview
Site APIs is the API capture surface in the Allternit platform. It ingests HTTP traffic — from a browser DevTools HAR export or from a live ACI browser capture — and turns that traffic into a typed, replayable API contract. You can inspect endpoints, edit parameters, replay requests live, generate client code in Python, TypeScript, or cURL, and publish the whole workflow as an agent skill in the Skills Registry. The surface is designed for the “I use this web API every day, let me make it an agent tool” workflow: capture once, validate by replaying, then hand the generated client to an agent.How to access it
Site APIs runs inside the platform shell:operator-browser) by starting an API capture session while you navigate a site.
Workflow
The surface is organized around a four-step pipeline:- Upload HAR — drop a
.harJSON file exported from Chrome/Firefox DevTools, or start a live capture. - Extract contract — Allternit parses the traffic and groups endpoints by domain into a
SiteApiContract. - Replay — pick an endpoint, edit path/query params, headers, and body, then send the request live.
- Generate client — export a Python, TypeScript, or cURL client, or publish the contract as an agent skill.
Features
HAR ingestion
Upload a DevTools HAR export or receive one from a live browser/ACI capture
Contract extraction
Automatically derive typed endpoints, path/query params, headers, and body templates
Live replay
Edit values and replay requests against the real host to verify behavior
Client generation
Generate Python, TypeScript, or cURL clients from captured endpoints
Skill publishing
Publish a captured contract as a reusable API skill for agents
Domain organization
Contracts are grouped by domain with per-endpoint hit counts and timestamps
Key concepts
Capture session
A capture session represents one recording of HTTP traffic. Sessions have a source (browser, aci, or upload) and a status (capturing, completed, or failed). Sessions are currently local-only; the derived contracts are persisted in localStorage so they survive reloads.
Site API contract
ASiteApiContract groups all endpoints discovered for a single domain. Each contract contains:
Endpoint
An endpoint is a single HTTP request pattern extracted from traffic:Replay input
When you replay an endpoint, you supply:API skill
Publishing a contract creates anApiSkill entry that agents can use:
localStorage and broadcast via allternit:api-skills-changed so the Skills Registry can pick them up.
Endpoints / commands
Client generation example
Request
Response
Supported client languages
Limitations
- Contracts and published skills are currently stored in browser
localStorage. Backend persistence is planned. - Replay sends requests directly from the browser, so CORS and network policies of the target host apply.
- Live capture sessions (
browser/aci) are visible in the UI but session persistence is not yet backed by the server.