Skip to main content

AgentFrameRelay

Define agents and tools independently from the framework that executes them.

MVP

  • Framework-neutral @tool
  • Pydantic/JSON schemas
  • Framework-neutral Agent
  • Runtime adapter interface
  • LangGraph and CrewAI agent runtimes
  • OpenAI Agents and Google ADK agent runtimes
  • LiteLLM agent runtime and OpenAI-compatible tool schemas
  • MCP/FastMCP tool registration
  • Native escape hatch
  • Capability discovery
  • Optional dependencies

Quick start

from agentframerelay import Agent, tool

@tool
def search_customer(customer_id: str) -> dict:
    """Retrieve a customer."""
    return {"customer_id": customer_id}

agent = Agent(
    name="customer-agent",
    instructions="Help with customer lookup.",
    tools=[search_customer],
    runtime="mock",
)

print(agent.run({"input": "Find customer 123"}))

Install an adapter only when needed:

pip install "agentframerelay[langgraph]"
pip install "agentframerelay[crewai]"
pip install "agentframerelay[openai]"
pip install "agentframerelay[litellm]"
pip install "agentframerelay[google-adk]"
pip install "agentframerelay[mcp]"

The core is intentionally framework-neutral. Adapters isolate framework API churn.

Core execution API

Agent.run() always returns an AgentResult with the native framework output, the runtime name, and optional metadata. RuntimeResult remains available as a backward-compatible alias.

Tools validate annotated inputs before direct execution and raise public, framework-neutral exceptions such as ToolInputError and ToolExecutionError. Asynchronous tools support await tool.ainvoke(...); calling tool.invoke(...) from synchronous code runs them safely when no event loop is active.

from agentframerelay import tool

@tool
async def fetch_customer(customer_id: int) -> dict:
    """Retrieve a customer."""
    return {"customer_id": customer_id}

customer = await fetch_customer.ainvoke("123")

Tool portability

An AgentFrameRelay tool retains its original typed Python function and can be adapted for each supported tool protocol:

@tool
def add(a: int, b: int) -> int:
    """Add two integers."""
    return a + b

langchain_tool = add.to_langchain()
crewai_tool = add.to_crewai()
litellm_schema = add.to_litellm()
google_adk_tool = add.to_google_adk()
openai_agents_tool = add.to_openai_agents()
native_mcp_function = add.to_mcp()

For FastMCP, register the original function directly through the relay tool:

add.register_mcp(mcp)

The Google ADK runtime creates an in-memory session by default. Pass user_id, session_id, state, session_service, or run_config to Agent.run() when your application needs to control ADK session handling. MCP is a tool protocol integration, not an Agent runtime.

Integration examples

Credential-backed smoke scripts live in examples/integrations/; they are kept separate from the automated tests/ suite. The LiteLLM, OpenAI Agents, and Google ADK examples load credentials from .env and assert that the original AgentFrameRelay tool function executed.

Download files

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

Source Distribution

agentframerelay-0.1.0.tar.gz (18.7 kB view details)

Uploaded Source

Built Distribution

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

agentframerelay-0.1.0-py3-none-any.whl (16.3 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: agentframerelay-0.1.0.tar.gz
  • Upload date:
  • Size: 18.7 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/7.0.0 CPython/3.13.14

File hashes

Hashes for agentframerelay-0.1.0.tar.gz
Algorithm Hash digest
SHA256 d9bbe3f8fd72ef1db9ee59107c427b4ad580def187b8f5b4b9b794243adb4113
MD5 0007403c7de6e30b0300ffcd0507f68b
BLAKE2b-256 5f4dc71f68b5a49813ca0524998756bc800e4edfdd635378cb80a77931196cdf

See more details on using hashes here.

Provenance

The following attestation bundles were made for agentframerelay-0.1.0.tar.gz:

Publisher: release.yml on asu2002/AgentFramerelay

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

File details

Details for the file agentframerelay-0.1.0-py3-none-any.whl.

File metadata

  • Download URL: agentframerelay-0.1.0-py3-none-any.whl
  • Upload date:
  • Size: 16.3 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/7.0.0 CPython/3.13.14

File hashes

Hashes for agentframerelay-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 6a1ab7dc45d56481506b2e5c476c11d706c3b65f55def3cbbfb31c8e36f6af9b
MD5 bb800fe31dfcb3226556707c6db93304
BLAKE2b-256 7eca8537e4a735d2ecc515a97c62a2f66a5179ce7650a6a44ce27bf5149f1074

See more details on using hashes here.

Provenance

The following attestation bundles were made for agentframerelay-0.1.0-py3-none-any.whl:

Publisher: release.yml on asu2002/AgentFramerelay

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

Release history Release notifications | RSS feed

This release

0.1.0 This release

2 files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page