Quick Start
Get your first AI agent running in minutes using LangGraph and MCP integration.
Get your AI agent up and running quickly! This guide walks you through cloning the template, configuring MCP servers, and deploying your first agent.
Prerequisites
Before you begin, ensure you have:
- Python 3.12+ installed
- UV package manager (installation guide)
- At least one MCP server running (see MCP Server Template)
- Basic understanding of Python and async programming
Step 1: Clone the Template
# Clone the agent template
git clone https://github.com/redhat-data-and-ai/template-agent.git
cd template-agent
# Set up Python environment
uv venv --python 3.12
source .venv/bin/activate
# Install dependencies
uv pip install -e ".[dev]"
Step 2: Configure MCP Servers
Edit the configuration file to point to your MCP servers:
# config/settings.py or .env file
MCP_SERVERS=[
"http://localhost:3000/mcp", # Your MCP server
]
# LLM Configuration
LLM_MODEL="gpt-4"
LLM_API_KEY="your-api-key"
Info Info
MCP Servers Required: The agent needs at least one MCP server to provide tools and capabilities. If you don’t have one yet, start with the MCP Server Quick Start.
Step 3: Run Your First Agent
# Start the agent
python -m agent_template.src.main
# The agent will:
# 1. Connect to your MCP servers
# 2. Discover available tools
# 3. Start accepting requests
Step 4: Test the Agent
Send a test request to verify everything works:
# test_agent.py
import asyncio
from agent_template.src.agent import run_agent
async def test():
result = await run_agent("Hello! What tools do you have available?")
print(result)
asyncio.run(test())
Step 5: Customize for Your Use Case
Now that the basic agent is working, customize it:
- Define your workflow - Edit
src/agent/workflows.py - Add custom prompts - Update
src/agent/prompts.py - Configure tools - Adjust which MCP tools to use
- Test thoroughly - Run
pytestto verify
Next Steps
- Deploy to production: Follow the Kubernetes deployment guides in the repository
- Add more MCP servers: Connect to additional MCP servers for more capabilities
- Build a UI: Add the UI Template for a chat interface
- Join the community: GitHub Discussions
Tip Tip
Pro Tip: Start with simple, single-step agent workflows and gradually add complexity. Test each addition before moving to the next feature.
Troubleshooting
Agent won’t start
- Check that MCP server URLs are correct and accessible
- Verify your LLM API key is valid
- Review logs for connection errors
Tools not working
- Ensure MCP servers are running (
curl http://localhost:3000/health) - Verify tool permissions and authentication
- Check MCP server logs for errors
For more help, visit GitHub Issues.