Skip to main content

Drop-in Tessera integration for AutoGen (autogen_core / autogen_agentchat / autogen_ext). One line of config routes your AutoGen agents' LLM calls through Tessera's auto-route + auto-cache + auto-compress + auto-batch proxy. Free 60M tokens/mo. Production: 20% of measured savings.

Project description

tessera-autogen

PyPI Python License

Drop-in Tessera integration for AutoGen 0.4+ (autogen_core / autogen_agentchat / autogen_ext). One line of config routes every LLM call your AutoGen agents make through Tessera's auto-route + auto-cache + auto-compress + auto-batch proxy.

Free 60M tokens/month. Production: 20% of measured savings. No card up front.

Install

pip install tessera-autogen

Requires Python 3.10+. autogen-core + autogen-ext are peer dependencies — install them alongside this package.

Usage

The most common pattern uses a bundled factory to construct a pre-wired AutoGen ChatCompletionClient:

from autogen_agentchat.agents import AssistantAgent
from tessera_autogen import tessera_openai_client

client = tessera_openai_client(
    model="gpt-4o",
    openai_api_key="sk-...",   # your OpenAI key
    tessera_api_key="tsr_...",  # get a free one at tesseraai.io/dev
)

agent = AssistantAgent(name="researcher", model_client=client)

# Rest of your AutoGen code runs unchanged — single-agent calls,
# SelectorGroupChat, Swarm, tool use all route through Tessera and
# benefit from auto-optimization.

For Anthropic models:

from tessera_autogen import tessera_anthropic_client

client = tessera_anthropic_client(
    model="claude-sonnet-4-6",
    anthropic_api_key="sk-ant-...",
    tessera_api_key="tsr_...",
)

For explicit ChatCompletionClient construction (rare — useful when you need fine-grained client kwargs):

from autogen_ext.models.openai import OpenAIChatCompletionClient
from tessera_autogen import tessera_openai_config

client = OpenAIChatCompletionClient(
    model="gpt-4o",
    api_key="sk-...",
    **tessera_openai_config(api_key="tsr_..."),
)

What Tessera does for your AutoGen workloads

  • Auto-route — calls to expensive models are evaluated for a cheaper alternative that preserves quality on canary samples.
  • Auto-cache — exact-match + semantic cache for repeat queries. Multi-agent loops often re-issue identical sub-prompts; cache returns are free.
  • Auto-compress — system prompts + tool descriptions compressed losslessly before they hit the upstream provider.
  • Auto-batch — async teams with batch-tolerant SLAs get arbitraged onto provider batch APIs for ~50% cost reduction.

All gated by per-workload quality canaries; toggle any mechanic on/off from the Tessera dashboard. Free Sandbox tier gives you observe-only mechanics; Production tier unlocks the full stack.

Supported providers (v0.1)

Provider Status Config function
OpenAI ✅ verified tessera_openai_config, tessera_openai_client
Anthropic ✅ verified tessera_anthropic_config, tessera_anthropic_client
Mistral / Gemini 🚧 queued for v0.2

v0.1 covers ~85% of customer traffic per our outreach research. Open an issue if you need a provider on the queue surfaced sooner.

Companion packages

Companion to tessera-sdk (vanilla provider SDKs), tessera-langchain (LangChain integration), tessera-vercel-ai (Vercel AI SDK integration), tessera-llamaindex (LlamaIndex integration), tessera-mastra (Mastra Agent framework integration), tessera-pydantic-ai (Pydantic AI integration), and tessera-crewai (CrewAI multi-agent integration). Same proxy, same mechanic stack, AutoGen-shaped API.

License

Apache 2.0 — see LICENSE.

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

tessera_autogen-0.1.0.tar.gz (11.5 kB view details)

Uploaded Source

Built Distribution

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

tessera_autogen-0.1.0-py3-none-any.whl (10.2 kB view details)

Uploaded Python 3

File details

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

File metadata

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

File hashes

Hashes for tessera_autogen-0.1.0.tar.gz
Algorithm Hash digest
SHA256 cb105e9f21db055c0975d71514aad8c851145c3ddd224606706bd540244be594
MD5 20246e1ece1b092ae5ddb92a9ca32408
BLAKE2b-256 b10d115fb917cfd2cf0d4b162b1e8605cceef96c34bb39d528e6bf5168465108

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for tessera_autogen-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 1695f0100131bc8baf5d0a05aaa6e30b9c81d6c1adc5b897bb2cc790a7e9ce35
MD5 8e17d7bc5110c47f2d9c6f0853b20d57
BLAKE2b-256 df16954a239bb589bc966b1019176eb3648ac3abf77ca60085c2c0e5b1848864

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