Skill for coordinating with autonomous loopic agents (monitoring, support, deployment, customization, migration)
This skill helps AI assistants coordinate with the autonomous agent loops running in the orchestrator.
The n8n-infrastructure project uses autonomous loopic agents that run continuously in background loops:
These agents are always running and handle most issues automatically. This skill helps you work with them, not against them.
Located in agents/orchestrator/src/agents/:
SupportAgent (support.agent.ts)
DeploymentAgent (deployment.agent.ts)
CustomizationAgent (customization.agent.ts)
MigrationAgent (migration.agent.ts)
Check agent status BEFORE manual intervention when:
When to use: Before any manual intervention, to see if agents are handling it.
Instructions:
# Check if orchestrator is running
docker ps | Select-String "miconsul-orchestrator"
# If orchestrator is in this project (not all deployments have it running yet):
# View orchestrator logs
docker logs miconsul-orchestrator --tail 50
# Check for recent agent activity
docker logs miconsul-orchestrator --tail 100 | Select-String "SupportAgent|DeploymentAgent|CustomizationAgent"
Expected Output:
What to do:
When to use: To see what events the system is processing.
Instructions:
# If Redis is running (Event Bus):
docker ps | Select-String "redis"
# View Redis activity (if orchestrator is deployed):
docker logs miconsul-redis --tail 50
Event Types to Look For:
HEALTH_CHECK_FAILED - SupportAgent will auto-healANOMALY_DETECTED - System is investigatingOPTIMIZATION_SUGGESTED - System improving performanceERROR_RATE_INCREASING - Predictive alertWhat to do:
agents/orchestrator/dist)When to use: Understanding system health and autonomous performance.
Instructions:
# If orchestrator dashboard is available (future feature):
# curl http://localhost:3000/dashboard
# For now, check agent code to understand what loops do:
Get-ChildItem "agents\orchestrator\src\agents" -Filter "*.agent.ts" | Select-Object Name
# Read specific agent logic:
Get-Content "agents\orchestrator\src\agents\support.agent.ts"
Understanding the Loops (from docs/sistema_bucle_agentico.md):
| Loop | Interval | Purpose |
|---|---|---|
| Monitoring | 30s | Detect failures, anomalies |
| Optimization | 5min | Improve performance |
| Predictive | 1min | Predict future issues |
| Learning | 1h | Learn patterns, best practices |
| Maintenance | 24h | Cleanup, optimize DB |
When to use: User reports issue, need to check if auto-healing is in progress.
Instructions:
# Check recent n8n logs for recovery attempts
docker logs n8n-v2 --tail 100 | Select-String "restart|recovery|auto-heal"
# Check if SupportAgent triggered recovery (if orchestrator running):
docker logs miconsul-orchestrator --tail 50 | Select-String "SupportAgent.*recovery"
# Check Docker restart count (indicates auto-healing attempts):
docker inspect n8n-v2 --format='{{.RestartCount}}'
Decision Tree:
Is there an error?
โโ Yes โ Check auto-healing logs
โ โโ Auto-healing in progress?
โ โ โโ Yes โ Wait 2-5 minutes, monitor
โ โ โโ No โ Proceed with manual fix
โ โโ Auto-healing failed?
โ โโ Escalate or manual intervention
โโ No โ All good, no action needed
When to use: Multi-tenant operations, understanding which client is affected.
Instructions:
# View tenant configuration (if exists):
Get-Content "agents\orchestrator\config\tenants.json" -ErrorAction SilentlyContinue | ConvertFrom-Json
# Or check environment for tenant info:
Get-Content ".env" | Select-String "TENANT"
Tenant Features (from agent code):
autoHealing: Whether SupportAgent auto-restarts on failureautoOptimize: Whether OptimizationAgent applies fixes automaticallyautoUpdate: Whether system applies safe updatesNote: Current deployment may not have full multi-tenant setup yet. Check IMPLEMENTATION_STATUS.md for current phase.
When to use: Confirming which agents are actually running vs just code artifacts.
Instructions:
# Check if orchestrator container exists:
docker ps -a | Select-String "orchestrator"
# Check docker-compose for orchestrator service:
Get-Content "docker-compose.yml" | Select-String "orchestrator" -Context 5
# Check implementation status:
Get-Content "IMPLEMENTATION_STATUS.md" | Select-String "agent|orchestrator" -Context 2
Current State (as of 2026-01-16):
agents/orchestrator/docs/sistema_bucle_agentico.mdWhen to use: You need to do manual operation despite autonomous agents.
Rules for Manual Intervention:
Example - Safe Manual Restart:
# 1. Check if auto-healing is active
docker logs n8n-v2 --tail 20 | Select-String "restart"
# 2. If no auto-healing in last 2 minutes, safe to proceed
# 3. Perform restart
docker-compose restart n8n
# 4. Monitor to ensure agents see the change
Start-Sleep -Seconds 30
.\monitor-n8n.ps1
When to use: Understanding what agents can do automatically.
Key Files:
agents/orchestrator/src/
โโโ agents/
โ โโโ support.agent.ts # Auto-healing, error handling
โ โโโ deployment.agent.ts # Workflow deployment
โ โโโ customization.agent.ts # Personalization
โ โโโ migration.agent.ts # Data migration
โโโ events/
โ โโโ event-bus.service.ts # Redis Pub/Sub
โ โโโ event-types.enum.ts # All event types
โโโ loops/
โโโ (future: monitoring.loop.ts, etc.)
Reading Agent Code:
# View SupportAgent capabilities:
Get-Content "agents\orchestrator\src\agents\support.agent.ts"
# See what events it listens to:
Get-Content "agents\orchestrator\src\agents\support.agent.ts" | Select-String "eventBus.on"
# Check available event types:
Get-Content "agents\orchestrator\src\events\event-types.enum.ts"
graph TD
A[User Reports Issue] --> B{Check Orchestrator}
B -->|Running| C[Check Agent Logs]
B -->|Not Running| D[Use Manual n8n-management Skill]
C --> E{Auto-Healing Active?}
E -->|Yes| F[Wait 5min, Monitor]
E -->|No| G[Check Event Bus]
G --> H{Recent Events?}
H -->|Yes| I[Agents are aware, wait]
H -->|No| D
F --> J{Issue Resolved?}
J -->|Yes| K[Report Success]
J -->|No| D
| Scenario | Autonomous | Manual |
|---|---|---|
| n8n container down | โ SupportAgent auto-heals | โ ๏ธ If fails after 5min |
| Workflow JSON invalid | โ Not auto-detected yet | โ Use n8n-management |
| High error rate | โ Monitoring Loop alerts | ๐ Support investigates |
| New workflow deploy | โ DeploymentAgent | โ Or manual via UI |
| Credential expiring | โ Predictive Loop warns | โ Manual renewal needed |
| Performance slow | โ Optimization Loop fixes | โ ๏ธ If persists |
As the orchestrator develops:
http://localhost:3000/dashboard (planned)docs/sistema_bucle_agentico.md - Full autonomous system designdocs/agentes_mcp_resumen.md - Agent summaries and use casesagents/orchestrator/ - Agent source codeIMPLEMENTATION_STATUS.md - Current deployment phaseLast Updated: 2026-01-16
Version: 1.0
Agent Deployment Phase: Check IMPLEMENTATION_STATUS.md for current status