-
Notifications
You must be signed in to change notification settings - Fork 2.6k
Add AgentLenz — AI agent cost optimization #682
Copy link
Copy link
Open
Description
AgentLenz
URL: https://github.com/AdelElo13/agentlenz
PyPI: pip install agentlenz
Description
Cut your AI agent costs across every provider. Not just observability — optimization. AgentLenz traces agent behavior, detects waste, recommends cheaper model routing, and enforces per-task budgets.
Key Features
- Provider-agnostic: Works with Anthropic, OpenAI, and any LLM provider via SDK wrapping
- Cost tracing: Automatic token/cost tracking per task, per agent, per session
- Model routing optimization: Detects when expensive models are used for simple tasks and recommends cheaper alternatives
- Budget enforcement: Set per-task cost limits that kill runaway agent loops
- Dashboard: Next.js web UI for visualizing agent costs and optimization opportunities
Packages
sdk/— Python SDK (open-source, PyPI:agentlenz)backend/— FastAPI API serverdashboard/— Next.js web dashboard
Quick Start
import agentlenz
import anthropic
agentlenz.init(api_key="alz_...")
client = agentlenz.wrap(anthropic.Anthropic())
# Use client as normal — AgentLenz tracks costs automaticallyCategory suggestion
Developer tools / Observability & Cost optimization
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels