Framework-agnostic transactional agent runtime with idempotent tool calls, saga compensations, and deterministic replay.
Project description
AgentRelay
AgentRelay is a framework-agnostic, transactional runtime for AI agents and tool-based workflows.
It gives you:
- Tool-call idempotency – prevent duplicate side effects (emails, payments, DB writes) even when your code retries.
- Saga-style compensations – register compensating tools that run automatically on failure to roll back partial work.
- Deterministic replay – re-run an agent workflow using recorded tool outputs instead of calling external systems again.
- Framework-agnostic SDK – plug into any LLM / agent stack (OpenAI, Gemini, your own code) using a small Python SDK.
- SQL-backed durability – store runs and tool calls in Postgres or MySQL with a simple schema.
AgentRelay is designed for “production-style” agent workflows in domains like fintech, healthcare, and operations, where you care about not double-charging users, not sending emails twice, and being able to debug and audit what an agent actually did.
Features
-
Idempotent tool calls
- Each tool invocation is assigned a deterministic idempotency key based on tool name, phase, and arguments.
- A unique index at the DB layer enforces “do not run the same tool call twice for a given run”.
- If the same call is retried, AgentRelay returns the previously persisted output instead of re-invoking the tool.
-
Saga-style compensations
- Tools can register a corresponding “compensation” tool.
- On failure, AgentRelay walks executed steps in reverse order and triggers compensation calls.
- Best-effort reversals: compensation failures are logged but do not crash the process again.
-
Deterministic replay
- You can replay a past run by opening a session in replay mode.
- Forward-phase tool calls are served from the
tool_callstable instead of calling external APIs or LLMs again. - This makes debugging and auditing easier and avoids re-running side effects.
-
Framework-agnostic
- AgentRelay does not depend on any specific LLM or agent framework.
- You bring your own agent code and LLM client (OpenAI, Gemini, etc.).
- AgentRelay just wraps tool calls and persists the workflow state.
Installation
Once published to PyPI:
pip install agentrelay
Coming soon:
- Documentation
- An online dashboard for effective debugging
- A cloud version (so no need of setup on your end, just call the library with the API and get going!)
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file agentrelay-0.1.1.tar.gz.
File metadata
- Download URL: agentrelay-0.1.1.tar.gz
- Upload date:
- Size: 10.9 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
37fd4fb84a952ce06482a0da1d13acaad6e61a21719e5e8943e3e9f4b396fc5d
|
|
| MD5 |
2e8e09ffb3e8056e9cb5c5e6ec62bcac
|
|
| BLAKE2b-256 |
cb8de35140385ec8c79819b5b054098e3e630bc25631b1804c365cdd124f1c0b
|
Provenance
The following attestation bundles were made for agentrelay-0.1.1.tar.gz:
Publisher:
release.yml on YalmanchiliTejas/agentTrail
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
agentrelay-0.1.1.tar.gz -
Subject digest:
37fd4fb84a952ce06482a0da1d13acaad6e61a21719e5e8943e3e9f4b396fc5d - Sigstore transparency entry: 775145183
- Sigstore integration time:
-
Permalink:
YalmanchiliTejas/agentTrail@286109bdbbfd933506e57824c093f3c415ed9943 -
Branch / Tag:
refs/tags/V0.1.1 - Owner: https://github.com/YalmanchiliTejas
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yml@286109bdbbfd933506e57824c093f3c415ed9943 -
Trigger Event:
release
-
Statement type:
File details
Details for the file agentrelay-0.1.1-py3-none-any.whl.
File metadata
- Download URL: agentrelay-0.1.1-py3-none-any.whl
- Upload date:
- Size: 10.3 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
181bcfb2d490881cc97e92d40f72fa740b9169f6a9612ae4bdb79a0dcb26bdf9
|
|
| MD5 |
5a67342b09fbb288432adca7fc8bf540
|
|
| BLAKE2b-256 |
437c403727fca63eafac6f3aabc3c739a12ad92478c2e82b99a50246e228fbde
|
Provenance
The following attestation bundles were made for agentrelay-0.1.1-py3-none-any.whl:
Publisher:
release.yml on YalmanchiliTejas/agentTrail
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
agentrelay-0.1.1-py3-none-any.whl -
Subject digest:
181bcfb2d490881cc97e92d40f72fa740b9169f6a9612ae4bdb79a0dcb26bdf9 - Sigstore transparency entry: 775145185
- Sigstore integration time:
-
Permalink:
YalmanchiliTejas/agentTrail@286109bdbbfd933506e57824c093f3c415ed9943 -
Branch / Tag:
refs/tags/V0.1.1 - Owner: https://github.com/YalmanchiliTejas
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yml@286109bdbbfd933506e57824c093f3c415ed9943 -
Trigger Event:
release
-
Statement type: