Metadata-Version: 2.4
Name: traeco-sdk
Version: 1.0.2
Summary: AI agent cost intelligence — trace LLM calls, attribute costs, get optimization recommendations.
Author-email: Traeco <hello@traeco.ai>
License: MIT
Project-URL: Homepage, https://traeco.ai
Project-URL: Documentation, https://traeco.ai/docs
Project-URL: Repository, https://github.com/saniagupta124/Agent-Optimization-Platform
Keywords: llm,openai,anthropic,cost,tracing,ai-agents,observability
Classifier: Development Status :: 4 - Beta
Classifier: Intended Audience :: Developers
Classifier: License :: OSI Approved :: MIT License
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.9
Classifier: Programming Language :: Python :: 3.10
Classifier: Programming Language :: Python :: 3.11
Classifier: Programming Language :: Python :: 3.12
Classifier: Topic :: Software Development :: Libraries :: Python Modules
Classifier: Topic :: Scientific/Engineering :: Artificial Intelligence
Requires-Python: >=3.9
Description-Content-Type: text/markdown
Requires-Dist: httpx>=0.24
Provides-Extra: openai
Requires-Dist: openai>=1.0; extra == "openai"
Provides-Extra: anthropic
Requires-Dist: anthropic>=0.20; extra == "anthropic"
Provides-Extra: all
Requires-Dist: openai>=1.0; extra == "all"
Requires-Dist: anthropic>=0.20; extra == "all"

# traeco-sdk

Stop paying for AI agent waste. Traeco traces every LLM call, attributes costs per function, and surfaces exactly where to cut spend.

## Install

```bash
pip install traeco-sdk
```

## Quickstart

```python
import traeco
from anthropic import Anthropic

traeco.init(
    api_key="tk_live_...",
    host="https://backend-kynarochlani-4185s-projects.vercel.app",
    agent_name="my-agent",
)

client = traeco.wrap(Anthropic())

# Your existing code — unchanged
response = client.messages.create(model="claude-sonnet-4-6", ...)
```

## Per-function cost breakdown

```python
@traeco.span("market_analysis")
def analyze(data):
    return client.messages.create(...)

@traeco.span("trade_decision")
def decide(analysis):
    return client.messages.create(...)
```

Each `@span` becomes its own row in the dashboard — cost, tokens, latency, and recommendations per function.

## Works with OpenAI too

```python
from openai import OpenAI
client = traeco.wrap(OpenAI())
```

## Environment variable

```python
import os
traeco.init(api_key=os.getenv("TRAECO_API_KEY"), ...)
```

## Full docs

See [DOCS.md](../DOCS.md) for the complete reference including Claude Code integration prompts.
