Swarm Observer logo

Swarm Observer

Community
ulises-jeremias
swarm-observer

Observe, diagnose, and recover Agent Toolkit swarm runs via status, handoffs, logs, and attach with worktree and shell awareness.

Overview

Publisherulises-jeremias
Repositoryagent-toolkit
Skill nameswarm-observer
Stars
20
Forks
5
Bundled files
Instructions only
LicenseMIT
Links
  • Markdown instructions

    A SKILL.md file the model loads on demand, so it only costs tokens when a request actually matches.

  • Works with any LLM

    AI skills are plain Markdown, not provider-specific code, so this works with GPT, Claude, Gemini, Grok, or a local model.

  • Self-contained

    Everything the model needs lives in the instructions — no extra files to sync.

  • Open source

    Published by ulises-jeremias on GitHub. Read the source before you install it.

Installation

Install the Swarm Observer AI skill in TypingMind to use it with any LLM, or drop it into another agent that reads SKILL.md.

1

Install in TypingMind

TypingMind installs a skill straight from its GitHub folder — it reads SKILL.md, bundles the resource files, and stores the result locally.

  1. Open the app and go to Plugins → Skills.
  2. Choose "Install from GitHub".
  3. Paste the skill folder URL below and confirm.
    https://github.com/ulises-jeremias/agent-toolkit/tree/main/plugins/agent-toolkit-complete/skills/swarm-observer
  4. Enable the skill in any chat where you want it available.
Plugins → Skills → Add skill → From GitHub URL, then paste the folder URL and press Continue.
2

Install in another agent

Any agent that reads the Agent Skills format can use this skill — copy the folder into that agent's skills directory.

Claude Code — .claude/skills
git clone --depth 1 https://github.com/ulises-jeremias/agent-toolkit.git /tmp/agent-toolkit
mkdir -p .claude/skills
cp -r /tmp/agent-toolkit/plugins/agent-toolkit-complete/skills/swarm-observer .claude/skills/swarm-observer
Restart Claude Code after copying so it picks up the new skill.

Use it in TypingMind

Enable Swarm Observer in any TypingMind chat and the model takes it from there. Its name and description sit in the system prompt, and the moment a request matches, the model loads the full instructions itself — you never invoke it by hand, and it costs no tokens until it is actually used.

The model loads Swarm Observer on its own as soon as a request matches it.

Works with any AI model

AI skills are plain Markdown instructions rather than provider-specific code, so Swarm Observer is not tied to the model it was written for. Install it once in TypingMind and use it with GPT-5, Claude, Gemini, Grok, DeepSeek, Mistral, Llama, or a local model you run yourself — all on your own API keys.

  • Loaded only when it is needed

    The system prompt carries just the name and description. The instructions are fetched on the first matching request, so an idle skill costs nothing.

  • Switch models mid-chat

    Because the skill is instructions rather than code, changing model does not break it — the next model reads the same SKILL.md.

Skill instructions

This is the SKILL.md content the model loads. Read it before installing — a skill is instructions your model will follow.

Swarm Observer

Monitor any agent-toolkit swarm run, diagnose stuck handoffs or backend drift, and recover without losing windows. Works for both Herdr (tabs) and tmux (isolated socket agent-toolkit-swarm-<run-id>). Integrates with swarm's eager-window model (every role starts as Waiting for handoff: <pred> -> <role> with agent_waiting trace).

When to use

  • A swarm was launched and the user asks "is it done?", "what's the status?", "show logs", or "attach".
  • A handoff has been active for >5m (955be6f6e2c... pattern) or worktree_failed.
  • Herdr shows extra workspaces (w7-wA) for headless runs — the get_backend("headless") fallback case.
  • User wants to reuse the same run for a new request and needs to know if windows are still alive.

Prerequisites

  • Run lives under .agent-toolkit/swarm/runs/<run-id>/state.json (filesystem is authoritative).
  • Know run-id (20260807T...-xxxxxx) from swarm start --json or swarm list --json.
  • Shell is detected (_user_shell(): $SHELL → pwd.getpwuid → /usr/bin/zsh fallback, executed as <shell> -lc).

Workflow

1. List and pick the run

bash
agent-toolkit swarm list --json | jq
agent-toolkit swarm status --run-id <run-id>
agent-toolkit swarm status --run-id <run-id> --json | jq '.handoffs,.worktrees,.trace'

2. Inspect handoffs and trace

bash
agent-toolkit swarm handoffs --run-id <run-id>
agent-toolkit swarm handoffs --run-id <run-id> --json | jq '.[] | {id,from,to,status,artifact,auto}'
# Active that should have auto-completed:
#   where to==from_role and handoff create --to == that role -> auto:true

Trace keys to watch: agent_waiting, handoff_completed auto:true, worktree_failed, headless_fallback.

3. Tail logs and attach

bash
agent-toolkit swarm logs --run-id <run-id> --follow
agent-toolkit swarm logs --run-id <run-id> --role reviewer --follow
agent-toolkit swarm attach --run-id <run-id>          # herdr: workspace focus; tmux: attach -L agent-toolkit-swarm-<run-id>
herdr workspace list --json 2>&1 | jq '.[] | {id,name,status}'
tmux -L agent-toolkit-swarm-<run-id> capture-pane -t <window> -p | tail -n 80

4. Diagnose

SymptomCauseFix
`Waiting for handoff: a -> brole: b` stuck >5mactive handoff never task complete
worktree_failedfind_repo_root failed (git rev-parse --git-common-dir on .git file)Re-run handoff create — fixed via AGENT_TOOLKIT_SWARM_RUN_ID export + path extract
Extra Herdr workspaces w7-wA with headlessget_backend("headless") returned HerdrBackendPatch backends/__init__.py to return headless/noop backend; then herdr workspace delete <id> for orphans
Shell shows bash while user uses zshHardcoded bash -lcFixed via _user_shell() / _shell_base() — verify ps -o comm= -p <pid> shows zsh

5. Recover or reuse

bash
# Complete stuck handoff and provision next role (worktree/tab + agent start)
agent-toolkit swarm handoff create --type artifact --from implementer --to reviewer --artifact artifacts/fix.md --run-id <run-id>

# Reuse same windows for a new request (no new run needed)
agent-toolkit swarm handoff create --type artifact --from implementer --to reviewer --artifact artifacts/new-task.md --run-id <run-id>
# Chain re-triggers: implementer -> reviewer -> integrator via file handoffs

# Only create a new run when isolated branch is required
agent-toolkit swarm start --recipe pair --ui herdr --runner opencode --model-profile balanced --attach "new isolated task"

Boundaries

  • Never edit .agent-toolkit/swarm/runs/<run-id>/state.json by hand; use handoff create / task complete / promote.
  • Never create new Herdr workspaces for headless — fix the backend fallback instead.
  • For tmux, always use isolated socket -L agent-toolkit-swarm-<run-id>; never the default server.

Delegates to

NeedSkill/Command
Show failure snippet before fixingswarm-handoff
Recreate worktreeagent-toolkit swarm handoff create (auto-provisions)
Review code produced by swarmcode-reviewer, security-reviewer
Create PR after promotiongithub-cli-workflow

Frequently asked questions

What does the Swarm Observer AI skill do?

Observe, diagnose, and recover Agent Toolkit swarm runs via status, handoffs, logs, and attach with worktree and shell awareness.

Why use Swarm Observer on TypingMind?

Because you install it once and use it with any model. Swarm Observer is plain Markdown rather than provider-specific code, so the same skill runs on GPT-5, Claude, Gemini, Grok, or a local model — and you can switch model mid-chat without it breaking. TypingMind runs on your own API keys, so you pay providers directly instead of a per-seat subscription, and your skills and chats stay in your own storage.

How do I install Swarm Observer in TypingMind?

Open Plugins → Skills → Install from GitHub in TypingMind and paste https://github.com/ulises-jeremias/agent-toolkit/tree/main/plugins/agent-toolkit-complete/skills/swarm-observer. TypingMind reads its SKILL.md and installs it as a skill you can enable per chat.

Which AI models can use Swarm Observer?

Any model you connect in TypingMind. AI skills are plain Markdown instructions rather than provider-specific code, so GPT, Claude, Gemini, Grok, and local models can all load this skill when a request matches it.

How many AI models can I use with Swarm Observer?

As many as you like. As long as a model supports skills, you can use Swarm Observer with it — GPT, Claude, Gemini, Grok, DeepSeek, Mistral, Llama and more — all on TypingMind with your own API keys.

Is the Swarm Observer AI skill free?

Yes. It is published on GitHub by ulises-jeremias under the MIT license. You only pay your own AI provider for the tokens you use.

What are AI skills?

An AI skill is a reusable instruction bundle that teaches an AI model how to do one specific task. It follows the open Agent Skills format: a SKILL.md file with a name and description, plus any scripts, templates or reference files the model may need. The model reads the instructions only when your request matches the skill, so an installed skill costs nothing until it is used.

How are AI skills different from plugins or MCP servers?

A plugin or MCP server gives a model new tools to call — code that runs somewhere and returns a result. An AI skill gives the model knowledge and process instead: how to approach a task, which steps to follow, what good output looks like. Skills are plain Markdown, so they need no server, no API key and no runtime, and they work with any model.

View all

Set up your own AI workspace now

Get notified about new features and future giveaways by subscribing to our newsletter 👇