GantryGraph Documentation

GantryGraph is an open-source Python library for building autonomous AI agents that operate the desktop, browser, filesystem, and external services via MCP. Built on LangGraph. MIT licensed.

Core idea

Every agent runs a four-step loop inside a GantryEngine:

observe → think → act → review
↑__________________________|

Observe — take a screenshot or accessibility snapshot of the current state.
Think — the LLM decides what tool to call next, or returns a final answer.
Act — tool calls execute; errors come back as recoverable messages.
Review — if tool calls were made, loop. Otherwise, done.

Quick example

from gantrygraph import GantryEngine
from gantrygraph.perception import WebPage
from gantrygraph.actions import BrowserTools
from langchain_anthropic import ChatAnthropic

web = WebPage(url="https://news.ycombinator.com", headless=True)

agent = GantryEngine(
llm=ChatAnthropic(model="claude-sonnet-4-6"),
perception=web,
tools=[BrowserTools(web_page=web)],
max_steps=20,
)

result = agent.run("Find the top 5 stories and return their titles and links.")
print(result)

Where to go next

Quickstart
From zero to a working agent in 5 minutes.
Agent loop
How the engine cycles through observe → think → act.
Browser agent
Stealth mode, new tools, CAPTCHA avoidance.
Web search
Use Tavily API to avoid bot-detection walls.
Guardrails
GuardrailPolicy and BudgetPolicy explained.
API Reference
Full parameter tables for every class.