langgraph.json manifest naming a graph in your committed source, the same layout langgraph dev accepts. Guild runs the graph in a container, routes its model calls through Guild, and gives it the Guild tools you declare. Agents built with LangChain’s create_agent are LangGraph graphs, so they run the same way.
Use this agent type when you already write agents with LangChain or LangGraph, or when you want to control the orchestration yourself in Python.
LangGraph agents support LangChain and LangGraph v1 (
langchain>=1.0, langgraph>=1.0). Pre-v1 APIs such as AgentExecutor and create_react_agent no longer exist. Use create_agent from langchain.agents.Create a LangGraph agent
- CLI
- Web
graph.py, then save and run the agent like you would any other Guild agent.graph.py is a working agent with no tools:
The manifest
langgraph.json at the root of the agent’s files names the graph Guild runs:
graphsis required. Each target is a relative path to a committed.pyfile, a colon, and an attribute name, such as./my_agent/graph.py:graph. Module-style targets (my_agent.graph:graph) are not supported.- When
graphsdeclares several graphs, Guild runs the one namedagent. When it declares one, Guild runs that one. dependenciesis optional. See Dependencies.
- A compiled graph, such as the one
create_agentreturns - An uncompiled
StateGraph. Guild compiles it. - A function that takes no arguments and returns either of the above. It can be
async. Use this form when the graph needs Guild tools.
Models
guild_model() returns a LangChain chat model whose calls go through Guild’s LLM proxy. You don’t configure a key or a URL. Guild picks the provider and model from the account’s LLM settings, so the model name you pass is only a hint. Extra keyword arguments pass through to the underlying ChatOpenAI.
Guild also points the OpenAI client environment at its proxy before your code loads, so a plain ChatOpenAI() is routed the same way. Either way, every call is metered and recorded in Usage, and the account’s model policies apply.
To declare the models the agent prefers, add a models section to guild.yaml. It works as it does for Goose agents — see Models field.
Tools
The integrations, sub-agents, and built-in tools the agent can call are declared inguild.yaml at the root of the agent’s files, exactly as they are for Goose agents:
guild.yaml when the agent needs none of them. guild_tools() returns the declared tools as ordinary LangChain tools. It’s async, so make the graph target a factory that awaits it:
ui_prompt, can stay open for up to 30 minutes.
The built-in services available to a LangGraph agent are:
The field rules and validation for
integrations, sub_agents, and builtins are the same as for Goose agents. The environment field is not supported. Declaring it, or any other section a LangGraph agent does not support, is a build error.
guild_tools() works only inside a Guild task. Calling it elsewhere, such as under langgraph dev, raises a RuntimeError.
Input and output
LangGraph agents take text in and return text out. Guild applies these input and output schemas at build time.- Input — each turn’s text arrives as a
HumanMessageappended to the graph’smessages. The graph must accept{"messages": [...]}, ascreate_agentand anyMessagesStategraph do. A graph with a custom state schema fails its first turn. - Conversation — Guild saves the message history in the task’s state between turns, so a follow-up message in the same session continues the conversation.
- Output — the text of the model’s last response in the turn. If the model produced no text, the output says so.
Dependencies
The runtime image provides Python 3.13 withlangchain, langchain-core, langchain-openai, and langgraph, plus the guildai_langchain bindings. Other packages can’t be installed yet. Listing one under dependencies in langgraph.json is a build error. Local paths such as "." are allowed.
The container has no general network access. Reach outside services through Guild tools.
Limits
- Idle turns — a turn fails if the graph produces no events for 10 minutes. The clock pauses while a Guild tool call is in flight, so a long sub-agent call or a wait on
ui_promptdoesn’t count. - Import errors — the build checks the manifest but doesn’t import your code. A syntax error, or a graph that can’t be built, fails the first turn that runs it. Test with
guild agent testorguild agent chatbefore you publish.
Build-time validation
Guild validates the agent when you save a version. The manifest is checked first, because a manifest that can’t resolve to a graph fails the build before any tool validation runs:- Validate LangGraph manifest —
langgraph.jsonis present and valid, every graph target points to a committed.pyfile inside the workspace with a valid attribute name, a graph namedagentexists when there are several, and every dependency is available. - Parse guild.yaml —
guild.yamlis valid YAML, with no unknown keys and only sections a LangGraph agent supports. - Validate Guild integrations — each integration resolves to a published version, and any listed tools map to real operations on it.
- Validate Guild subagents — each sub-agent resolves to a published version.
- Validate Guild builtins — each service is one of
console,ui, orguild, and each listed tool is permitted for that service. - Validate LLM models — each entry under
modelsnames a supported provider. - Store Guild configuration — the resolved tool manifest is recorded on the version.