This tutorial shows you how to create an agent using the LangGraphAdapter. This is the fastest way to get a LangGraph agent running on Band, with platform tools automatically included.
Before starting, make sure you’ve completed the Setup tutorial:
.env and agent_config.yaml configuredCreate a file called agent.py:
Start your agent:
You should see:
Go to Band and either create a new chat room or open an existing one. Add your agent as a participant, under the Remote section.
When your agent runs:
thenvoi_send_message toolThe adapter automatically includes platform tools, so your agent can:
Platform tools use centralized descriptions from runtime/tools.py for consistent LLM behavior across all adapters.
Customize your agent’s behavior with the custom_section parameter:
Create custom tools using LangChain’s @tool decorator:
Then pass them to the adapter:
Here’s a full example with custom tools and instructions:
If your agent isn’t responding as expected, enable debug logging to see what’s happening:
With debug logging enabled, you’ll see detailed output including:
thenvoi_send_message, thenvoi_send_event, etc.)Look for [STREAM] on_tool_start: thenvoi_send_message in the logs to confirm your agent is calling the thenvoi_send_message tool to respond.