The Power Behind Sequa
Unlock deterministic testing for complex LLM systems. Standardize CI runs, redact private variables, and eliminate latency and API costs.
Engineered for LLM Reliability
A lightweight, zero-dependency Python utility designed to make LLM applications deterministic and rock-solid during development.
Multiple Execution Modes
Supports auto, record, replay, and live modes. Swap effortlessly between local testing, CI build pipelines, or raw live access.
Deterministic Hashing
Recursively sorts request inputs and prompt bodies before hashing to ensure consistent cassette lookup despite param ordering.
Ignored Dynamic Fields
Strip dynamic or unstable fields (e.g. temperature, max_tokens, dynamic prompts) to prevent unwanted cache invalidation.
Custom Normalizers
Run user-defined functions to redact sensitive content, strip timestamps, or sanitize request payloads before saving.
Built to Fit Your CI Pipelines
Sequa integrates seamlessly into Python testing frameworks like `pytest` and runs efficiently inside GitHub Actions, GitLab CI, or local Docker environments.
Redact Sensitive Credentials
Use custom request normalizers to sanitize keys, database passwords, or personal user data before cassettes are saved.
Skip Dynamic Prompt Nodes
Ignore timestamps, random seeds, and dynamically formatted greeting lines to preserve stable cassette hashing.
Deterministic Verification
Assert that your agent matches specific execution paths and state changes without making network calls.
# conftest.py
import pytest
from sequa import cassette
@pytest.fixture(scope="module")
def llm_cassette():
# Setup cassette playback folder
with cassette("tests/cassettes") as cas:
yield cas
# test_agent.py
def test_agent_response(llm_cassette, my_agent):
result = my_agent.run("What is the capital of Mars?")
assert "No capital" in result
assert llm_cassette.interactions_count >= 1
Instantly mocks all Groq/Anthropic/OpenAI requests.
