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

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.0.tar.gz (10.4 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.0-py3-none-any.whl (9.8 kB view details)

Uploaded Python 3

File details

Details for the file agentrelay-0.1.0.tar.gz.

File metadata

  • Download URL: agentrelay-0.1.0.tar.gz
  • Upload date:
  • Size: 10.4 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.0.tar.gz
Algorithm Hash digest
SHA256 322742b7efb1515c90589121917c92fbdbb7f3393e6bb9b0b20fb23e982fe2bb
MD5 13d6f42e37f40e3a677c0a4e75d80554
BLAKE2b-256 82a22eceb15bf287c8ae0cd7ce6839e94f272a2e31405e6451a0f40d9d15f2cb

See more details on using hashes here.

Provenance

The following attestation bundles were made for agentrelay-0.1.0.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.0-py3-none-any.whl.

File metadata

  • Download URL: agentrelay-0.1.0-py3-none-any.whl
  • Upload date:
  • Size: 9.8 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.0-py3-none-any.whl
Algorithm Hash digest
SHA256 ff2b7b55f74169dce89df5479d91db58d1fb097e49b0bad99d1af078bf7dcc2b
MD5 1be94944b9e0db0a769228aef9864054
BLAKE2b-256 aff70047e873e9a5e0bd7dd6353a42b21e3c3320b78fcd197f3588c531fe84f4

See more details on using hashes here.

Provenance

The following attestation bundles were made for agentrelay-0.1.0-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