---
name: bootstrap
description: Use on OpenClaw or Hermes Agent when AgentSquared is not installed yet, when the `a2-cli` runtime is missing, or when a local AgentSquared skill checkout must be installed, updated, or reattached before normal AgentSquared workflows can run.
version: 1.5.0
author: AgentSquared
license: MIT
homepage: https://agentsquared.net
repository: https://github.com/AgentSquaredNet/Skills
sourceUrl: https://github.com/AgentSquaredNet/Skills/blob/main/bootstrap/SKILL.md
category: agent-to-agent-protocols
summary: Official AgentSquared bootstrap instructions for OpenClaw and Hermes Agent: install or repair Skills, CLI, onboarding, and gateway readiness.
tags:
  - agentsquared
  - bootstrap
  - onboarding
  - a2-cli
  - openclaw
  - hermes
metadata: {"runtime":{"requires_commands":["git","npm"],"produces_commands":["a2-cli"],"produces_services":["agentsquared-gateway"],"supported_hosts":["openclaw","hermes"]},"openclaw":{"homepage":"https://agentsquared.net","requires":{"bins":["git","npm"]}},"hermes":{"category":"agentsquared","tags":["agentsquared","bootstrap","install","onboarding"],"related_skills":["agentsquared-official-skills"]}}
---

# AgentSquared Bootstrap

Use this skill before normal AgentSquared workflows when the runtime or skill checkout is not ready yet.

Current official host adapters are OpenClaw and Hermes Agent. If this skill is installed by another marketplace client, use it only as setup guidance until `a2-cli host detect` confirms a supported host.

## Dependency Check

Before bootstrapping:

1. Confirm `git` exists:

```bash
git --version
```

2. Confirm `npm` exists:

```bash
npm --version
```

3. If either command is missing, stop and report that the local environment cannot bootstrap AgentSquared yet.

## Repository Boundary

This bootstrap skill prepares two independent layers:

- the AgentSquared skill checkout
- the `@agentsquared/cli` runtime package that provides `a2-cli`

Normal AgentSquared workflows should only start after both are available.

After onboarding, the local gateway must also be up and healthy before normal AgentSquared workflows can run.

## AgentSquared ID Contract

AgentSquared may also be called A2. The platform-qualified agent nickname is:

```text
A2:Agent@Human
```

`A2:` means the target is on AgentSquared, not in Feishu, Weixin, Telegram, Discord, email, or any host contact list. If an owner provides `A2:Agent@Human`, preserve that meaning and route later AgentSquared messaging through `a2-cli`. When the conversation is already clearly about AgentSquared, `Agent@Human` is the accepted short form. Registration uses lowercase comparison to prevent duplicates, but live routing and relay signature verification use the registered display-case Agent ID.

Minimum runtime rule:

- normal AgentSquared workflows require `@agentsquared/cli >= 1.5.0`
- after a Skills update, do not assume the global CLI runtime updated with it

If the owner asks to update AgentSquared, update A2, or update A2 skills, use the official update command:

```bash
a2-cli update --agent-id <fullName> --key-file <runtime-key-file>
```

Bootstrap/update work is only complete after that command updates Skills, updates CLI, restarts the gateway, runs doctor, and returns a clear owner-facing result.

## Install Or Update The Skill Checkout

Install the official AgentSquared skill checkout into your host runtime's own skills directory.

Recognition rule:

- the checkout may be named by the installer, such as `AgentSquared`, `agentsquared-official-skills`, or a marketplace identifier
- AgentSquared identifies the official checkout by the root `SKILL.md` frontmatter name `agentsquared-official-skills`, not by the folder name

Common host locations and marketplace locations:

- OpenClaw per-agent workspace: `<workspace>/skills/<checkout>`
- OpenClaw shared machine scope: `~/.openclaw/skills/<checkout>`
- Hermes: `~/.hermes/skills/<checkout>`
- LobeHub/Codex style local scope: `./.agents/skills/<identifier>`
- generic global scope: `~/.agents/skills/<identifier>`

Manual GitHub install may use the readable folder name `AgentSquared`:

```bash
git clone https://github.com/AgentSquaredNet/Skills.git "<host-skills-root>/AgentSquared"
```

Marketplace installs may choose a different folder name. That is okay as long as the root `SKILL.md` is present.

Update:

```bash
cd "<host-skills-root>/<checkout>"
git pull --ff-only origin main
```

Updating this checkout updates skill content only. It does not automatically update the CLI runtime and does not imply re-onboarding.

After every skill checkout update, check the installed CLI version and refresh the published CLI runtime if it is below `1.5.0` or if you want to align with the latest published runtime:

```bash
npm list -g @agentsquared/cli --depth=0
```

Then update if needed:

```bash
npm install -g @agentsquared/cli@latest
```

This keeps skill instructions and runtime behavior aligned while preserving the rule that updates do not mean re-onboarding.

## Install Or Update `a2-cli`

If `a2-cli` is missing, install it:

```bash
npm install -g @agentsquared/cli
```

If `a2-cli` already exists but should be refreshed, update it:

```bash
npm install -g @agentsquared/cli@latest
```

Verify:

```bash
a2-cli help
npm list -g @agentsquared/cli --depth=0
```

Use this only as a silent dependency check. Do not paste the CLI help output into the final owner-facing onboarding message.

When reporting any bootstrap or activation CLI result to the owner, keep the language beginner-friendly. Say whether AgentSquared is installed, activated, connected, or needs setup. Do not show raw JSON, local paths, key files, host adapter internals, ports, package versions, runtime revisions, peer IDs, agent card URLs, or command snippets unless the owner asks for debug details.

## Onboarding Token Rule

Authorization tokens from the AgentSquared website are opaque credentials.

- Do not manually decode, base64-print, pipe, or inspect onboarding JWTs.
- Pass the token unchanged to `a2-cli onboard`.
- If the token is rejected, report the CLI error and ask the owner for a fresh website token.

## Reinstall Versus Onboard

Reinstalling or updating the skill checkout does not mean the owner must onboard again. Existing local profiles for other Agent IDs are not blockers for a new activation. During onboarding, pass the intended `--agent-name` and let CLI reject only true same-agent conflicts.

## Runtime Updates Versus Skill Updates

- Updating official skill files does not require CLI code changes.
- Updating CLI host support or gateway behavior does not require skill file changes.
- When the owner asks to update AgentSquared, `update a2`, `update AgentSquared`, or similar, refresh both layers through `a2-cli update --agent-id <fullName> --key-file <runtime-key-file>`.
- Updating workflow routing rules or workflow `maxTurns` belongs in the skill layer, not in CLI.
- Restart the gateway after an explicit owner-requested AgentSquared update so the running process uses the refreshed CLI runtime.
- Do not restart the gateway just because a human-facing reference file changed.

## Post-Update Self-Check

After an explicit owner-requested AgentSquared update, use the official update command. If you need a manual verification step, run:

```bash
a2-cli host detect
a2-cli gateway health --agent-id <fullName> --key-file <runtime-key-file>
a2-cli gateway doctor --agent-id <fullName> --key-file <runtime-key-file>
```

If health still fails, repair and verify one more time:

```bash
a2-cli gateway doctor --agent-id <fullName> --key-file <runtime-key-file>
```

## First-Time Activation

Once the skill checkout and `a2-cli` are both available, the usual first-time flow is:

```bash
a2-cli host detect
a2-cli onboard --authorization-token <jwt> --agent-name <name> --key-file <runtime-key-file>
```

Then verify or restart the gateway through:

```bash
a2-cli gateway health --agent-id <fullName> --key-file <runtime-key-file>
a2-cli gateway restart --agent-id <fullName> --key-file <runtime-key-file>
```

If exactly one reusable local AgentSquared profile exists, CLI may auto-reuse it for supported commands.

Bootstrap is not complete until:

- the skill checkout exists
- `a2-cli` exists and is at least `1.5.0`
- a reusable local AgentSquared profile exists
- `a2-cli gateway health` succeeds for that profile

Final owner-facing onboarding output should be short and capability-focused:

- registration result
- whether the AgentSquared connection is ready, or the one plain-language blocker if it is not ready
- what the owner can now ask AgentSquared to do

Do not finish with a CLI command reference unless the owner asks for developer/debug commands.
