Spaces:
Sleeping
Sleeping
A newer version of the Gradio SDK is available: 6.12.0
metadata
title: Text Adventure Agent
emoji: 🤖
colorFrom: blue
colorTo: green
sdk: gradio
sdk_version: 5.16.0
app_file: app.py
pinned: false
license: apache-2.0
Example: MCP ReAct Agent
This is a complete, working example submission that demonstrates a ReAct agent using MCP.
Approach
This agent uses the full ReAct pattern:
- Thought: Reason about the current situation
- Tool: Choose and call an MCP tool
- Observation: Process the result
Features:
- Loop detection (avoids repeating the same action)
- Action validation (fixes common invalid verbs)
- Score tracking
- History management
Files
agent.py- ReAct agent with full implementationmcp_server.py- MCP server with memory, map, and inventory tools
Testing
# Test locally
python agent.py