Skip to main content

TechTide Swarm 357 — layered orchestration, durable memory bridge, and observability hooks.

Project description

techtide-swarm

PyPI Python License CI

Python package for Swarm 357: layered orchestration of 357 Claude agent roles across six business layers, portable Memvid memory, cost controls, and a FastAPI HTTP surface.

Install

pip install techtide-swarm
swarm demo

Editable (from repo root):

pip install -e "packages/techtide-swarm[dev]"

The wheel bundles config/swarm-compact.yaml and templates/soul/ so swarm boot works after a plain pip install.

Quickstart

export ANTHROPIC_API_KEY=sk-ant-...   # or OPENROUTER_API_KEY + ANTHROPIC_BASE_URL
swarm init
swarm boot                            # loads 357-agent compact roster
swarm run "Draft a Tier-1 401 triage checklist" --budget 1.0
swarm serve --port 8000

OpenRouter (recommended for evals/cost control):

export OPENROUTER_API_KEY=...
export ANTHROPIC_BASE_URL=https://openrouter.ai/api
export SWARM_MODEL_SONNET=anthropic/claude-sonnet-4

Public API

from techtide_swarm import (
    Agent, AgentConfig, Swarm, UltraPlan, UltraPlanConfig,
    MemoryManager, CostController, BashSecurityGate, __version__,
)
from techtide_swarm.core.types import LayerType

agent = Agent(AgentConfig(
    name="research-market-001",
    layer=LayerType.RESEARCH,
    role="market_researcher",
    soul="templates/soul/research/market-analyst.md",
    tools=["Read", "Write"],
    model="sonnet",
    budget_limit_usd=1.0,
))

Also exported: AgentResult, SwarmExecutionResult, SwarmStore, MemvidBridge, ToolRegistry, TOOLSET_MAP, registry.

CLI

Command Purpose
swarm init Create .swarm/, .env, memory index
swarm demo Stub or live 3-agent demo
swarm boot Load roster + print layer budgets
swarm run <task> Full swarm or --layer execution
swarm agent List / inspect / run one agent
swarm status / swarm cost Telemetry dashboards
swarm dream Memory consolidation cycle
swarm plan <task> UltraPlan (Opus by default)
swarm migrate Flat topics → Memvid .mv2
swarm eval Budgeted eval harness
swarm serve FastAPI via uvicorn
swarm mcp list|connect MCP server tools

HTTP API

uvicorn techtide_swarm.server:app (or swarm serve):

Method Path Notes
GET /api/health version, agent count, API key presence
GET /api/swarm/status layer stats + cost
GET /api/swarm/agents roster summary
GET /api/swarm/agents/{name} agent detail
GET /api/swarm/cost spend report
GET /api/swarm/runs recent runs
POST /api/swarm/run swarm/layer run (X-SWARM-API-KEY when set)
POST /api/agent/run single agent
POST /api/swarm/dream dream cycle

Environment

Variable Purpose
ANTHROPIC_API_KEY / OPENROUTER_API_KEY LLM credentials
ANTHROPIC_BASE_URL e.g. https://openrouter.ai/api
SWARM_MODEL_{OPUS,SONNET,HAIKU} Model ID overrides
SWARM_API_KEY Protect POST routes
SWARM_MAX_RUN_BUDGET_USD Cap request budget_usd
SWARM_RATE_LIMIT_PER_MINUTE Per-IP rate limit (0 disables)
SWARM_CONFIG_PATH Roster YAML override
MEMVID_SWARM_BRIDGE Path to Rust bridge binary
SWARM_WRITE_SAFE_ROOT Sandbox for Write tool

Docs

License

Apache-2.0

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

techtide_swarm-0.2.1.tar.gz (137.3 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

techtide_swarm-0.2.1-py3-none-any.whl (188.3 kB view details)

Uploaded Python 3

File details

Details for the file techtide_swarm-0.2.1.tar.gz.

File metadata

  • Download URL: techtide_swarm-0.2.1.tar.gz
  • Upload date:
  • Size: 137.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.13.14

File hashes

Hashes for techtide_swarm-0.2.1.tar.gz
Algorithm Hash digest
SHA256 075cdeefda27526b2a9ce8e32c6046ef8ef7377ea6e7843bcc8a5c1b3688c824
MD5 6871b619e0f2b10623f69031dc3f6764
BLAKE2b-256 6d25830f9fe2daff78d63f37c8a706a0d481000234ad627893bb18eb27f9c612

See more details on using hashes here.

File details

Details for the file techtide_swarm-0.2.1-py3-none-any.whl.

File metadata

  • Download URL: techtide_swarm-0.2.1-py3-none-any.whl
  • Upload date:
  • Size: 188.3 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.13.14

File hashes

Hashes for techtide_swarm-0.2.1-py3-none-any.whl
Algorithm Hash digest
SHA256 7a4e8b4372b8d2191bcca17d59e440ef4a63f4e8e741a84e7f888e3a8aa3d4b9
MD5 814479d5a126afdc448d4169af690b82
BLAKE2b-256 70aeebea9677cf664acee039824c81a9930b7c33b8bb9e5df0afdebfd0fedf16

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page