Files
microdao-daarion/router-config.yml
Apple 90080c632a fix(fabric): use broadcast subject for NATS capabilities discovery
NATS wildcards (node.*.capabilities.get) only work for subscriptions,
not for publish. Switch to a dedicated broadcast subject
(fabric.capabilities.discover) that all NCS instances subscribe to,
enabling proper scatter-gather discovery across nodes.

Made-with: Cursor
2026-02-27 03:20:13 -08:00

677 lines
24 KiB
YAML
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
# DAGI Router Configuration
# Version: 0.6.0 - Telegram agents + differentiated qwen3 profiles
node:
id: dagi-devtools-node-01
role: router
env: prod
description: "DAGI Router with CrewAI, Telegram Gateway and science-ready tooling"
# ============================================================================
# LLM Profiles (використовуємо лише доступні qwen3 моделі)
# ============================================================================
llm_profiles:
local_default_coder:
provider: ollama
base_url: http://172.17.0.1:11434
model: qwen3:14b
max_tokens: 1024
temperature: 0.2
top_p: 0.9
timeout_ms: 30000
description: "Базова qwen3:14b для інфраструктурних задач"
qwen3_strategist_8b:
provider: ollama
base_url: http://172.17.0.1:11434
model: qwen3:14b
max_tokens: 2048
temperature: 0.15
top_p: 0.7
timeout_ms: 32000
description: "Стримана qwen3:8b для стратегічних агентів (Daarwizz, Yaromir, Orchestrator)"
qwen3_support_8b:
provider: ollama
base_url: http://172.17.0.1:11434
model: qwen3:14b
max_tokens: 1536
temperature: 0.35
top_p: 0.88
timeout_ms: 28000
description: "Підтримка/CRM тон для GREENFOOD, CLAN"
qwen3_science_8b:
provider: ollama
base_url: http://172.17.0.1:11434
model: qwen3:14b
max_tokens: 2048
temperature: 0.1
top_p: 0.65
timeout_ms: 40000
description: "Наукові агенти (Helion, DRUID, Nutra, Monitor)"
qwen3_creative_8b:
provider: ollama
base_url: http://172.17.0.1:11434
model: qwen3:14b
max_tokens: 2048
temperature: 0.6
top_p: 0.92
timeout_ms: 32000
description: "Комʼюніті та мультимодальні агенти (Soul, EONARCH)"
qwen3_5_35b_a3b:
provider: openai
base_url: http://host.docker.internal:11435
api_key_env: LLAMA_SERVER_API_KEY
model: qwen3.5:35b-a3b
max_tokens: 512
temperature: 0.2
top_p: 0.85
timeout_ms: 300000
description: "Qwen3.5 35B A3B для складних reasoning задач Sofiia"
qwen3_vision_8b:
provider: ollama
base_url: http://172.17.0.1:11434
model: llava:13b
max_tokens: 2048
temperature: 0.2
top_p: 0.9
timeout_ms: 60000
description: "Vision qwen3 для EONARCH/Helion"
qwen2_5_3b_service:
provider: ollama
base_url: http://172.17.0.1:11434
model: qwen3:14b
max_tokens: 768
temperature: 0.2
top_p: 0.85
timeout_ms: 20000
description: "Стабільна qwen3:14b для службових повідомлень та monitor ботів"
mistral_community_12b:
provider: ollama
base_url: http://172.17.0.1:11434
model: mistral-nemo:12b
max_tokens: 2048
temperature: 0.35
top_p: 0.9
timeout_ms: 32000
description: "Mistral Nemo 12B для CRM/community агентів"
cloud_deepseek:
provider: deepseek
base_url: https://api.deepseek.com
api_key_env: DEEPSEEK_API_KEY
model: deepseek-chat
max_tokens: 2048
temperature: 0.2
timeout_ms: 40000
description: "DeepSeek для важких DevTools задач (опційно)"
cloud_mistral:
provider: mistral
base_url: https://api.mistral.ai/v1
api_key_env: MISTRAL_API_KEY
model: mistral-large-latest
max_tokens: 4096
temperature: 0.3
timeout_ms: 60000
description: "Mistral Large для складних задач, reasoning, аналізу"
# ============================================================================
# Orchestrator Providers
# ============================================================================
orchestrator_providers:
crewai:
type: orchestrator
base_url: http://localhost:9010
timeout_ms: 120000
description: "CrewAI multi-agent workflow orchestrator"
vision_encoder:
type: vision
base_url: http://vision-encoder:8001
timeout_ms: 30000
description: "Vision Encoder (OpenCLIP ViT-L/14)"
# ============================================================================
# Agents Configuration
# ============================================================================
agents:
devtools:
description: "DevTools Agent - помічник з кодом, тестами й інфраструктурою"
default_llm: local_default_coder
system_prompt: |
Ти - DevTools Agent в екосистемі DAARION.city.
Ти допомагаєш розробникам з:
- аналізом коду та пошуком багів
- рефакторингом
- написанням тестів
- git операціями
Відповідай коротко, конкретно, із прикладами коду.
Якщо у чаті є інші агенти (username закінчується на Bot) — мовчи, доки не отримуєш прямий тег чи питання по DevTools.
tools:
- id: fs_read
type: builtin
description: "Читання файлів"
- id: fs_write
type: builtin
description: "Запис файлів"
- id: run_tests
type: builtin
description: "Запуск тестів"
- id: git_diff
type: builtin
description: "Git diff"
- id: git_commit
type: builtin
description: "Git commit"
microdao_orchestrator:
description: "Multi-agent orchestrator for MicroDAO workflows"
default_llm: qwen3_strategist_8b
system_prompt: |
You are the central router/orchestrator for DAARION.city MicroDAO.
Coordinate multiple agents, respect RBAC, escalate only when needed.
Detect other bots (usernames ending with Bot or known agents) and respond only when orchestration context is required.
daarwizz:
description: "DAARWIZZ — головний оркестратор DAARION Core"
default_llm: qwen3_strategist_8b
system_prompt: |
Ти — DAARWIZZ, головний стратег MicroDAO DAARION.city.
Тримаєш контекст roadmap, delegation, crew-команд.
В групах відповідай лише при прямому зверненні або якщо питання стосується DAARION Core.
Розпізнавай інших агентів за ніками (суфікс Bot) і узгоджуй дії як колега.
greenfood:
description: "GREENFOOD Assistant - ERP orchestrator"
default_llm: qwen3_support_8b
system_prompt: |
Ти — GREENFOOD Assistant, фронтовий оркестратор ERP-системи для крафтових виробників.
Розумій, хто з тобою говорить (комітент, покупець, склад, бухгалтер), та делегуй задачі відповідним під-агентам.
Якщо у чаті присутні інші агенти (ніки з Bot) — не перебивай, поки тема не стосується ERP/постачань.
tools:
- id: image_generation
type: tool
endpoint: http://image-gen-service:9600/image/generate
description: "Етикетки, маркетинг"
- id: web_search
type: external
endpoint: http://swapper-service:8890/web-search
description: "Пошук постачальників/ринків"
- id: vision
type: llm
model: qwen3-vl:8b
description: "Візуальний контроль партій"
- id: ocr
type: external
endpoint: http://swapper-service:8890/ocr
description: "Зчитування накладних"
agromatrix:
description: "AgroMatrix — агроаналітика та кооперація"
default_llm: qwen3_science_8b
system_prompt: |
Ти — AgroMatrix, AI-агент для агроаналітики, планування сезонів та кооперації фермерів.
Відповідай лаконічно, давай практичні поради для агросектору.
alateya:
description: "Alateya — R&D та біотех інновації"
default_llm: qwen3_science_8b
system_prompt: |
Ти — Alateya, AI-агент для R&D, біотеху та інноваційних досліджень.
Відповідай точними, структурованими відповідями та посилайся на джерела, якщо є.
clan:
description: "CLAN — комунікації кооперативів"
default_llm: qwen3_support_8b
system_prompt: |
Ти — CLAN, координуєш комунікацію, оголошення та community operations.
Відповідай лише коли тема стосується координації, а звернення адресовано тобі (тег @ClanBot чи згадка кланів).
Розпізнавай ботів за username та погоджуй з ними дії.
soul:
description: "SOUL / Spirit — духовний гід комʼюніті"
default_llm: qwen3_support_8b
system_prompt: |
Ти — Spirit/SOUL, ментор живої операційної системи.
Пояснюй місію, підтримуй мораль, працюй із soft-skills.
У групах відповідай тільки на духовні/ціннісні питання або коли кличуть @SoulBot.
druid:
description: "DRUID — R&D агент з косметології та eco design"
default_llm: qwen3_science_8b
system_prompt: |
Ти — DRUID AI, експерт з космецевтики, біохімії та сталого дизайну.
Працюй з формулами, стехіометрією, етичними ланцюгами постачання.
В групах аналізуй, чи звертаються до тебе (нік/тег @DruidBot) і мовчи, якщо тема не наукова.
tools:
- id: web_search
type: external
endpoint: http://swapper-service:8890/web-search
description: "Наукові статті"
- id: math
type: tool
description: "Хімічні/математичні обчислення"
- id: data_analysis
type: tool
description: "Аналіз лабораторних даних"
- id: chemistry
type: tool
description: "Моделювання реакцій"
- id: biology
type: tool
description: "Біологічні взаємодії"
- id: units
type: tool
description: "Конвертація одиниць"
- id: vision
type: llm
model: qwen3-vl:8b
description: "Аналіз фото формул/упаковок"
- id: ocr
type: external
endpoint: http://swapper-service:8890/ocr
description: "Зчитування етикеток"
nutra:
description: "NUTRA — нутріцевтичний агент"
default_llm: qwen3_science_8b
system_prompt: |
Ти — NUTRA, допомагаєш з формулами нутрієнтів, біомедичних добавок та лабораторних інтерпретацій.
Відповідай з науковою точністю, посилайся на джерела, якщо можливо.
Слідкуй, щоб не втручатися у чужі теми — відповідай лише при прямому зверненні чи темах нутріцівтики.
tools:
- id: web_search
type: external
endpoint: http://swapper-service:8890/web-search
description: "Пошук клінічних досліджень"
- id: math
type: tool
description: "Дозування/конверсії"
- id: data_analysis
type: tool
description: "Лабораторні таблиці"
- id: biology
type: tool
description: "Фізіологічні взаємодії"
- id: units
type: tool
description: "Конвертація одиниць"
- id: ocr
type: external
endpoint: http://swapper-service:8890/ocr
description: "Зчитування протоколів"
eonarch:
description: "EONARCH — мультимодальний агент (vision + chat)"
default_llm: qwen3_support_8b
system_prompt: |
Ти — EONARCH, аналізуєш зображення, PDF та текстові запити.
Враховуй присутність інших ботів та працюй лише за прямим тегом або коли потрібно мультимодальне тлумачення.
tools:
- id: vision
type: llm
model: qwen3-vl:8b
description: "Vision reasoning"
- id: ocr
type: external
endpoint: http://swapper-service:8890/ocr
description: "Видобуток тексту"
- id: image_generation
type: tool
endpoint: http://image-gen-service:9600/image/generate
description: "Мокапи, схеми"
helion:
description: "Helion - AI agent for Energy Union platform"
default_llm: qwen3_science_8b
system_prompt: |
Ти - Helion, AI-агент платформи Energy Union.
Допомагай користувачам з технологіями EcoMiner/BioMiner, токеномікою та DAO governance.
- Консультуй щодо hardware, стейкінгу, інфраструктури.
- Аналізуй PDF/зображення, коли просять.
- В групах мовчи, доки тема не про енергетику або немає тегу @HelionBot.
- Використовуй Knowledge Graph для зберігання та пошуку фактів про користувачів і теми.
Визначай інших агентів за ніком (суфікс Bot) і спілкуйся як з колегами.
tools:
# Web Tools (Swapper)
- id: web_search
type: external
endpoint: http://swapper-service:8890/web/search
method: POST
description: "Пошук в інтернеті (DuckDuckGo)"
- id: web_extract
type: external
endpoint: http://swapper-service:8890/web/extract
method: POST
description: "Витягнути контент з URL (Jina/Trafilatura)"
- id: web_read
type: external
endpoint: http://swapper-service:8890/web/read
method: GET
description: "Прочитати сторінку за URL"
# Image Generation (FLUX)
- id: image_generate
type: external
endpoint: http://swapper-service:8890/image/generate
method: POST
description: "Згенерувати зображення за описом (FLUX Klein 4B)"
# Video Generation (Grok xAI)
- id: video_generate
type: external
endpoint: http://swapper-service:8890/video/generate
method: POST
description: "Згенерувати коротке відео (до 6 сек) за описом (Grok xAI)"
# Math & Data
- id: math
type: tool
description: "Енергетичні розрахунки"
- id: data_analysis
type: tool
description: "Обробка сенсорних даних"
# Knowledge Graph Tools (Neo4j)
- id: graph_create_node
type: external
endpoint: http://router:8000/v1/graph/nodes
method: POST
description: "Створити вузол в Knowledge Graph (User, Topic, Fact, Entity)"
- id: graph_create_relation
type: external
endpoint: http://router:8000/v1/graph/relationships
method: POST
description: "Створити зв'язок між вузлами (KNOWS, MENTIONED, RELATED_TO)"
- id: graph_query
type: external
endpoint: http://router:8000/v1/graph/query
method: POST
description: "Запит до Knowledge Graph (знайти зв'язки, факти)"
- id: graph_search
type: external
endpoint: http://router:8000/v1/graph/search
method: GET
description: "Пошук по Knowledge Graph"
- id: units
type: tool
description: "Конвертація енергетичних одиниць"
- id: vision
type: llm
model: qwen3-vl:8b
description: "Опис технічних схем"
- id: ocr
type: external
endpoint: http://swapper-service:8890/ocr
description: "OCR креслень"
yaromir:
description: "Yaromir CrewAI (Вождь/Проводник/Домир/Создатель)"
default_llm: qwen3_strategist_8b
system_prompt: |
Ти — Yaromir Crew. Стратегія, наставництво, психологічна підтримка команди.
Розрізняй інших ботів за ніком та відповідай лише на стратегічні запити.
sofiia:
description: "Sofiia — Chief AI Architect та Technical Sovereign"
default_llm: local_default_coder
system_prompt: |
Ти Sofiia — Chief AI Architect та Technical Sovereign екосистеми DAARION.city.
Працюй як CTO-помічник: архітектура, reliability, безпека, release governance, incident/risk/backlog контроль.
Відповідай українською, структуровано і коротко; не вигадуй факти, якщо даних нема — кажи прямо.
Для задач про інфраструктуру пріоритет: перевірка health/monitor, далі конкретні дії і верифікація.
monitor:
description: "Monitor Agent - архітектор-інспектор DAGI"
default_llm: qwen2_5_3b_service
system_prompt: |
Ти - Monitor Agent, стежиш за нодами, сервісами, агентами.
Якщо бачиш у чаті інших ботів, відповідай тільки за інфраструктурою або прямим тегом.
tools:
- id: get_metrics
type: builtin
- id: check_health
type: builtin
# ============================================================================
# Routing Rules
# ============================================================================
routing:
- id: microdao_chat
priority: 10
when:
mode: chat
use_llm: local_default_coder
description: "microDAO chat → local qwen3"
- id: qa_build_mode
priority: 8
when:
mode: qa_build
use_llm: local_default_coder
description: "Q&A generation from parsed docs"
- id: rag_query_mode
priority: 7
when:
mode: rag_query
use_llm: local_default_coder
description: "RAG query with Memory"
- id: crew_mode
priority: 3
when:
mode: crew
use_provider: orchestrator_crewai
description: "CrewAI workflow orchestration"
- id: vision_encoder_embed
priority: 3
when:
mode: vision_embed
use_provider: vision_encoder
description: "Vision embeddings"
- id: devtools_tool_execution
priority: 3
when:
mode: devtools
use_provider: devtools_devtools
description: "DevTools sandbox/actions"
- id: explicit_provider_override
priority: 5
when:
metadata_has: provider
use_metadata: provider
description: "Explicit provider override"
- id: greenfood_cloud_override
priority: 4
when:
agent: greenfood
metadata_equals:
requires_complex_reasoning: true
use_llm: cloud_deepseek
description: "GREENFOOD складні запити → DeepSeek"
- id: clan_cloud_override
priority: 4
when:
agent: clan
metadata_equals:
requires_complex_reasoning: true
use_llm: cloud_deepseek
description: "CLAN складні запити → DeepSeek"
- id: soul_cloud_override
priority: 4
when:
agent: soul
metadata_equals:
requires_complex_reasoning: true
use_llm: cloud_deepseek
description: "SOUL складні запити → DeepSeek"
- id: eonarch_cloud_override
priority: 4
when:
agent: eonarch
metadata_equals:
requires_complex_reasoning: true
use_llm: cloud_deepseek
description: "EONARCH складні запити → DeepSeek"
- id: devtools_complex_cloud
priority: 10
when:
agent: devtools
and:
- task_type:
- refactor_large
- architecture_review
- security_audit
- performance_analysis
- api_key_available: DEEPSEEK_API_KEY
use_llm: cloud_deepseek
description: "Тяжкі DevTools задачі → DeepSeek"
- id: devtools_default_local
priority: 20
when:
agent: devtools
use_llm: local_default_coder
description: "Будь-які інші DevTools задачі"
- id: microdao_orchestrator_agent
priority: 5
when:
agent: microdao_orchestrator
use_llm: qwen3_strategist_8b
use_context_prompt: true
description: "Оркестратор → стратегічний профіль"
- id: daarwizz_agent
priority: 5
when:
agent: daarwizz
use_llm: qwen3_strategist_8b
use_context_prompt: true
description: "Daarwizz orchestrator"
- id: greenfood_agent
priority: 5
when:
agent: greenfood
use_llm: qwen3_support_8b
use_context_prompt: true
description: "GREENFOOD ERP"
- id: agromatrix_agent
priority: 5
when:
agent: agromatrix
use_llm: qwen3_science_8b
use_context_prompt: true
description: "AgroMatrix агроаналітика"
- id: alateya_agent
priority: 5
when:
agent: alateya
use_llm: qwen3_science_8b
use_context_prompt: true
description: "Alateya R&D"
- id: clan_agent
priority: 5
when:
agent: clan
use_llm: qwen3_support_8b
use_context_prompt: true
description: "CLAN community operations"
- id: soul_agent
priority: 5
when:
agent: soul
use_llm: qwen3_support_8b
use_context_prompt: true
description: "SOUL / Spirit мотивація"
- id: druid_agent
priority: 5
when:
agent: druid
use_llm: qwen3_science_8b
use_context_prompt: true
description: "DRUID science"
- id: nutra_agent
priority: 5
when:
agent: nutra
use_llm: qwen3_science_8b
use_context_prompt: true
description: "NUTRA science"
- id: eonarch_agent
priority: 5
when:
agent: eonarch
use_llm: qwen3_support_8b
use_context_prompt: true
description: "EONARCH vision"
- id: helion_agent
priority: 5
when:
agent: helion
use_llm: cloud_deepseek
fallback_llm: cloud_mistral
use_context_prompt: true
description: "Helion energy - DeepSeek з fallback на Mistral"
- id: yaromir_agent
priority: 5
when:
agent: yaromir
use_llm: qwen3_strategist_8b
use_context_prompt: true
description: "Yaromir crew"
- id: monitor_agent
priority: 5
when:
agent: monitor
use_llm: qwen2_5_3b_service
use_context_prompt: true
description: "Моніторинг інфраструктури"
- id: fallback_local
priority: 100
when: {}
use_llm: local_default_coder
description: "Fallback: всі інші запити → базова qwen3"
# ============================================================================
# Telemetry & Policies
# ============================================================================
telemetry:
enabled: true
log_level: INFO
metrics:
- requests_total
- latency_ms
- tokens_used
policies:
rate_limit:
enabled: false
cost_tracking:
enabled: true
audit_mode:
enabled: false