MsClaw 0.3.1

There is a newer version of this package available.
See the version list below for details.
dotnet tool install --global MsClaw --version 0.3.1
                    
This package contains a .NET tool you can call from the shell/command line.
dotnet new tool-manifest
                    
if you are setting up this repo
dotnet tool install --local MsClaw --version 0.3.1
                    
This package contains a .NET tool you can call from the shell/command line.
#tool dotnet:?package=MsClaw&version=0.3.1
                    
nuke :add-package MsClaw --version 0.3.1
                    

Microsoft Claw

A GitHub Copilot Extension that gives your AI agent a persistent identity — a mind.

MsClaw loads a mind directory containing a SOUL.md identity file, agent definitions, and working memory, then serves it as a Copilot agent through the GitHub Copilot Runtime API.
Phase 2 adds a plugin runtime so tools, hooks, services, commands, and HTTP routes can be registered via extensions.

Quick Start

# Clone and build
git clone https://github.com/ianphil/msclaw.git
cd msclaw
dotnet build

# Start with an existing mind
dotnet run --project src/MsClaw -- --mind /path/to/your/mind

# Or scaffold a new mind from templates
dotnet run --project src/MsClaw -- --new-mind /path/to/new/mind

The server starts on http://localhost:5050.

CLI Arguments

Argument Description
--mind <path> Load an existing mind directory
--new-mind <path> Scaffold a new mind from embedded templates, then load it
--reset-config Clear saved config and exit
(none) Auto-discover a mind via config or convention paths

--mind and --new-mind cannot be used together.

Mind Directory Structure

A valid mind directory requires:

my-mind/
├── SOUL.md                        # Required — core identity file
├── .working-memory/               # Required — agent memory directory
├── extensions/                    # Optional — external plugin artifacts
├── extensions.lock.json           # Optional — pinned extension versions
├── .gitignore                     # Includes extensions/ by default on scaffolded minds
├── .github/
│   └── agents/
│       └── *.agent.md             # Optional — agent definition files
├── bootstrap.md                   # Optional — triggers bootstrap conversation on first run
├── Archive/
├── domains/
├── expertise/
├── inbox/
└── initiatives/
  • SOUL.md — Defines who the agent is. Loaded as the foundation of the system message.
  • .working-memory/ — Persistent memory the agent reads and writes across sessions.
  • .github/agents/*.agent.md — Agent files appended to the system message (YAML frontmatter stripped).
  • bootstrap.md — If present, its content is prepended to the system message to guide a 3-phase bootstrap conversation (Identity → Agent File → Memory).

Mind Discovery

When no --mind or --new-mind flag is provided, MsClaw searches for a mind in this order:

  1. Cached config (~/.msclaw/config.json)
  2. Current working directory
  3. ~/.msclaw/mind

The first valid mind found is used. The resolved path is persisted to config for future runs.

API Endpoints

Method Path Description
GET /health Health check — returns {"status":"ok"}
GET /extensions List currently loaded extensions
POST /session/new Create a new chat session
POST /command Execute a slash command without invoking the LLM
POST /chat Send a message and get a response

POST /chat

{
  "message": "Hello, who are you?"
}

Returns:

{
  "response": "...",
  "sessionId": "..."
}

Configuration

MsClaw persists the active mind root to ~/.msclaw/config.json:

{
  "MindRoot": "/path/to/mind",
  "LastUsed": "2026-03-01T00:00:00Z",
  "DisabledExtensions": ["extension-id-to-disable"]
}

Use --reset-config to clear it.

Extension System

Discovery and loading

External extensions are discovered from:

  1. {appRoot}/extensions/
  2. {mindRoot}/extensions/ (wins on duplicate IDs)

Each extension folder must include a plugin.json manifest:

{
  "id": "hello-world",
  "name": "Hello World Extension",
  "version": "1.0.0",
  "entryAssembly": "runtime/HelloWorld.Extension.dll",
  "entryType": "HelloWorld.Extension.HelloWorldExtension"
}

Runtime commands

  • POST /command with {"message":"/extensions"} shows loaded extensions
  • POST /command with {"message":"/reload"} reloads external extensions without restarting MsClaw

Manual e2e test

See .aidocs/e2e-extension-test.md for a full smoke test that exercises all five extension capability paths.
Reference sample extension repo: https://github.com/ipdelete/hello-world-extension.

Development

# Build
dotnet build

# Run tests
dotnet test

# Build quiet, test quiet
dotnet build -v q && dotnet test --no-build -v n

Project Structure

MsClaw.sln
├── src/MsClaw/                    # Main application
│   ├── Core/                      # Bootstrap, discovery, validation, identity
│   ├── Models/                    # Request/response and config models
│   └── Templates/                 # Embedded SOUL.md and bootstrap.md templates
├── tests/MsClaw.Tests/            # xUnit tests
│   ├── Core/                      # Unit tests
│   ├── Integration/               # Integration tests
│   └── TestHelpers/               # Test fixtures
└── docs/                          # Flow diagrams

Tech Stack

License

Apache 2.0 — see LICENSE for details.

Product Compatible and additional computed target framework versions.
.NET net9.0 is compatible.  net9.0-android was computed.  net9.0-browser was computed.  net9.0-ios was computed.  net9.0-maccatalyst was computed.  net9.0-macos was computed.  net9.0-tvos was computed.  net9.0-windows was computed.  net10.0 was computed.  net10.0-android was computed.  net10.0-browser was computed.  net10.0-ios was computed.  net10.0-maccatalyst was computed.  net10.0-macos was computed.  net10.0-tvos was computed.  net10.0-windows was computed. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.

This package has no dependencies.

Version Downloads Last Updated
0.9.1 1,271 3/10/2026
0.9.0 1,276 3/9/2026
0.8.0 1,287 3/9/2026
0.7.2 1,318 3/8/2026
0.7.0 1,309 3/8/2026
0.5.4 1,329 3/6/2026
0.5.0 1,330 3/6/2026
0.4.0 1,336 3/6/2026
0.3.2 101 3/2/2026
0.3.1 96 3/2/2026