Skip to main content

agentlens-server

FastAPI backend for AgentLens — real-time observability for AI agents.

Install

pip install agentlens-server

Run

agentlens-server
# REST API: http://localhost:8766/api/v1
# WebSocket: ws://localhost:8766/ws
# Dashboard: http://localhost:5173 (start separately)

Run from source

git clone https://github.com/ArkFelix7/agentlens
cd agentlens
make install && make dev

API Endpoints

Method Path Description
GET /api/v1/sessions List all sessions
GET /api/v1/traces/{session_id} Get all trace events for a session
POST /api/v1/traces/{session_id} Ingest trace events
GET /api/v1/costs/{session_id} Cost breakdown
GET /api/v1/hallucinations/{session_id} Hallucination alerts
POST /api/v1/hallucinations/{session_id}/detect Run detection
GET /api/v1/memory/{session_id} Memory entries
PATCH /api/v1/memory/entry/{id} Edit memory entry
DELETE /api/v1/memory/entry/{id} Delete memory entry
GET /api/v1/replay/{session_id} Replay event stream
GET /health Health check

WebSocket Protocol

Connect to ws://localhost:8766/ws and send a hello message:

{ "type": "hello", "role": "sdk" }

Roles: "sdk" (agent sending events) or "dashboard" (browser receiving events).

Configuration

Environment variables (all optional):

Variable Default Description
DATABASE_URL sqlite+aiosqlite:///agentlens.db Database URL
HOST 0.0.0.0 Bind address
PORT 8766 Port
CORS_ORIGINS ["*"] Allowed CORS origins

License

MIT

Metadata

Release files for agentlens-server 0.2.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for agentlens-server 0.2.0
File Size Uploaded Provenance Actions
agentlens_server-0.2.0.tar.gz 57.2 kB Without provenance Details for agentlens_server-0.2.0.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for agentlens-server 0.2.0
File Interpreter ABI Platform Actions
agentlens_server-0.2.0-py3-none-any.whl Python 3 none any Details for agentlens_server-0.2.0-py3-none-any.whl

Total release size: 113.8 kB

Release files / agentlens_server-0.2.0.tar.gz

Download URL agentlens_server-0.2.0.tar.gz
Size 57.2 kB
Tags Source
SHA-256 checksum
How to use checksums
507dcfebea407ff04878aaac667e427cf73fae2eca249a634e6006772644ab74
BLAKE2b-256 checksum
How to use checksums
ec776024dd76c1e11734b6223ff91a304ab93a84a1a4dcc2df7967ff4cbda7cb
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.10.5

Release files / agentlens_server-0.2.0-py3-none-any.whl

Download URL agentlens_server-0.2.0-py3-none-any.whl
Size 56.6 kB
Tags Python 3
SHA-256 checksum
How to use checksums
28fd023cc76a0d08c39e832ccb0574fcf358ff120f4803bfb83a84690e7aba00
BLAKE2b-256 checksum
How to use checksums
f810ea63f1ff4f9304adec992f4aab4be506d617728bd2b68aa5c9a4151fc7f0
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.10.5

Security for agentlens-server 0.2.0

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Release history Release notifications | RSS feed

This release

0.2.0 This release

2 release files No provenance

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page