Skip to main content

AI Agent Observability โ€” trace, monitor & debug your AI agents in real-time

Project description

๐Ÿ”ญ AgentixLens

AI Agent Observability โ€” trace, monitor, and debug your AI agents in real-time.

License: MIT Python 3.9+ FastAPI

๐ŸŒ Website ยท ๐Ÿ“Š Dashboard ยท ๐Ÿฆ Twitter


What is AgentixLens?

AgentixLens gives you a transparent window into every decision your AI agents make.

  • Visual Trace Explorer โ€” every LLM call, tool use, and decision branch in a waterfall
  • Cost & Token Tracking โ€” per-run, per-model, per-tool granularity
  • Latency Heatmaps โ€” p50/p95/p99 across your entire agent fleet
  • Failure Capture & Replay โ€” reproduce any failed run with full context
  • Model-Agnostic โ€” works with any LLM, zero vendor lock-in

Repo Structure

agentixlens/
โ”œโ”€โ”€ index.html          # Landing page (deployed to Netlify)
โ”œโ”€โ”€ dashboard.html      # Dashboard UI (deployed to Netlify)
โ”œโ”€โ”€ netlify.toml        # Netlify config
โ”œโ”€โ”€ backend/            # FastAPI backend (deploy to Railway/Render/Fly)
โ”‚   โ”œโ”€โ”€ main.py
โ”‚   โ”œโ”€โ”€ requirements.txt
โ”‚   โ”œโ”€โ”€ Dockerfile
โ”‚   โ”œโ”€โ”€ .env.example    # Copy to .env and fill in values
โ”‚   โ”œโ”€โ”€ db/
โ”‚   โ”œโ”€โ”€ models/
โ”‚   โ”œโ”€โ”€ routers/
โ”‚   โ””โ”€โ”€ middleware/
โ””โ”€โ”€ sdk/                # Python SDK (publish to PyPI)
    โ”œโ”€โ”€ agentixlens/
    โ”œโ”€โ”€ examples/
    โ””โ”€โ”€ tests/

Quick Start

1. Install the SDK

pip install agentixlens

2. Instrument your agent

from agentixlens import lens, trace

lens.init(project="my-agent")

@trace("research-agent")
async def run_agent(query: str) -> str:
    # Your existing agent code โ€” unchanged
    ...

3. Run the backend locally

cd backend
pip install -r requirements.txt
cp .env.example .env        # Fill in your values
uvicorn main:app --reload --port 4317

4. Open the dashboard

Open dashboard.html in your browser โ€” it connects to http://localhost:4317 automatically.


Deployment

Frontend (Netlify) โ€” free

  1. Push this repo to GitHub
  2. Connect to Netlify โ†’ Import from Git
  3. Set Publish directory to . (root)
  4. Set Build command to (empty)
  5. Deploy โ€” index.html and dashboard.html go live instantly

Backend (Railway) โ€” one click

Deploy on Railway

Or manually:

cd backend
railway login
railway up

Set these environment variables on Railway:

ENV=production
AUTH_ENABLED=true
API_SECRET_KEY=<generate with: python -c "import secrets; print(secrets.token_urlsafe(32))">
DASHBOARD_TOKEN=<generate same way>
ALLOWED_ORIGINS=https://agentixlens.com

Backend (Docker)

cd backend
docker build -t agentixlens-backend .
docker run -p 4317:4317 \
  -e API_SECRET_KEY=your-key \
  -e DASHBOARD_TOKEN=your-token \
  -v agentixlens-data:/data \
  agentixlens-backend

SDK Reference

from agentixlens import lens, trace, trace_llm, trace_tool, current_span

# Initialize
lens.init(
    project="my-agent",
    endpoint="https://your-backend.railway.app",
    api_key="ax_...",
    debug=True,
)

# Trace entire agent run
@trace("my-agent", tags={"env": "prod"})
async def run_agent(query: str): ...

# Trace individual LLM call
@trace_llm(model="claude-3-5-sonnet", provider="anthropic")
async def call_llm(messages): ...

# Trace tool calls
@trace_tool("web_search")
async def search(query: str): ...

# Add metadata from inside any function
current_span().set_attribute("user_id", user.id)

LangChain Integration

from agentixlens.integrations.langchain import AgentixLensCallback

llm = ChatOpenAI(callbacks=[AgentixLensCallback()])

Environment Variables

See backend/.env.example for all options.

Variable Required Description
API_SECRET_KEY Yes (prod) SDK authentication key
DASHBOARD_TOKEN Yes (prod) Dashboard UI access token
ENV No development or production
AGENTIXLENS_DB No SQLite path (default: ~/.agentixlens/server.db)
ALLOWED_ORIGINS No Comma-separated CORS origins
AUTH_ENABLED No Set false for local dev

Contributing

  1. Fork the repo
  2. Create a feature branch: git checkout -b feature/my-feature
  3. Run tests: cd sdk && pytest tests/ -v
  4. Commit and push
  5. Open a Pull Request

License

MIT ยฉ 2025 AgentixLens


Built for developers who are tired of flying blind with AI agents.

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

agentixlens-0.1.0.tar.gz (17.8 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

agentixlens-0.1.0-py3-none-any.whl (17.7 kB view details)

Uploaded Python 3

File details

Details for the file agentixlens-0.1.0.tar.gz.

File metadata

  • Download URL: agentixlens-0.1.0.tar.gz
  • Upload date:
  • Size: 17.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.11.8

File hashes

Hashes for agentixlens-0.1.0.tar.gz
Algorithm Hash digest
SHA256 6536f71b4b805fb149eac916b9798dc974b6af12a3e76185ac54109d16da8748
MD5 d7f8c2e4cf2b1328508ff2235e0ae52f
BLAKE2b-256 aa9568a905d86b4e73a6e229036bc669baf9937fb6233e7af671cc1c61b0b33a

See more details on using hashes here.

File details

Details for the file agentixlens-0.1.0-py3-none-any.whl.

File metadata

  • Download URL: agentixlens-0.1.0-py3-none-any.whl
  • Upload date:
  • Size: 17.7 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.11.8

File hashes

Hashes for agentixlens-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 c04907f0954a49bcd6150b4105cc9dd8babbcb993189b2e2fca7aa8e7c23c0a8
MD5 45ae90494626ed762fb3b63ecb99221a
BLAKE2b-256 7d229a41b8e6631c9d260379eb9f8a0180a9c38895abfe497bc3abeb37eb7ffc

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page