Create agent and ai_task sub-components to run autonomous AI agents inside FastMCP. Tasks execute on a schedule using Claude AI with access to all MCP tools.
Each agent is an AI model configuration. Multiple tasks can share one agent. The agent defines who does the work.
Each task defines what the agent should do. Link to an agent via ai_task-agent. Chain tasks via ai_task-ai_task.
Agent fallback: If a task has no ai_task-agent link, it automatically uses the first available agent. In single-agent setups, you don't need to link every task — the fallback handles it.
Link tasks via ai_task-ai_task to create pipelines. On success, the next task runs automatically with the previous result as context.
Only the first task needs a cron. Each task in the chain can use a different agent (cost optimization).
Chain rules:
cron_expression — chained tasks trigger automatically on successretry_count > 0)"Query Prometheus for pods with CPU > 80% or memory > 90%. Check Loki for error logs. Summarize findings."
"Run all stack-agent validation tests. Report failures with test name, component, and error details."
"Check PostgreSQL for tables with > 1M rows and no recent VACUUM. Run ANALYZE on tables that need it."
"Check OPA compliance for all namespaces. Report security violations grouped by severity."
These 6 tools are registered when agent/task sub-components exist. Use them from Claude Desktop or any MCP client to monitor and control the autonomous loop.