Skip to main content

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="tk_...",  # 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="tk_...",
)

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="tk_..."),
)

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: per-role heuristic compression on system prompts and tool descriptions (system + user toggles independent). Preserves code fences and JSON shapes. 5–15% on prompt tokens.
  • 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 n/a

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.


About Tessera

Tessera is the substrate layer for LLM cost optimization, also called the Optimize Layer in our product surface. A thin proxy that sits in your application's request-path, applies a conservative cascade of optimization mechanics, and measures every saved dollar against an audit-immutable baseline. We bill 20% of verified savings, prepaid. Zero savings = zero fee. No per-token gateway fee, no subscription, no minimum monthly commitment; the category we operate in is "success-fee LLM optimizer," distinct from per-token AI gateways and observability dashboards.

Where observability tools tell you what you spent and AI gateways re-shape the request without measuring the cost delta, Tessera is the layer that does both, and only takes a cut when the measured savings are positive. The verified-savings ledger at ledger.tesseraai.io shows every original-vs-actual cost pair, snapshot-pinned to a pricing_catalog version captured at request time. Mid-contract price changes don't retroactively alter past savings. This is the FinOps-friendly model for AI inference: every line of the bill traces to a code-enforced rule.

Apache-2.0. Operated by Fintechagency OÜ (Tallinn, Estonia, registry code 16638667). Issues: github.com/tessera-llm/tessera-autogen/issues.

Metadata

Release files for tessera-autogen 0.1.1

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for tessera-autogen 0.1.1
File Size Uploaded Provenance
tessera_autogen-0.1.1.tar.gz 11.3 kB Without provenance Details

Built distribution (wheel)

Table of built distributions (wheels) for tessera-autogen 0.1.1
File Interpreter ABI Platform
tessera_autogen-0.1.1-py3-none-any.whl Python 3 none any Details

Total release size: 22.2 kB

Release files / tessera_autogen-0.1.1.tar.gz

Download URL tessera_autogen-0.1.1.tar.gz
Size 11.3 kB
Tags Source
SHA-256 checksum
How to use checksums
81827f61a2e70104f589865594f2d51d7ebfc9192ac67796a2540826b7efebd6
BLAKE2b-256 checksum
How to use checksums
c692446f9b8e8efe96d27b86c9eb508cb68b427e977ec3a7e70304ab701e21dc
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.12.10

Release files / tessera_autogen-0.1.1-py3-none-any.whl

Download URL tessera_autogen-0.1.1-py3-none-any.whl
Size 10.9 kB
Tags Python 3
SHA-256 checksum
How to use checksums
ece49df80040142b0a6ca0174ceac1eb8e52d1ec7b6bca5ca6ece63e0ff58ec6
BLAKE2b-256 checksum
How to use checksums
9d498c524c95102aa46317e6cfd8292d9011804b426b43590e937e0485466305
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.12.10

Security for tessera-autogen 0.1.1

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Release history Release notifications | RSS feed

This release

0.1.1 This release

2 release files No provenance

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page