Skip to main content

AI agent cost intelligence — trace LLM calls, attribute costs, get optimization recommendations.

Project description

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

pip install traeco-sdk

Quickstart

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

@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

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

Environment variable

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

Full docs

See DOCS.md for the complete reference including Claude Code integration prompts.

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

traeco_sdk-1.0.2.tar.gz (8.2 kB view details)

Uploaded Source

Built Distribution

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

traeco_sdk-1.0.2-py3-none-any.whl (7.5 kB view details)

Uploaded Python 3

File details

Details for the file traeco_sdk-1.0.2.tar.gz.

File metadata

  • Download URL: traeco_sdk-1.0.2.tar.gz
  • Upload date:
  • Size: 8.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.13.0

File hashes

Hashes for traeco_sdk-1.0.2.tar.gz
Algorithm Hash digest
SHA256 796d4ae9bb25326aeda746b8a3a396cc78c7f4f3a219904aef736d8cdd83c2d2
MD5 80d7316aa773b04d485c332c5e98a6d5
BLAKE2b-256 19550da91a89e69b02323427cfaa256790ab376cc1b903db6fa01e83d945e689

See more details on using hashes here.

File details

Details for the file traeco_sdk-1.0.2-py3-none-any.whl.

File metadata

  • Download URL: traeco_sdk-1.0.2-py3-none-any.whl
  • Upload date:
  • Size: 7.5 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.13.0

File hashes

Hashes for traeco_sdk-1.0.2-py3-none-any.whl
Algorithm Hash digest
SHA256 a0b8f4ec1792c0b2f1206c797e7e902b09a2fa7eaf7e12e725bf939da7eed0c7
MD5 b026d8995f1b7371ce17521d33356fde
BLAKE2b-256 d9efe72e0e3bd7410c46684b77c8fb9601f315779d5bd4685dcef2e79633acfd

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