Catalog PyPI
PACKAGE EXPLORERView in registry

agentape

PyPI

Record/replay testing for LLM agents - VCR.py but for LLM SDKs

anthropicllmopenairecordreplaytestingvcr
Versions collected1
Direct dependencies10From release 0.1.0
Last observed20 Oct, 21:28 UTC

README

Version 0.1.0 documentation

agentape

Record/replay testing for LLM agents. Think "VCR.py but for LLM SDKs" with semantic matching.

Installation

pip install agentape

Quick Start

import agentape
from openai import OpenAI

# Wrap the client
client = agentape.wrap(OpenAI())

# Record interactions
with agentape.record("tapes/my_flow.yaml"):
    response = client.chat.completions.create(
        model="gpt-4o",
        messages=[{"role": "user", "content": "Hello"}]
    )

# Replay interactions (no API calls made)
with agentape.replay("tapes/my_flow.yaml"):
    response = client.chat.completions.create(
        model="gpt-4o",
        messages=[{"role": "user", "content": "Hello"}]
    )

pytest Integration

import agentape

@agentape.use_tape("tapes/{test_name}.yaml")
def test_my_feature(openai_client):
    response = openai_client.chat.completions.create(
        model="gpt-4o",
        messages=[{"role": "user", "content": "Hello"}]
    )
    assert "hello" in response.choices[0].message.content.lower()

Run tests with:

pytest tests/ --tape-mode=record   # Record new tapes
pytest tests/ --tape-mode=replay   # Replay existing (default)
pytest tests/ --tape-mode=off      # Pass-through, no taping

License

MIT

Downloads & popularity

Awaiting observations

No metric observations yet

Download counts and popularity will appear here as the collector receives them.

Versions 1

Collected releases
VersionPublishedDirect dependenciesOpen version
0.1.07 Dec 202510

Package advisories

0
No matching advisories collected

This describes our collected data; it is not a security assessment.

Repository

PENDING
agentape/agentape

Shared repository data · GitHub

License detected in repository
Not collected

Metadata history

Meaningful changes
Current collected state Current

Observed since 20 Oct, 21:28 UTC

No superseded metadata states collected. Unchanged observations do not create new revisions.

Record identity

package:1ec8d1082806b5e16db966db56f695958314940a6d31e5969f9b0335ae1463ee