This guide covers the additional setup required for the enhanced guard agent in the GAIA agent. For basic installation and setup, please refer to README.md.
To enable the guard functionality, ensure the following MCP server is registered in your mcp.json file:
{
"mcpServers": {
"maneuvering": {
"command": "python",
"args": [
"-m",
"examples.gaia.mcp_collections.intelligence.guard"
],
"env": {},
"client_session_timeout_seconds": 9999.0
}
}
}Add the guard_llm API key to your .env file:
# Add this line to examples/gaia/cmd/agent_deploy/gaia_agent/.env
GUARD_LLM_API_KEY=your_guard_llm_api_key_hereReplace the content of prompt.py with the enhanced version from prompt_w_guard.py:
cp examples/gaia/prompt_w_guard.py examples/gaia/prompt.pyTo run specific subsets of GAIA tasks, add the following code to run.py:
# load task subset from subset.txt
subset_file_path = Path(__file__).parent / "subset.txt"
if subset_file_path.exists():
with open(subset_file_path, "r", encoding="utf-8") as f:
task_subset = set(line.strip() for line in f if line.strip())
logging.info(f"Loaded {len(task_subset)} task IDs from subset.txt")
else:
task_subset = set() # Empty set if file doesn't exist
logging.warning("subset.txt file not found, using empty task subset")And add the filtering logic in the main processing loop:
# only process tasks that are in the subset
if dataset_i["task_id"] not in task_subset:
continueTo enable guard functionality, ensure you have:
- ✅ MCP Configuration:
maneuveringserver registered inmcp.json - ✅ Environment Variables:
GUARD_LLM_API_KEYadded to.envfile - ✅ Prompt Update:
prompt_w_guard.pycontent copied toprompt.py - ✅ Subset Processing: Batch processing code added to
run.py
This setup provides enhanced reasoning capabilities and efficient batch processing for GAIA task evaluation.