AMCOS Agent Replacement

VerifiedCaution

Replaces a failed AI agent when recovery is impossible or terminal. It confirms the failure, preserves recoverable artifacts to a handoff directory, requests manager approval via EAMA, creates a new agent using the ai-maestro-agents-management skill, notifies the orchestrator (EOA) to generate handoff docs and update the kanban, and sends validated handoff documentation to the new agent. This skill is triggered by agent replacement or failover events in environments running AI Maestro.

Sby Skills Guide Bot
DevOpsAdvanced
6/2/2026
Claude Code
#agent-replacement#failover#amcos#multi-agent#recovery

Recommended for

Automated summary

This skill automates the replacement of a failed AI agent in a multi-agent system by coordinating with a manager, preserving work artifacts, creating a new agent, and handing off tasks.

Strengths

  • Ensures continuity after terminal failures
  • Preserves work artifacts to prevent loss
  • Provides a validation checklist to guarantee handoff integrity
  • Clearly defines roles between agent creator and orchestrator

Limitations

  • Requires external manager approval (EAMA), which can introduce delay
  • Depends on AI Maestro infrastructure for agent registration
  • New agent has no memory of the old one, requiring comprehensive handoff documentation
When to use it

Use this skill when an AI agent has failed permanently and manual replacement is undesirable.

When not to use it

Do not use it for temporary failures where recovery is possible, or in single-agent setups.

Security analysis

Caution
Quality score92/100

The skill involves network requests (curl) to a local AI Maestro API for agent replacement notifications. It does not perform destructive actions, exfiltrate data, or disable safety mechanisms. However, the use of bash commands and network communication warrants caution in misconfigured environments.

Findings
  • •Uses curl commands to communicate with an internal API. While intended for local system messaging, improper configuration could expose the API. The commands include user-supplied agent names, which if not sanitized could lead to injection risks in naive implementations.
How this analysis is made

Examples

Request Replacement Approval
Request replacement approval for a failed agent by sending an urgent message to the manager. Use the AMCOS replacement protocol: curl -X POST "$AIMAESTRO_API/api/messages" -H "Content-Type: application/json" -d '{"to":"eama-assistant-manager","subject":"URGENT: Replace libs-svg-svgbbox","priority":"urgent","content":{"type":"replacement-request","message":"Terminal failure (3 crashes). Requesting replacement approval.","failed_agent":"libs-svg-svgbbox"}}'
Notify Orchestrator of Replacement
Notify the orchestrator about a newly created agent so it can generate handoff docs and update the kanban. Use: curl -X POST "$AIMAESTRO_API/api/messages" -H "Content-Type: application/json" -d '{"to":"eoa-orchestrator","subject":"Agent replaced: libs-svg-svgbbox","priority":"high","content":{"type":"replacement-notification","message":"Please generate handoff docs and update kanban.","old_agent":"libs-svg-svgbbox","new_agent":"replacement-agent-uuid"}}'

name: amcos-agent-replacement description: Use when replacing a failed agent with a new instance. Trigger with agent replacement or failover events. user-invocable: false license: Apache-2.0 compatibility: Requires AI Maestro installed. metadata: author: Emasoft version: 1.0.0 context: fork agent: amcos-main

AMCOS Agent Replacement

Overview

Replace a failed agent when recovery has failed or failure is terminal. Covers failure confirmation, artifact preservation, manager approval, agent creation, orchestrator notification, and work handoff.

Prerequisites

  • Failure classified as Terminal, or all recovery strategies exhausted
  • AI Maestro running locally with agent registry accessible
  • Handoff directory at $CLAUDE_PROJECT_DIR/thoughts/shared/handoffs/

Instructions

Phase 4: Agent Replacement Protocol

  1. Confirm failure -- verify all recovery strategies attempted or failure is terminal
  2. Preserve artifacts -- save recoverable work to thoughts/shared/handoffs/AGENT_NAME/
  3. Request approval -- send urgent replacement request to EAMA; wait for approval
  4. Create replacement -- use ai-maestro-agents-management skill
  5. Notify EOA -- so it can generate handoff docs and update kanban
  6. Send handoff docs to new agent (validate with checklist below)
  7. Verify acknowledgment -- confirm new agent received handoff and began work
  8. Close incident -- log resolution, notify EAMA

See references/agent-replacement-protocol.md and references/op-replace-agent.md.

<!-- TOC: agent-replacement-protocol.md -->
  • Phase 1: Failure confirmation and artifact preservation
  • Phase 2: Manager notification and approval
  • ...and 8 more sections
<!-- /TOC -->

Replacement Protocol Summary

Terminal failure -> AMCOS notifies EAMA -> EAMA approves
  -> Create new agent -> Notify EOA (handoff + kanban)
  -> Send handoff to new agent -> Agent acknowledges

Key Consideration: Memory Loss

CRITICAL: The replacement agent has NO MEMORY of the old agent. Therefore:

  • EOA must generate handoff documentation
  • EOA must reassign tasks in GitHub Project kanban
  • AMCOS must send handoff docs to new agent

ROLE BOUNDARY: AMCOS creates agents and sends context. EOA owns task assignment.

Handoff Validation Checklist

- [ ] Required fields present (from/to/type/UUID/task/failed_agent/failure_reason)
- [ ] UUID is unique
- [ ] Target agent exists and is alive
- [ ] All referenced files exist
- [ ] No [TBD] placeholders
- [ ] Acceptance criteria defined

Output

| Phase | Output | |-------|--------| | Artifact preservation | Files saved to handoff directory | | Manager approval | Approval message from EAMA | | Agent creation | New agent online and registered | | Work handoff | Docs sent and acknowledged |

Error Handling

| Issue | Resolution | |-------|------------| | Manager does not respond | Wait 15 min, reminder, escalate to user | | New agent fails to register | Verify AI Maestro health and hooks | | Handoff rejected | Queue and retry in 5 minutes | | No artifacts recoverable | Document loss, notify EOA to recreate |

Examples

# Request replacement approval
curl -X POST "$AIMAESTRO_API/api/messages" \
  -H "Content-Type: application/json" \
  -d '{"to":"eama-assistant-manager","subject":"URGENT: Replace libs-svg-svgbbox","priority":"urgent","content":{"type":"replacement-request","message":"Terminal failure (3 crashes). Requesting replacement approval.","failed_agent":"libs-svg-svgbbox"}}'

# Notify orchestrator of replacement
curl -X POST "$AIMAESTRO_API/api/messages" \
  -H "Content-Type: application/json" \
  -d '{"to":"eoa-orchestrator","subject":"Agent replaced: libs-svg-svgbbox","priority":"high","content":{"type":"replacement-notification","message":"Please generate handoff docs and update kanban.","old_agent":"libs-svg-svgbbox","new_agent":"libs-svg-svgbbox-v2"}}'

Resources

From the file to a first result

The download contains exactly the content displayed on this page. This copy may differ from the latest version in the source repository.

View the source and supporting files

This download contains SKILL.md only. Any scripts, references, templates and dependencies are not included. Get the required files from the source, preserving their directory structure, before continuing.

1. Download the file

Download SKILL.md

From the root of a test project, save the file as .skill-downloads/amcos-agent-replacement-mm78nohe/SKILL.md, or use the command below. This folder is for inspecting the skill before installation.

Command for macOS/Linux or WSL: requires a POSIX shell and curl. On Windows without WSL, use the download button and create the folder manually.

mkdir -p '.skill-downloads/amcos-agent-replacement-mm78nohe' && curl --fail --show-error --location 'https://skills-guides.com/api/skills/amcos-agent-replacement-mm78nohe/download' --output '.skill-downloads/amcos-agent-replacement-mm78nohe/SKILL.md.part' && mv '.skill-downloads/amcos-agent-replacement-mm78nohe/SKILL.md.part' '.skill-downloads/amcos-agent-replacement-mm78nohe/SKILL.md'

2. Check prerequisites

Read SKILL.md before using it. If it references scripts or external services, inspect them and prepare the required access in your test environment.

Environment declared by the author: Requires AI Maestro installed.

Original excerpt: Prerequisites
  • Failure classified as Terminal, or all recovery strategies exhausted
  • AI Maestro running locally with agent registry accessible
  • Handoff directory at $CLAUDE_PROJECT_DIR/thoughts/shared/handoffs/

The platforms on this page are catalog indications. The paths below follow tool documentation; they do not prove this skill has been run in those tools. No minimum tool version is confirmed for this listing.

3. Load the skill

After inspection, copy the complete folder into your project using one of the commands below, then open a new tool session. The command stops if a folder with the same name already exists: compare the files before replacing it.

Claude Code
test -f '.skill-downloads/amcos-agent-replacement-mm78nohe/SKILL.md' && test -s '.skill-downloads/amcos-agent-replacement-mm78nohe/SKILL.md' && mkdir -p '.claude/skills' && test ! -e '.claude/skills/amcos-agent-replacement' && cp -R '.skill-downloads/amcos-agent-replacement-mm78nohe' '.claude/skills/amcos-agent-replacement'

OpenSkills

OpenSkills must already be installed. The local install/read procedure is checked with OpenSkills 1.5.0, which requires Node.js ≥ 20.6.0. Catalog slugs are not resolved automatically.

Official OpenSkills installation
openskills install './.skill-downloads/amcos-agent-replacement-mm78nohe'

openskills read 'amcos-agent-replacement-mm78nohe'

Reading should display the installed file content and its base directory. It does not run the skill or install its dependencies.

For an agent that reads AGENTS.md, then sync the index. This command changes AGENTS.md: review the diff before using it.

openskills sync

Manual method or another tool: attach SKILL.md to a conversation, or open it in an agent that can read files. Include any required supporting resources. No universal folder is recognized by every tool.

4. Try a first task

Use a short, synthetic input: an API endpoint, a small document or an interface brief. In a new conversation, attach the file or give the agent its path, then adapt this request:

Read .skill-downloads/amcos-agent-replacement-mm78nohe/SKILL.md and apply its instructions to this example: [describe a test input]. Identify any missing files, dependencies or access. Produce the result requested by the skill without inventing data or running unreviewed scripts.

Expected result: output matching the skill instructions, or a precise list of missing prerequisites. A read confirmation alone does not validate a first use. If an external resource is unavailable, that path remains untested.

Related skills