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
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 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
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
d9bbe3f8fd72ef1db9ee59107c427b4ad580def187b8f5b4b9b794243adb4113
|
|
| MD5 |
0007403c7de6e30b0300ffcd0507f68b
|
|
| BLAKE2b-256 |
5f4dc71f68b5a49813ca0524998756bc800e4edfdd635378cb80a77931196cdf
|
Provenance
The following attestation bundles were made for agentframerelay-0.1.0.tar.gz:
Publisher:
release.yml on asu2002/AgentFramerelay
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
agentframerelay-0.1.0.tar.gz -
Subject digest:
d9bbe3f8fd72ef1db9ee59107c427b4ad580def187b8f5b4b9b794243adb4113 - Sigstore transparency entry: 2606993213
- Sigstore integration time:
-
Permalink:
asu2002/AgentFramerelay@ae218c527831e3fbf24a90344fedd2fe2def862e -
Branch / Tag:
refs/tags/v0.1.0 - Owner: https://github.com/asu2002
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yml@ae218c527831e3fbf24a90344fedd2fe2def862e -
Trigger Event:
push
-
Statement type:
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
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
6a1ab7dc45d56481506b2e5c476c11d706c3b65f55def3cbbfb31c8e36f6af9b
|
|
| MD5 |
bb800fe31dfcb3226556707c6db93304
|
|
| BLAKE2b-256 |
7eca8537e4a735d2ecc515a97c62a2f66a5179ce7650a6a44ce27bf5149f1074
|
Provenance
The following attestation bundles were made for agentframerelay-0.1.0-py3-none-any.whl:
Publisher:
release.yml on asu2002/AgentFramerelay
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
agentframerelay-0.1.0-py3-none-any.whl -
Subject digest:
6a1ab7dc45d56481506b2e5c476c11d706c3b65f55def3cbbfb31c8e36f6af9b - Sigstore transparency entry: 2606993330
- Sigstore integration time:
-
Permalink:
asu2002/AgentFramerelay@ae218c527831e3fbf24a90344fedd2fe2def862e -
Branch / Tag:
refs/tags/v0.1.0 - Owner: https://github.com/asu2002
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yml@ae218c527831e3fbf24a90344fedd2fe2def862e -
Trigger Event:
push
-
Statement type: