Build latest book artifacts / build (push) Canceled after 0s
dependency resolution / resolve (3.11) (push) Canceled after 0s
dependency resolution / resolve (3.13) (push) Canceled after 0s
deploy-pages / build (push) Canceled after 0s
deploy-pages / deploy (push) Canceled after 0s
i18n consistency check / check (push) Canceled after 0s
provider adoption tests / test (chapter2/context-compression) (push) Canceled after 0s
provider adoption tests / test (chapter2/prompt-injection) (push) Canceled after 0s
provider adoption tests / test (chapter2/system-hint) (push) Canceled after 0s
provider adoption tests / test (chapter3/log-sanitization) (push) Canceled after 0s
web-search-agent tests / test (push) Canceled after 0s
web-search-agent tests / agentbook (push) Canceled after 0s
2.3 KiB
2.3 KiB
GAIA Agent Guard Functionality Setup
1. Overview
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.
2. Setting Up Guard Functionality
2.1 MCP Configuration
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
}
}
}
2.2 Configure Environment Variables
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_here
2.3 Update Prompt Configuration
Replace the content of prompt.py with the enhanced version from prompt_w_guard.py:
cp examples/gaia/prompt_w_guard.py examples/gaia/prompt.py
2.4 Configure Task Subset Processing
To 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:
continue
3. Configuration Summary
To 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.