Skip to main content

Agent-Gantry

Universal Tool Orchestration Platform for LLM-Based Agent Systems

Context is precious. Execution is sacred. Trust is earned.

Agent-Gantry is a Python library (v0.15.0) for building agents that can discover, select, and execute the right tools without flooding every prompt with every schema your organization owns. It combines semantic retrieval, provider schema conversion, secure execution, framework bridges, MCP/A2A interoperability, persistence adapters, and observability into one tool orchestration layer.

Documentation

The project documentation is now an Astro + React + TypeScript site with an implementation journey, interactive tool lifecycle walkthrough, integration matrix, and production operations guidance.

npm install
npm run dev      # local docs server
npm run build    # type-check and static build
npm run preview  # verify the generated site styling

Start with the rich docs in src/pages/index.astro. The published site lives at codehalwell.github.io/Agent-Gantry.

Install

uv add agent-gantry
# or
pip install agent-gantry

Useful extras:

uv add "agent-gantry[openai]"
uv add "agent-gantry[anthropic]"
uv add "agent-gantry[google-genai]"
uv add "agent-gantry[lancedb,nomic]"
uv add "agent-gantry[mcp,a2a]"
uv add "agent-gantry[agent-frameworks]"
uv add "agent-gantry[all]"

Quick start

from openai import AsyncOpenAI
from agent_gantry import AgentGantry, set_default_gantry, with_semantic_tools

client = AsyncOpenAI()
gantry = AgentGantry()
set_default_gantry(gantry)

@gantry.register(tags=["weather"])
def get_weather(city: str) -> str:
    """Get the current weather for a city."""
    return f"The weather in {city} is 72°F and sunny."

@with_semantic_tools(limit=3, dialect="openai")
async def ask_llm(prompt: str, *, tools=None):
    return await client.chat.completions.create(
        model="gpt-5.5",
        messages=[{"role": "user", "content": prompt}],
        tools=tools,
    )

await ask_llm("What's the weather in San Francisco?")

Agent-Gantry automatically fingerprints registered tools, syncs definitions to the configured vector store, retrieves semantically relevant tools, and converts schemas to the requested provider dialect.

Core capabilities

  • Semantic tool routing: reduce prompt context by retrieving top-k relevant tools instead of injecting every tool.
  • Register once, run anywhere: emit schemas for OpenAI-compatible APIs, Anthropic, Gemini, framework adapters, MCP, and A2A paths.
  • Secure execution: run tools through policies, capabilities, timeouts, retries, rate limits, circuit breakers, callbacks, and telemetry.
  • Persistence and retrieval: use in-memory defaults, LanceDB, Qdrant, Chroma, pgvector, OpenAI/Nomic/sentence-transformers embeddings, and rerankers.
  • Framework coverage: Microsoft Agent Framework plus LangChain, LangGraph, LlamaIndex, CrewAI, Google ADK, Pydantic AI, OpenAI Agents SDK, Haystack, Agno, Strands Agents, and DSPy.
  • MCP both ways: consume local (stdio) and remote (Streamable HTTP / SSE) MCP servers, and serve your registry to Claude Desktop, Claude Code or any remote client with gantry.serve_mcp() / agent-gantry serve-mcp --module my_app.tools — two meta-tools instead of the whole tool list.
  • Skills, retrieved by meaning: load any Agent Skills (SKILL.md) directory with gantry.add_skills_from_directory(...) and inject only the skills relevant to each prompt.
  • Bundled Claude Skill: install with agent-gantry install-skill --claude or target a project-local skills directory.

Manual retrieval and execution

from agent_gantry import AgentGantry
from agent_gantry.schema.execution import ToolCall

gantry = AgentGantry()

@gantry.register(tags=["finance"])
def calculate_tax(amount: float) -> float:
    """Calculate US sales tax for an amount."""
    return amount * 0.08

tools = await gantry.retrieve_tools("What is the tax on $100?", limit=5)
result = await gantry.execute(ToolCall(
    tool_name="calculate_tax",
    arguments={"amount": 100.0},
))

Development

uv sync --all-extras
uv run pytest
npm install
npm run build

License

MIT

Release files for agent-gantry 0.15.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for agent-gantry 0.15.0
File Size Uploaded
agent_gantry-0.15.0.tar.gz 433.9 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for agent-gantry 0.15.0
File Interpreter ABI Platform
agent_gantry-0.15.0-py3-none-any.whl Python 3 none any Details

Total release size: 976.7 kB

Release files / agent_gantry-0.15.0.tar.gz

Download URL agent_gantry-0.15.0.tar.gz
Size 433.9 kB
Tags Source
SHA-256 checksum
How to use checksums
018b34a14c196fc353e61df9dcc755a53af85938818a753e0e25cbc7382f567a
BLAKE2b-256 checksum
How to use checksums
bc2e34b3bf79d547b4ad5f197433fd2e6443c0f62b2cb767d765e1ca23d39248
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Sep 17, 2026.

Transparency log

Release files / agent_gantry-0.15.0-py3-none-any.whl

Download URL agent_gantry-0.15.0-py3-none-any.whl
Size 542.8 kB
Tags Python 3
SHA-256 checksum
How to use checksums
0bea1050f6a03d7f5ad30caeb1f6b90d598787b4b21fc97a64606ef7e0c6d2d1
BLAKE2b-256 checksum
How to use checksums
ef059a976cdb79b4318ff4661d5910c8e1e40a7051ca39b6260a8d49d3dd98df
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Sep 17, 2026.

Transparency log

Release history Release notifications | RSS feed

0.17.0

2 release files

0.16.0

2 release files

This release

0.15.0 This release

2 release files

0.13.1

2 release files

0.13.0

2 release files

0.11.0

2 release files

0.9.0

2 release files

0.8.0

2 release files

0.7.0

2 release files

0.6.0

2 release files

0.5.0

2 release files

0.4.0

2 release files

0.3.0

2 release files

0.2.0

2 release files

0.1.3

2 release files

0.1.2

2 release files

0.1.1

2 release files

0.1.0

2 release 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