Files
microdao-daarion/services/router/agent_tools_config.py
Apple ef3473db21 snapshot: NODE1 production state 2026-02-09
Complete snapshot of /opt/microdao-daarion/ from NODE1 (144.76.224.179).
This represents the actual running production code that has diverged
significantly from the previous main branch.

Key changes from old main:
- Gateway (http_api.py): expanded from ~40KB to 164KB with full agent support
- Router: new /v1/agents/{id}/infer endpoint with vision + DeepSeek routing
- Behavior Policy: SOWA v2.2 (3-level: FULL/ACK/SILENT)
- Agent Registry: config/agent_registry.yml as single source of truth
- 13 agents configured (was 3)
- Memory service integration
- CrewAI teams and roles

Excluded from snapshot: venv/, .env, data/, backups, .tgz archives

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-02-09 08:46:46 -08:00

126 lines
3.6 KiB
Python

"""
Per-agent tool configuration.
All agents have FULL standard stack + specialized tools.
Each agent is a platform with own site, channels, database, users.
"""
# FULL standard stack - available to ALL agents
FULL_STANDARD_STACK = [
# Search & Knowledge (Priority 1)
"memory_search",
"graph_query",
# Web Research (Priority 2)
"web_search",
"web_extract",
"crawl4ai_scrape",
# Memory
"remember_fact",
# Content Generation
"image_generate",
"tts_speak",
# Presentations
"presentation_create",
"presentation_status",
"presentation_download",
]
# Specialized tools per agent (on top of standard stack)
AGENT_SPECIALIZED_TOOLS = {
# Helion - Energy platform
# Specialized: energy calculations, solar/wind analysis
"helion": [],
# Alateya - R&D Lab OS
# Specialized: experiment tracking, hypothesis testing
"alateya": [],
# Nutra - Health & Nutrition
# Specialized: nutrition calculations, supplement analysis
"nutra": [],
# AgroMatrix - Agriculture
# Specialized: crop analysis, weather integration, field mapping
"agromatrix": [],
# GreenFood - Food & Eco
# Specialized: recipe analysis, eco-scoring
"greenfood": [],
# Druid - Knowledge Search
# Specialized: deep RAG, document comparison
"druid": [],
# DaarWizz - DAO Coordination
# Specialized: governance tools, voting, treasury
"daarwizz": [],
# Clan - Community
# Specialized: event management, polls, member tracking
"clan": [],
# Eonarch - Philosophy & Evolution
# Specialized: concept mapping, timeline analysis
"eonarch": [],
}
# CrewAI team structure per agent (future implementation)
AGENT_CREW_TEAMS = {
"helion": {
"team_name": "Energy Specialists",
"agents": ["analyst", "engineer", "market_researcher", "communicator"]
},
"alateya": {
"team_name": "Research Professors",
"agents": ["prof_erudite", "prof_analyst", "prof_creative", "prof_optimizer", "prof_communicator"]
},
"nutra": {
"team_name": "Health Advisors",
"agents": ["nutritionist", "biochemist", "fitness_coach", "communicator"]
},
"agromatrix": {
"team_name": "Agro Experts",
"agents": ["agronomist", "soil_specialist", "weather_analyst", "market_analyst"]
},
"greenfood": {
"team_name": "Food & Eco Team",
"agents": ["chef", "nutritionist", "eco_analyst", "supply_chain"]
},
"druid": {
"team_name": "Knowledge Seekers",
"agents": ["researcher", "fact_checker", "synthesizer", "archivist"]
},
"daarwizz": {
"team_name": "DAO Operations",
"agents": ["governance", "treasury", "community", "tech_ops"]
},
"clan": {
"team_name": "Community Spirits",
"agents": ["welcomer", "mediator", "event_organizer", "historian"]
},
"eonarch": {
"team_name": "Consciousness Guides",
"agents": ["philosopher", "futurist", "integrator", "storyteller"]
},
}
def get_agent_tools(agent_id: str) -> list:
"""Get all tools for an agent: standard stack + specialized."""
specialized = AGENT_SPECIALIZED_TOOLS.get(agent_id, [])
return FULL_STANDARD_STACK + specialized
def is_tool_allowed(agent_id: str, tool_name: str) -> bool:
"""Check if a tool is allowed for an agent."""
allowed = get_agent_tools(agent_id)
return tool_name in allowed
def get_agent_crew(agent_id: str) -> dict:
"""Get CrewAI team configuration for an agent."""
return AGENT_CREW_TEAMS.get(agent_id, {"team_name": "Default", "agents": []})