Record, replay, and debug any HTTP API — with built-in AI traffic intelligence
Project description
Capturly
Record, replay, and debug any HTTP API — with built-in AI traffic intelligence
Capturly is an HTTP proxy that captures, replays, and inspects API traffic. It works with any REST/GraphQL endpoint but goes deeper on AI protocols — automatically detecting OpenAI and AGUI (Agent GUI) traffic, extracting system prompts, combining streaming chunks, and surfacing tool calls.
Quick Start
# Install
pip install capturly
# Point at OpenAI and watch traffic
capturly --mode log --backend https://api.openai.com --combine-chunks
# Open dashboard at http://localhost:9090
# See your system prompts, tool definitions, and complete conversations
Use Cases
Debug AI Applications
See exactly what your app sends to OpenAI:
capturly --mode log --backend https://api.openai.com --combine-chunks
# Configure your app to use http://localhost:9999 instead of api.openai.com
The dashboard extracts:
- System prompts (including multi-part array content)
- Tool definitions and tool calls
- Token usage
- Complete conversation history (streaming chunks combined)
- AGUI agent runs: messages, tool calls, reasoning, and state
Create Deterministic Test Fixtures
Record real API responses, replay them in tests:
# Record once
capturly --mode record --backend https://api.stripe.com
curl http://localhost:9999/v1/charges
# Replay forever (no network, instant, deterministic)
capturly --mode replay
pytest tests/
Performance Testing
Stress test your service with cached responses:
# Replay with zero delay (simulate fast API)
capturly --mode replay --delay 0
# Or simulate slow upstream
capturly --mode replay --delay 2000
Development Speedup
Cache common endpoints, record new ones automatically:
capturly --mode hybrid --backend https://api.example.com
# First request: hits backend, caches response
# Subsequent requests: instant replay from cache
Dashboard
The built-in web dashboard (default: http://localhost:9090) provides:
- Traffic list with filtering (All / AI / Non-AI), pagination, and protocol badges (AI, AGUI, SSE)
- AI detail view — system prompts, tool definitions, message history, assistant response, token usage
- AGUI detail view — run metadata, reconstructed messages, tool calls with parsed arguments, reasoning, state snapshots
- Generic detail view — collapsible request/response bodies and headers
- Truncate — clear the traffic log with one click
Modes
| Mode | Behavior | Use When |
|---|---|---|
record |
Proxy to backend, save responses | Capturing test fixtures |
replay |
Return saved responses (no backend) | Running tests, offline dev |
hybrid |
Replay if cached, record if new | Day-to-day development |
log |
Proxy and persist full traffic | Debugging, AI inspection |
Configuration
CLI arguments:
capturly --mode log --backend https://api.openai.com --port 8080
Environment variables:
export CAPTURLY_RECORDINGS_DIR=./recordings
capturly --mode record --backend https://api.example.com
Installation
pip install capturly
Requirements: Python 3.9+
Documentation
- Getting Started — 5-minute tutorial
- Mode Reference — Detailed behavior of each mode
- Configuration — All options, all sources
Contributing
Contributions welcome! See CONTRIBUTING.md for guidelines.
License
MIT License - see LICENSE file.
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file capturly-0.4.0.tar.gz.
File metadata
- Download URL: capturly-0.4.0.tar.gz
- Upload date:
- Size: 158.8 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/7.0.0 CPython/3.13.14
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
8cda3cf7c2e6970ae4afc4b4ba136eca98577f933311ee449a46b2e8425cddc4
|
|
| MD5 |
ef8fa13e1d8e9eb846d1550087f8cbf6
|
|
| BLAKE2b-256 |
8f974acb4db5d54b5928b11786c0a2d94dc43c1f7bd04b4005e0b8408e1e80f3
|
Provenance
The following attestation bundles were made for capturly-0.4.0.tar.gz:
Publisher:
publish.yml on vikrant82/capturly
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
capturly-0.4.0.tar.gz -
Subject digest:
8cda3cf7c2e6970ae4afc4b4ba136eca98577f933311ee449a46b2e8425cddc4 - Sigstore transparency entry: 2291410071
- Sigstore integration time:
-
Permalink:
vikrant82/capturly@9c3abe2be21cdb65cb4555b4836a6595cb75ee76 -
Branch / Tag:
refs/tags/v0.4.0 - Owner: https://github.com/vikrant82
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@9c3abe2be21cdb65cb4555b4836a6595cb75ee76 -
Trigger Event:
push
-
Statement type:
File details
Details for the file capturly-0.4.0-py3-none-any.whl.
File metadata
- Download URL: capturly-0.4.0-py3-none-any.whl
- Upload date:
- Size: 37.7 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/7.0.0 CPython/3.13.14
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
367d1ab99f59812ad13e6d4bb5004508bcfba6851f4c55f0eb687b20fb2f6020
|
|
| MD5 |
e483e47f252609070604698398849a46
|
|
| BLAKE2b-256 |
1c94e05e5d9be81b0df196943be5ba01b5f8e328140899c259845a3480c3b97c
|
Provenance
The following attestation bundles were made for capturly-0.4.0-py3-none-any.whl:
Publisher:
publish.yml on vikrant82/capturly
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
capturly-0.4.0-py3-none-any.whl -
Subject digest:
367d1ab99f59812ad13e6d4bb5004508bcfba6851f4c55f0eb687b20fb2f6020 - Sigstore transparency entry: 2291410087
- Sigstore integration time:
-
Permalink:
vikrant82/capturly@9c3abe2be21cdb65cb4555b4836a6595cb75ee76 -
Branch / Tag:
refs/tags/v0.4.0 - Owner: https://github.com/vikrant82
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@9c3abe2be21cdb65cb4555b4836a6595cb75ee76 -
Trigger Event:
push
-
Statement type: