Files
agentlens/packages/sdk-python
Vectry 1989366844 fix: OpenAI wrapper - remove duplicate span block, fix tool call extraction, fix cost model matching
- Remove duplicate span append + tool call decision logging block (lines 328-426)
- Fix _extract_tool_calls_from_response to use getattr() instead of .get() on objects
- Fix _calculate_cost to use exact match first, then longest-prefix match (prevents gpt-4o-mini matching gpt-4 pricing)
- Fix test mock setup: set return_value BEFORE wrap_openai() so wrapper captures correct original
- All 11 OpenAI integration tests + 8 SDK tests passing (19/19)
2026-02-10 00:48:48 +00:00
..

AgentLens Python SDK

AgentLens provides observability for AI agents by tracing decisions, not just API calls.

Installation

pip install agentlens

Quick Start

from agentlens import init, trace

# Initialize AgentLens
init(api_key="your-api-key", endpoint="https://agentlens.vectry.tech")

# Trace your agent functions
@trace(name="research-agent")
async def research(topic: str) -> str:
    return f"Researching: {topic}"

Features

  • Decision Tracing: Log and visualize agent decisions with alternatives
  • Context Awareness: Monitor context window utilization
  • Cost Intelligence: Track token usage and costs per operation
  • Integrations: Native support for LangChain and OpenAI

Documentation

Full documentation available at https://agentlens.vectry.tech/docs

License

MIT © 2026 Vectry