Skip to main content

Sequa 📼

Deterministic testing for AI applications.

Record once. Replay forever.

PyPI Python License


Stop paying for every AI test run.

Every time your AI application runs during testing, it probably:

  • 💸 Calls the LLM again
  • 🐢 Slows down your CI pipeline
  • 🎲 Produces slightly different outputs
  • 🌐 Depends on internet connectivity

Sequa records a real AI execution once and replays it locally during future test runs.

The result

  • ⚡ Millisecond replay
  • 💰 Zero replay API costs
  • 🧪 Deterministic testing
  • 💻 Works offline

Before

from langchain_groq import ChatGroq

model = ChatGroq(model_name="llama-3.1-8b-instant")

response = model.invoke(
    "Write a 3-word slogan for gravity."
)

# ⏱️ 2.3 seconds
# 🌐 Live API Call

After

from langchain_groq import ChatGroq
from sequa import cassette

model = ChatGroq(model_name="llama-3.1-8b-instant")

with cassette("tests/cassettes"):
    response = model.invoke(
        "Write a 3-word slogan for gravity."
    )

# First Run
# ⏱️ 2.3 seconds
# 🌐 Live API Call
# 💾 Recorded

# Every Run After
# ⏱️ 12 ms
# ❌ No API Calls
# 📼 Replayed Locally

Why Sequa?

Without Sequa With Sequa
Calls the LLM on every test Record once, replay forever
Seconds of latency Millisecond replay
API cost every execution No replay API cost
Internet required Works offline
Non-deterministic Deterministic

Supported Frameworks

  • ✅ OpenAI
  • ✅ Anthropic
  • ✅ LangChain
  • ✅ LangGraph

Installation

pip install sequa

or

uv add sequa

Quick Start

from langchain_groq import ChatGroq
from sequa import cassette

model = ChatGroq(model_name="llama-3.1-8b-instant")

with cassette("tests/cassettes"):
    response = model.invoke("Hello Sequa!")

That's it.

The first execution records the response.

Every matching execution after that replays it locally without calling the LLM.


Features

  • 📼 Record once, replay forever
  • ⚡ Replay, Record, Auto and Live execution modes
  • 🧰 Tool Calling & Function Calling support
  • 🌊 Streaming support (sync & async)
  • 🔒 PII & Sensitive Information Masking
  • 🛡️ NVIDIA NeMo Guardrails Integration
  • 🧠 Deterministic request hashing
  • 🎯 Custom ignored fields
  • 🔧 Custom request normalizers
  • 🗂️ File, Memory & PostgreSQL storage backends
  • 🧹 CLI utilities

Common Use Cases

🚀 Speed up AI integration tests

Run your test suite in milliseconds instead of waiting for repeated LLM calls.


💰 Reduce API costs

Replay previously recorded executions without paying for another API request.


🧪 Deterministic testing

Replay the exact same execution every time.


💻 Offline development

Develop and test AI applications without internet connectivity.


🐞 Reproduce bugs

Replay the exact LLM interaction that caused the issue.


Storage Backends

Sequa supports multiple storage backends.

  • 📁 File Storage
  • 🧠 In-Memory Storage
  • 🐘 PostgreSQL Storage

Choose whichever fits your workflow.


Documentation

Comprehensive documentation is available at:

👉 https://sequa.thetechnoadvisor.com/docs


Contributing

Contributions are always welcome.

  • ⭐ Star the repository
  • 🐞 Report bugs
  • 💡 Suggest new features
  • 🔧 Open a Pull Request

License

MIT License.

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

sequa-0.5.0.tar.gz (36.2 kB view details)

Uploaded Source

Built Distribution

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

sequa-0.5.0-py3-none-any.whl (45.0 kB view details)

Uploaded Python 3

File details

Details for the file sequa-0.5.0.tar.gz.

File metadata

  • Download URL: sequa-0.5.0.tar.gz
  • Upload date:
  • Size: 36.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/7.0.0 CPython/3.13.14

File hashes

Hashes for sequa-0.5.0.tar.gz
Algorithm Hash digest
SHA256 46a48c7c98f97a17fb6b9963c316e7849577bb5258eae5832be8651df4e6f19e
MD5 328406f07b5483b855d6981917d68e95
BLAKE2b-256 fdbab9227c586a389726997493f7e28759301b331a89aeda00680f6674ee145b

See more details on using hashes here.

File details

Details for the file sequa-0.5.0-py3-none-any.whl.

File metadata

  • Download URL: sequa-0.5.0-py3-none-any.whl
  • Upload date:
  • Size: 45.0 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/7.0.0 CPython/3.13.14

File hashes

Hashes for sequa-0.5.0-py3-none-any.whl
Algorithm Hash digest
SHA256 895bd28062a069186ba49ba144d0ec6f933acd07b417c62d7c446e75c70b96b8
MD5 c6cf5fc8498c24100e6b95ee888e915c
BLAKE2b-256 e15ea0e40a7c6949ee6ccb785a0c53318cf5022dac618a2a8f4972505cc81c56

See more details on using hashes here.

Release history Release notifications | RSS feed

0.8.0

2 files

0.7.0

2 files

0.6.0

2 files

This release

0.5.0 This release

2 files

0.4.0

2 files

0.3.0

2 files

0.2.0

2 files

0.1.0

2 files

0.0.7

2 files

0.0.6

2 files

0.0.5

2 files

0.0.4

2 files

0.0.3

2 files

0.0.2

2 files

0.0.1

2 files

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