mofa-agent-swarm

Persist agent identities, roles, and task queues in SQLite for multi-agent orchestration.

11|12|Updated Feb 28, 2026
One-click install
npx skills add https://github.com/mofa-org/mofa-skills --skill mofa-agent-swarm
Or copy as Structured Prompt for Agent▼
Please help me install this Agent Skill.
Skill: mofa-agent-swarm
Source: https://github.com/mofa-org/mofa-skills/tree/main/_unpublished/mofa-agent-swarm
Command: npx skills add https://github.com/mofa-org/mofa-skills --skill mofa-agent-swarm

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

This skill provides a centralized, SQLite-backed state store for multi-agent systems, enabling reliable orchestration of agent identities, roles, and queued tasks across the swarm.

Core Features & Use Cases

  • State Persistence: Preserves agent identities, roles, concurrent task limits, and pending task queues in a robust rusqlite layer.
  • Async-Oriented Design: Built on tokio and designed to integrate with async runtimes; task metadata is stored for external executors to route and execute.
  • Dynamic Provisioning: Records metadata for specialized sub-agents (e.g., researcher, coder, reviewer) to be created and managed by the surrounding orchestrator.
  • FK-enforced Consistency: SQLite foreign keys ensure cascading cleanup of tasks when an agent is shut down.
  • Priority-based Task Queue: Tasks are ranked 1–10 (default 5) and fetched in priority order by consumers.

Quick Start

Spawn a new sub-agent with a role and system prompt to join the swarm.

Frequently Asked Questions about mofa-agent-swarm

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I persist multi-agent swarm state in SQLite?▼

Multi-agent swarm state is persisted in SQLite by storing agent identities, roles, concurrent task limits, and pending task queues in a robust rusqlite layer. This centralized state store enables reliable orchestration across the swarm.

How does asynchronous task delegation work with Tokio?▼

Asynchronous task delegation with Tokio stores task metadata in the SQLite-backed state store for external executors to route and execute. The system is built on tokio and designed to integrate seamlessly with async runtimes.

Can I spawn dynamic sub-agents like researchers and coders in a multi-role workflow?▼

Dynamic sub-agents like researchers, coders, and reviewers are spawned by recording their metadata and system prompts in the SQLite state store. A central orchestrator then creates and manages these specialized agents for multi-role workflows.

What is the best way to ensure task consistency when an agent shuts down?▼

Task consistency when an agent shuts down is ensured through SQLite foreign keys that enforce cascading cleanup of tasks. This FK-enforced consistency automatically removes pending tasks associated with the terminated agent.

How are prioritized tasks fetched by consumers in an agent queue?▼

Prioritized tasks are fetched by consumers in rank order, with tasks ranked 1–10 and a default priority of 5. The priority-based task queue ensures higher-priority tasks are retrieved and executed before lower-priority ones.

Do I need an external orchestrator to manage the agent swarm?▼

An external orchestrator is required to manage the agent swarm, as the system provides a SQLite-backed state store rather than an execution engine. The orchestrator handles spawning, monitoring, and routing tasks to the surrounding async executors.