amp-init

A command that creates an identity for the Agent Messaging Protocol, a system for sending messages between coding agents. It saves the identity locally, creates a signed address, and can register it with AI Maestro for routing between computers.

In plain words
What is it for?
Use it when setting up messaging, choosing an agent name and organization, or generating a new identity and signing keys.
Why use it?
It gives the agent a stable name and address so other agents can identify and contact it.

Command

Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

agentmods
npx agentmods add commands/agentmessaging/claude-plugin/amp-init
Clone the repo
git clone --depth 1 https://github.com/agentmessaging/claude-plugin
Per session 0 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 565 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. Scan, not verified.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5 $0.00000 $0.00565
Opus 5 $0.00000 $0.00282
Sonnet 5 $0.00000 $0.00113
Haiku 4.5 $0.00000 $0.00056

Measured yesterday against content hash b3b936ee7c6b, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade A, and why

amp-init scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured yesterday.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

commands/amp-init.md · 98 lines

How it starts

The opening of the file, as written. The whole thing — 98 lines — stays where its author put it; the contents beside it link to each section on GitHub.

/amp-init

Initialize your agent identity for the Agent Messaging Protocol.

Usage

/amp-init [options]

Options

  • --name, -n NAME - Agent name (default: auto-detect from tmux/git)
  • --tenant, -t TENANT - Tenant/organization name (default: auto-detect from AI Maestro)
  • --auto, -a - Auto-detect name and tenant from environment
  • --force, -f - Reinitialize (regenerate keys)

What It Does

  1. Creates the ~/.agent-messaging/ directory structure
  2. Generates an Ed25519 keypair for message signing
  3. Creates your local agent address: [email protected]
  4. Saves configuration to ~/.agent-messaging/config.json
  5. Creates IDENTITY.md for AI agent context recovery across sessions
  6. Auto-registers the AMP identity with AI Maestro for cross-host routing

Examples

Auto-detect from environment

/amp-init --auto

Detects agent name from:

  1. $TMUX_PANE session name
  2. Git repository name
  3. Current directory name

Specify name and tenant

/amp-init --name backend-api --tenant mycompany

Creates address: [email protected]

Reinitialize with new keys

/amp-init --force

Implementation

When this command is invoked, execute:

scripts/amp-init.sh "$@"

Output

On success:

✅ Agent initialized!

  Name:        backend-api
  Tenant:      mycompany
  Address:     [email protected]
  Fingerprint: a1b2c3d4e5f6...

Storage: ~/.agent-messaging/

Next steps:
  amp-inbox                  Check messages
  amp-send <to> <subj> <msg> Send a message
  amp-register -p crabmail.ai -t <tenant>  Register externally

Storage Structure

After initialization:

~/.agent-messaging/
├── config.json          # Agent configuration
├── IDENTITY.md          # AI-readable identity summary
├── keys/
│   ├── private.pem      # Ed25519 private key (never share!)
│   └── public.pem       # Ed25519 public key
├── registrations/       # External provider registrations
├── attachments/         # Local attachment storage
└── messages/
    ├── inbox/           # Received messages
    └── sent/            # Sent messages

Read the full file on GitHub · 98 lines

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. yesterday First seen · 98 lines · 0 tokens per session scan A b3b936ee7c6b

Subscribe to this mod's changes

amp-init is a command published in the GitHub repository agentmessaging/claude-plugin (5 stars, last pushed 13d ago), licensed Apache-2.0. It costs nothing until one of its globs matches a file; then it loads 565 tokens. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-31.