Skip to main content

Drop-in Tessera integration for CrewAI. One line of config routes your CrewAI 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-crewai

PyPI Python License

Drop-in Tessera integration for CrewAI. One line of config routes every LLM call your crew makes 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-crewai

Requires Python 3.10+. CrewAI is a peer dependency — install it in your environment alongside this package.

Usage

The most common pattern uses one of the bundled factory functions to construct a pre-wired CrewAI LLM instance:

from crewai import Agent, Crew, Task
from tessera_crewai import tessera_openai_llm

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

researcher = Agent(
    role="Senior Researcher",
    goal="Uncover cutting-edge developments in AI",
    backstory="You are a seasoned researcher...",
    llm=llm,
)

# Rest of your CrewAI code runs unchanged — Crew, Task, kickoff()
# all route through Tessera and benefit from auto-optimization.

For Anthropic models:

from tessera_crewai import tessera_anthropic_llm

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

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

from crewai import LLM
from tessera_crewai import tessera_openai_config

llm = LLM(
    model="openai/gpt-4o",
    api_key="sk-...",
    **tessera_openai_config(api_key="tsr_..."),
)

What Tessera does for your CrewAI 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. CrewAI's tool-use loops often hit identical sub-prompts; cache returns are free.
  • Auto-compress — system prompts and verbose tool descriptions compressed losslessly before they hit the upstream provider.
  • Auto-batch — async crews 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_llm
Anthropic ✅ verified tessera_anthropic_config, tessera_anthropic_llm
Mistral / Groq / Cohere 🚧 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-autogen (AutoGen 0.4+ multi-agent integration). Same proxy, same mechanic stack, CrewAI-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_crewai-0.1.0.tar.gz (11.7 kB view details)

Uploaded Source

Built Distribution

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

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

Uploaded Python 3

File details

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

File metadata

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

File hashes

Hashes for tessera_crewai-0.1.0.tar.gz
Algorithm Hash digest
SHA256 e9d498b1c12faeed1f9897e283696023c628672f59b5b15879f51b361e8c9e87
MD5 434b9d076e141b45e2ab0d0ff329d827
BLAKE2b-256 0ee4bd7d94565045ba5089a8db81de0dc71930337eb112ac433d22dda225dea5

See more details on using hashes here.

File details

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

File metadata

  • Download URL: tessera_crewai-0.1.0-py3-none-any.whl
  • Upload date:
  • Size: 10.2 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.14.3

File hashes

Hashes for tessera_crewai-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 142ea89719e1afc4b4f68eba2401faea7a3a898135bea4dd9a1f1a509825055b
MD5 7da4463ffc3e8f204f6be0890c89e69f
BLAKE2b-256 2e041e5330ea51800df50a938fe3dd1827c9578edfa67a483ddbcb7ff2886fb4

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