Skip to main content

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_calls table 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


Download files

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

Source Distribution

agentrelay-0.1.1.tar.gz (10.9 kB view details)

Uploaded Source

Built Distribution

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

agentrelay-0.1.1-py3-none-any.whl (10.3 kB view details)

Uploaded Python 3

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

Hashes for agentrelay-0.1.1.tar.gz
Algorithm Hash digest
SHA256 37fd4fb84a952ce06482a0da1d13acaad6e61a21719e5e8943e3e9f4b396fc5d
MD5 2e8e09ffb3e8056e9cb5c5e6ec62bcac
BLAKE2b-256 cb8de35140385ec8c79819b5b054098e3e630bc25631b1804c365cdd124f1c0b

See more details on using hashes here.

Provenance

The following attestation bundles were made for agentrelay-0.1.1.tar.gz:

Publisher: release.yml on YalmanchiliTejas/agentTrail

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

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

Hashes for agentrelay-0.1.1-py3-none-any.whl
Algorithm Hash digest
SHA256 181bcfb2d490881cc97e92d40f72fa740b9169f6a9612ae4bdb79a0dcb26bdf9
MD5 5a67342b09fbb288432adca7fc8bf540
BLAKE2b-256 437c403727fca63eafac6f3aabc3c739a12ad92478c2e82b99a50246e228fbde

See more details on using hashes here.

Provenance

The following attestation bundles were made for agentrelay-0.1.1-py3-none-any.whl:

Publisher: release.yml on YalmanchiliTejas/agentTrail

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page