cervellaswarm-spawn-workers
Config-driven worker spawning for multi-agent systems.
Part of CervellaSwarm - Build AI agent teams that remember.
Features
- Auto-detect backend: tmux (preferred) or nohup (universal fallback)
- Config-driven: Spawn teams from
team.yamlfiles - Signal handling: Graceful shutdown on SIGINT/SIGTERM
- Health checks: Monitor worker status, uptime, and liveness
- File-based state:
.ready/.working/.donetask markers - Cross-platform: Works on macOS and Linux
Quick Start
pip install cervellaswarm-spawn-workers
# Spawn a single worker
cervella-spawn --worker backend --specialty backend
# Spawn a team from config
cervella-spawn --team team.yaml
# Check worker status
cervella-spawn --status
# Kill all workers
cervella-spawn --kill
# List available specialties
cervella-spawn --list
How It Works
team.yaml ──→ TeamLoader ──→ SpawnManager ──→ Backend (tmux/nohup)
│
PromptBuilder
│
claude -p --append-system-prompt
- TeamLoader reads your
team.yamland extracts agent configurations - PromptBuilder generates English system prompts with specialty focus
- SpawnManager launches workers via the detected backend
- Workers check
tasks_dir/for.readyfiles, claim with.working, finish with.done
team.yaml Format
name: my-project
version: "1.0.0"
process: hierarchical
agents:
- name: backend
type: worker
specialty: backend
model: sonnet
- name: tester
type: worker
specialty: tester
model: sonnet
spawn:
max_workers: 5
tasks_dir: .swarm/tasks
logs_dir: .swarm/logs
backend: tmux # or "nohup", omit for auto-detect
CLI Reference
cervella-spawn [OPTIONS]
Options:
--team PATH Spawn workers from team.yaml config
--worker NAME Spawn a single worker by name
--status Show worker status (alive/dead/uptime)
--kill Kill all workers gracefully
--list List available worker specialties
--specialty TYPE Worker specialty (default: generic)
--prompt TEXT Custom system prompt for the worker
--tasks-dir DIR Tasks directory (default: .swarm/tasks)
--logs-dir DIR Logs directory (default: .swarm/logs)
--max-workers N Max concurrent workers (default: 5)
--backend TYPE Force backend: tmux or nohup
--claude-bin PATH Path to claude CLI binary
--version Show version
Available Specialties
| Specialty | Focus Area |
|---|---|
backend |
Python, FastAPI, databases, API design |
frontend |
React, CSS, Tailwind, UI/UX, accessibility |
tester |
Testing, debugging, QA, validation |
docs |
Documentation, README, guides, tutorials |
devops |
Deployment, CI/CD, Docker, infrastructure |
data |
SQL, analytics, database design, ETL |
security |
Security audits, vulnerability assessment |
researcher |
Technical research, analysis, reports |
reviewer |
Code review, best practices, architecture |
generic |
General-purpose tasks across all domains |
Python API
from cervellaswarm_spawn_workers import SpawnManager, load_team
# Spawn from team config
team = load_team(Path("team.yaml"))
manager = SpawnManager(max_workers=5)
result = manager.spawn_team(team)
print(f"Spawned: {result.spawned}, Failed: {result.failed}")
# Spawn a single worker
worker = manager.spawn_worker(
name="backend",
specialty="backend",
)
# Check status
for status in manager.get_status():
print(f"{status.name}: {'ALIVE' if status.alive else 'DEAD'}")
# Cleanup
manager.kill_all()
How It Compares
| Feature | CervellaSwarm | CrewAI | AutoGen | LangGraph |
|---|---|---|---|---|
| Config-driven spawn | team.yaml | agents.yaml | No | No |
| Subprocess isolation | tmux/nohup | threads | threads | in-process |
| Backend auto-detect | Yes | N/A | N/A | N/A |
| Signal handling | SIGINT/SIGTERM | No | No | No |
| File-based state | .ready/.working/.done | No | No | No |
| Worker health check | CLI --status |
No | max_turns | No |
| Cross-platform | macOS + Linux | Yes | Yes | Yes |
| Dependencies | 1 (pyyaml) | 20+ | 15+ | 10+ |
Honest note: CrewAI and AutoGen excel at in-process agent orchestration with rich LLM routing. CervellaSwarm targets a different niche: subprocess-isolated workers with file-based coordination, ideal for long-running tasks where process isolation and crash recovery matter.
Architecture
The package has 4 core modules:
backend- Execution backends (tmux/nohup) with auto-detectionteam_loader- YAML config parser compatible with agent-templatesspawner- SpawnManager lifecycle (spawn, monitor, kill, cleanup)prompt_builder- English system prompt generation with specialties
Development
git clone https://github.com/rafapra3008/cervellaswarm.git
cd cervellaswarm/packages/spawn-workers
pip install -e ".[test]"
pytest
License
Apache-2.0 - See LICENSE for details.
Metadata
Release files for cervellaswarm-spawn-workers 0.1.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| cervellaswarm_spawn_workers-0.1.0.tar.gz | 32.1 kB | With provenance | Details for cervellaswarm_spawn_workers-0.1.0.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| cervellaswarm_spawn_workers-0.1.0-py3-none-any.whl | Python 3 | none | any | Details for cervellaswarm_spawn_workers-0.1.0-py3-none-any.whl |
Total release size: 52.5 kB
Release files / cervellaswarm_spawn_workers-0.1.0.tar.gz
| Download URL | cervellaswarm_spawn_workers-0.1.0.tar.gz |
|---|---|
| Size | 32.1 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
23703ab933cd3525531b16ffb358d7d87a7c83dedb2b6d07375f97d9423eb3f4
|
|
BLAKE2b-256 checksum How to use checksums |
e365e0e0dfea03fa63ce07e75048f40478b450c3ba152428008cda6351304b6f
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/6.1.0 CPython/3.13.7
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Feb 25, 2026.
Transparency logRelease files / cervellaswarm_spawn_workers-0.1.0-py3-none-any.whl
| Download URL | cervellaswarm_spawn_workers-0.1.0-py3-none-any.whl |
|---|---|
| Size | 20.4 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
889c2815cf2f0693252ca44d11b223297ed8dfa6e99c1ab7cd2b0f6971c1d5a3
|
|
BLAKE2b-256 checksum How to use checksums |
fa8ba691fe04177eab7838208fd056cd6a3a5be3285ace5ece7a08899f2d76cc
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/6.1.0 CPython/3.13.7
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Feb 25, 2026.
Transparency logSecurity for cervellaswarm-spawn-workers 0.1.0
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
Full provenance
All 2 files in this release have been uploaded with provenance metadata.
Attestation for cervellaswarm_spawn_workers-0.1.0.tar.gz
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Feb 25, 2026.
Transparency logA note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.