Skip to main content

🎵 Orchestra

Unbreakable Agents. 85% Lower Costs. One Line of Code.

PyPI GitHub Stars License


📺 Watch: How to drop your LLM bill by 85% instantly

Orchestra Demo


🚀 The "Zero-Rewrite" AI Framework

Orchestra is a high-performance orchestration layer that adds Semantic Caching, Outage Resilience, and Smart Tool Discovery to LangGraph and LangChain.

It understands the meaning of requests, skipping the LLM entirely when a semantically similar query has already been answered.

graph TD
    User([User Query]) --> Match{Semantic Match?}
    Match -- "92% Similar" --> Cache[(Semantic Cache)]
    Cache --> Return([Instant Response < 0.5s])
    Match -- "New Query" --> CB{Circuit Breaker}
    CB -- "Closed" --> LLM[LLM Provider]
    LLM --> Return
    CB -- "Open" --> Error[Graceful Fallback]

⚡ Why Orchestra?

  • 📉 Slash OpenAI/Anthropic Bills: Stop paying for the same questions phrased differently.
  • 🏎️ Lightning Performance: Sub-second responses for cached "loophole" hits.
  • 🛡️ Outage Insurance: Built-in Circuit Breakers keep your app alive even if your LLM provider goes down.
  • 🔌 Smart Tool Selection: Automatically filters 100+ tools down to the relevant 5, saving thousands of context tokens.
  • 🛠️ Framework Native: Works with LangGraph, LangChain, and any Python LLM client.

📦 Installation

pip install orchestra-llm-cache[full]

⚡ 1-Line Quick Start

langgraph

from orchestra import enhance

# Wrap your compiled graph. That's it.
# Orchestra now handles Caching, Tracing, and Resilience.
agent = enhance(app.compile())

result = agent.invoke({"query": "What are our Q3 goals?"})

langchain

from orchestra import enhance

# Works with any Runnable or Chain
chain = enhance(my_rag_chain)

result = chain.invoke("Explain the merger")

🛡️ Enterprise Resilience (Circuit Breaker)

Stop cascading failures. If your LLM provider starts timing out, Orchestra opens the circuit, failing fast and serving cached results until the provider recovers.

from orchestra import OrchestraConfig

config = OrchestraConfig(
    enable_circuit_breaker=True,
    circuit_breaker_threshold=5, 
    circuit_breaker_timeout=60.0
)
agent = enhance(graph, config=config)

🔌 Smart Tool Discovery (MCP)

Are you loading 50+ tools into Claude? You're burning money. Orchestra indexes your MCP tools semantically and only injects the ones relevant to the current user query.

config = OrchestraConfig(
    enable_tool_search=True,
    tool_search_top_k=5  # Only show the best 5 tools
)

💾 Production Backends

Backend Best For Description
SQLite Development Local, file-based, zero-config.
PostgreSQL Tracing Centralized telemetry for large teams.
Redis Stack Distributed Global semantic cache shared across pods.

🎥 CLI & Observability

Debug your agents with trace logs.

# View recent executions
python -m orchestra.cli trace ls

# Compare two strings semantically
python -m orchestra.cli eval "Hello" "Hi there"

❓ FAQ

Q: How accurate is the semantic matching?
A: By default, we use a 0.92 cosine similarity threshold. It's high enough to ensure accuracy but loose enough to catch "How's the weather?" vs "What's the weather like?".

Q: Does this work with exact matches?
A: Yes. If a query is identical, it hits the cache instantly. If it's a paraphrase, we use vector embeddings.


Start building unbreakable, affordable AI agents today. 🌟 Give us a star on GitHub!

Metadata

Release files for orchestra-llm-cache 0.3.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 orchestra-llm-cache 0.3.1
File Size Uploaded Provenance Actions
orchestra_llm_cache-0.3.1.tar.gz 47.4 kB Without provenance Details for orchestra_llm_cache-0.3.1.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for orchestra-llm-cache 0.3.1
File Interpreter ABI Platform Actions
orchestra_llm_cache-0.3.1-py3-none-any.whl Python 3 none any Details for orchestra_llm_cache-0.3.1-py3-none-any.whl

Total release size: 105.3 kB

Release files / orchestra_llm_cache-0.3.1.tar.gz

Download URL orchestra_llm_cache-0.3.1.tar.gz
Size 47.4 kB
Tags Source
SHA-256 checksum
How to use checksums
30f510a1b85202d6b863a2fa48c169f2fd6142471d629ed292d04201d349016a
BLAKE2b-256 checksum
How to use checksums
f7165c732a36757edad14fcef4f01a6458b4f1f18744fd8a53a8573bb4d81949
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.11.8

Release files / orchestra_llm_cache-0.3.1-py3-none-any.whl

Download URL orchestra_llm_cache-0.3.1-py3-none-any.whl
Size 57.9 kB
Tags Python 3
SHA-256 checksum
How to use checksums
bff0eff526d5a539c891d56e3b1012ede1cdfa46b532c9adacda05cffb6d21ca
BLAKE2b-256 checksum
How to use checksums
88488c3e54627abe5ec2a4912d91662a7fb63b5fb12077b3b1dcf6d393d9368c
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.11.8

Security for orchestra-llm-cache 0.3.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.

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