Skip to content
/

OpenClaw.NET

openclaw-net · clawdotnet/openclaw.net · ★ 347 · last commit 2026-05-25

Self-hosted NativeAOT .NET agent gateway with inspectable Passive Harness Contracts, Evidence Bundles, and a Governance Ledger for observable, auditable agent work without changing default behavior.

Best whenAgent governance should be passive by default — inspectable without being blocking — so operators can understand what agents are doing without introducing fr…
Skip ifBinding gateway to non-loopback without security hardening, Auto-approving future actions from governance ledger decisions
vs seeds
superpowers/spec-driver) or track tasks as files (taskmaster-ai); OpenClaw.NET externalizes governance into machine-readable contra…
Primitive shape 70 total
Commands 22 MCP tools 48
00

Summary

OpenClaw.NET — Summary

OpenClaw.NET is a NativeAOT-friendly AI agent runtime and gateway for .NET, authored by the clawdotnet team and independently inspired by (but unaffiliated with) OpenClaw. It delivers a self-hosted agent gateway with OpenAI-compatible HTTP surfaces, a web chat UI, an admin UI, MCP endpoint, WebSocket, 48 native tools, and 9 channel adapters (Telegram, SMS, WhatsApp, Teams, Slack, Discord, Signal, email, webhooks). The framework's most distinctive architecture is its Passive Harness Contracts system: structured plans for agent work that are inspectable before execution without changing default chat behavior, backed by Evidence Bundles, a Governance Ledger, a Codebase Harness Map, and a Shared Harness State. An optional Plan-Execute-Verify Mode adds governed high-risk tool execution with formal contracts, evidence, and verification. The CLI ships as a NativeAOT binary (openclaw) with subcommands spanning start, setup, models, harness, skills, maintenance, insights, and upgrade. Optional integrations include Microsoft Agent Framework, durable workflow backends (maf-durable-http), optional embedded local inference (Gemma 4 GGUF), and Fractal Memory MCP.

differs_from_seeds: OpenClaw.NET is architecturally closest to claude-flow (bundled gateway, multi-tool, session management) but operates in the .NET ecosystem with NativeAOT compilation and a formal "Passive Harness Contracts" governance layer absent from all seeds. Unlike all seeds which either inject behavioral rules into the model's context (superpowers, spec-driver) or store tasks in files (taskmaster-ai), OpenClaw.NET externalizes the governance model into inspectable JSON contracts and durable Evidence Bundles — making agent work auditable without changing the agent's prompt.

01

Overview

OpenClaw.NET — Overview

Origin

OpenClaw.NET is an independent .NET implementation by clawdotnet (GitHub: clawdotnet/openclaw.net). The README explicitly states:

"Disclaimer: This project is not affiliated with, endorsed by, or associated with OpenClaw. It is an independent .NET implementation inspired by their work."

Documentation lives at AgentQi.dev, branded as the "AgentQi" ecosystem with "practical, observable, self-hosted AI agent systems for .NET developers."

Philosophy

From the README:

"OpenClaw.NET is a NativeAOT-friendly AI agent runtime and gateway for .NET with practical OpenClaw ecosystem compatibility."

"It is for .NET developers and operators who want a local or self-hosted agent gateway with explicit diagnostics, first-party .NET tools, OpenAI-compatible HTTP surfaces, and a path from source checkout to NativeAOT release artifacts."

The Passive Harness philosophy:

"Passive Harness Contracts for inspectable agent-work plans without changing default chat or approval behavior. Passive Evidence Bundles for inspectable run evidence, checks, risks, and human review without default runtime interception."

The word "passive" is deliberate — governance features observe and record without interfering with normal operation until explicitly enabled.

Key Design Decisions

  1. NativeAOT-friendly: Compiles to a native binary without .NET runtime dependency
  2. Self-hosted first: Gateway binds to 127.0.0.1 by default; security refuses to start on non-loopback without hardening
  3. Passive by default: Harness Contracts, Evidence Bundles, Governance Ledger all passive unless Plan-Execute-Verify Mode enabled
  4. OpenClaw ecosystem compatibility: Reads existing TS/JS OpenClaw plugins and SKILL.md packages
  5. Microsoft Agent Framework adapter: Optional Runtime.Orchestrator=maf integration
02

Architecture

OpenClaw.NET — Architecture

Distribution

  • Type: NativeAOT binary + .NET source
  • Platforms: Windows x64, macOS ARM64, Linux x64 (pre-built desktop bundles)
  • License: MIT
  • Runtime: .NET (NativeAOT means no .NET runtime required in production)

Install Options

# Source checkout
export MODEL_PROVIDER_KEY="sk-..."
dotnet run --project src/OpenClaw.Cli -c Release -- start

# Desktop bundle (includes Companion + NativeAOT gateway + CLI)
# Unzip, launch Companion, Setup tab → auto-starts gateway on 127.0.0.1

Project Structure (src/)

src/
├── OpenClaw.Agent/                     # Agent runtime
├── OpenClaw.Channels/                  # Channel adapters (9)
├── OpenClaw.Cli/                       # CLI entry point (openclaw binary)
├── OpenClaw.Client/                    # SDK client
├── OpenClaw.Companion/                 # Desktop companion app
├── OpenClaw.Core/                      # Core types + interfaces
├── OpenClaw.Dashboard/                 # Web dashboard
├── OpenClaw.Gateway/                   # HTTP gateway (chat UI, admin UI, MCP, WebSocket)
├── OpenClaw.MicrosoftAgentFrameworkAdapter/  # MAF integration
├── OpenClaw.Payments.*/                # Payment abstractions (Stripe)
├── OpenClaw.PluginKit/                 # Plugin SDK
├── OpenClaw.Plugins.Mempalace/         # Fractal Memory integration
├── OpenClaw.SemanticKernelAdapter/     # Semantic Kernel integration
├── OpenClaw.Testing/                   # Harness regression suite
├── OpenClaw.Tui/                       # Terminal UI
├── OpenClaw.WhatsApp.*Worker/          # WhatsApp channel workers
└── OpenClawNet.Sandbox.OpenSandbox/    # Sandbox implementation

Web Surfaces

URL Surface
http://127.0.0.1:18789/chat Web Chat UI
http://127.0.0.1:18789/admin Admin UI
http://127.0.0.1:18789/api/integration/status Integration API
http://127.0.0.1:18789/mcp MCP endpoint

LLM Providers

OpenAI, Claude, Gemini, Azure OpenAI, Ollama, OpenAI-compatible endpoints. Optional embedded local models: Gemma 4 GGUF packages with supervised sidecar inference.

03

Components

OpenClaw.NET — Components

CLI Binary (openclaw)

48+ subcommands across categories:

Category Commands
Runtime start, setup, setup launch, setup service, setup status, setup tailscale serve
Models models presets, models packages, models install, models doctor, models status
Harness harness test, harness map
Skills skills inspect
Maintenance maintenance scan, maintenance fix
Compatibility compatibility catalog
Insights insights
Upgrade upgrade check, upgrade rollback
Migration migrate upstream
Admin admin trajectory export

48 Native Tools

Categories:

  • File operations
  • Sessions
  • Memory
  • Web
  • Messaging
  • Home automation
  • Databases
  • Email
  • And more

9 Channel Adapters

Telegram, SMS, WhatsApp, Teams, Slack, Discord, Signal, email, webhooks — each with DM policy, allowlists, and signature validation.

Passive Harness Contracts

Structured pre-work plans with:

  • Goal and user request summary
  • Planned actions (tool name, action type, read/write sets)
  • Risk level and approval requirement
  • Verification plan (commands to run, expected signals)
  • Rollback plan
  • Success criteria
  • Source session, actor, channel, sender metadata

Passive by default — does not change normal chat behavior.

Evidence Bundles

Inspectable run evidence, checks, risks, and human review records. Tracked in the Governance Ledger.

Governance Ledger

Durable approval and oversight decisions without auto-approving future actions.

Shared Harness State

Passive delegated-work coordination across participants, actions, read/write sets, assumptions, verifier obligations, evidence links, and conflicts.

Codebase Harness Map (openclaw harness map)

Passive static repository map: projects, modules, endpoints, tools, providers, channels, config, tests.

Harness Regression Suite (openclaw harness test)

Offline checks before trusting harness/runtime changes.

Optional Integrations

  • Microsoft Agent Framework (MAF) adapter
  • Semantic Kernel adapter
  • Fractal Memory MCP (compact structured project memory + Runtime Pulse context)
  • A2A (Agent-to-Agent protocol)
  • Durable workflows via maf-durable-http
  • Embedded local inference (Gemma 4 E2B/E4B/31B/26B-A4B GGUF)

Plugin System

  • OpenClaw.PluginKit — .NET SDK for third-party plugins
  • Compatible with existing TypeScript/JavaScript OpenClaw plugins
  • Compatible with SKILL.md packages from other frameworks
05

Prompts

OpenClaw.NET — Prompts

Prompt Architecture

OpenClaw.NET's prompts are primarily configuration-driven (provider + model + harness settings) rather than CLAUDE.md-style behavioral injection. The behavioral layer comes from SKILL.md packages (compatible with OpenClaw TS/JS ecosystem).

Verbatim Excerpt 1 — Harness Contract JSON Schema (from docs/HARNESS_CONTRACTS.md)

{
  "id": "hctr_docs_update",
  "status": "proposed",
  "goal": "Update documentation for a passive harness feature",
  "userRequestSummary": "Document Harness Contracts and link them from the docs index.",
  "sourceSessionId": "session-123",
  "actorId": "operator",
  "riskLevel": "medium",
  "approvalRequired": "none",
  "plannedActions": [
    {
      "id": "docs",
      "title": "Update docs",
      "toolName": "file_write",
      "actionType": "write",
      "requiresApproval": false,
      "writeSet": [
        {
          "kind": "file",
          "path": "docs/HARNESS_CONTRACTS.md",
          "description": "Harness Contract documentation"
        }
      ],
      "expectedOutcome": "Operators can understand the feature boundary."
    }
  ],
  "verificationPlan": [
    {
      "id": "tests",
      "title": "Run tests",
      "kind": "command",
      "command": "dotnet test",
      "expectedSignal": "All relevant tests pass.",
      "required": true
    }
  ],
  "rollbackPlan": [
    {
      "id": "revert",
      "title": "Revert changes",
      "description": "Revert the feature commit if the passive surface causes regressions."
    }
  ]
}

Technique: Structured JSON contract as the "prompt" for agent work planning. This is not a natural-language prompt — it is a machine-readable specification of intent, actions, risks, and verification criteria. The agent produces this contract before acting; humans can inspect it without approving. This is the most formal spec-as-prompt approach in this batch.

Verbatim Excerpt 2 — Harness Contract Philosophy (from docs/HARNESS_CONTRACTS.md)

Harness Contracts make non-trivial agent work more inspectable before execution. 
They are useful for:
- high-risk tool use
- file writes
- shell execution
- multi-step workflows
- learning proposals
- future Plan-Execute-Verify mode
- industrial and operational workflows

## Contract Shape

Each contract records:
- intent and user request summary
- planned actions
- read and write resource sets
- tool requirements
- risk level and approval requirement
- assumptions and constraints
- verification plan
- rollback plan
- success criteria
- source session, actor, channel, and sender metadata

Technique: The contract schema is itself a prompt design document — it specifies what information an agent must gather and structure before acting on a non-trivial task. The "passive" qualifier means the contract is generated and visible but doesn't block execution by default.

09

Uniqueness

OpenClaw.NET — Uniqueness

differs_from_seeds

OpenClaw.NET is architecturally closest to claude-flow (bundled gateway, multi-tool server, session management, MCP endpoint) but operates in the .NET/C# ecosystem with NativeAOT compilation and a formal governance layer absent from all seeds. The Passive Harness Contracts system — structured JSON plans for agent work that are inspectable without blocking execution — is a unique approach not found in any seed. All seeds either inject behavioral rules as prompts (superpowers, spec-driver) or store task state as files (taskmaster-ai); OpenClaw.NET externalizes governance into machine-readable contracts with formal verification plans. The Evidence Bundle + Governance Ledger + Shared Harness State combination creates a formal audit-and-accountability layer that superpowers and BMAD approximate with Iron Laws but can't enforce at the protocol level. The AUDIT_REPORT.md committed to the repository root is itself notable — public documentation of the project's own governance analysis.

Positioning

OpenClaw.NET targets .NET developers and operators who want a self-hosted agent gateway with strong observability, formal work contracts, and a clear path from development to NativeAOT production deployment. The "AgentQi" branding points toward a broader developer infrastructure vision beyond just the agent runtime.

Observable Failure Modes

  • Rapidly evolving: Plugin compatibility described as "evolving" — breaking changes expected
  • NativeAOT limitations: Some .NET reflection-heavy libraries incompatible with NativeAOT; plugin ecosystem constrained
  • Small community: 347 stars — limited community support, documentation gaps
  • Passive-by-default risk: The governance features are all opt-in; without Plan-Execute-Verify Mode, the contracts are purely observational (no enforcement)
  • Unsigned binaries: Current Windows and macOS desktop bundles unsigned — first-run OS warnings expected
  • Complex feature surface: 48 tools + 9 channels + MAF + A2A + Fractal Memory + Semantic Kernel — high conceptual surface for a 347-star project
  • WhatsApp workers: Two separate WhatsApp bridge implementations (Baileys Go, WhatsmeowWorker) suggesting channel adapter maintenance burden
04

Workflow

OpenClaw.NET — Workflow

Standard Workflow

Phase Description Artifact
1. Install Download desktop bundle or dotnet run from source Gateway running on 127.0.0.1:18789
2. Configure Companion Setup tab or openclaw setup Provider key + model set
3. Connect Open /chat in browser Chat session started
4. Chat User sends message Agent processes
5. Tool execution 48 native tools available Tool results
6. Channel delivery Reply via web UI, IM channel, or API Response

Plan-Execute-Verify Mode (optional)

  1. Agent generates Harness Contract (plan with verification steps)
  2. Contract reviewed (passive — no approval by default)
  3. Agent executes planned actions
  4. Evidence Bundle collected
  5. Verification steps run (commands from contract's verification plan)
  6. Results recorded in Governance Ledger

Harness Map Workflow

openclaw harness map

Generates a static map of the codebase: projects, modules, endpoints, tools, providers, channels, config, tests.

Harness Regression Workflow

openclaw harness test

Runs offline checks on harness/runtime changes before deployment.

Upgrade Workflow

openclaw upgrade check
openclaw upgrade rollback --offline

Approval Gates

  • Default: None (passive observation mode)
  • Plan-Execute-Verify Mode: Harness Contract review before execution
  • Governance Ledger: Approval decisions recorded but not auto-applied to future actions

Phase-to-Artifact Map

Phase Artifact
Harness Contract JSON plan document
Evidence Bundle JSON run evidence record
Governance Ledger Durable approval decisions
Harness Map Static codebase map (JSONL)
Trajectory export Anonymized run trajectory (JSONL)
06

Memory Context

OpenClaw.NET — Memory & Context

Session Management

  • Agent runtime has built-in session + memory support
  • Sessions are persisted (format: structured-md or JSONL based on OpenClaw convention)
  • openclaw admin trajectory export --anonymize exports run trajectories

Fractal Memory (optional integration)

The OpenClaw.Plugins.Mempalace module provides Fractal Memory MCP integration:

  • Compact structured project memory
  • Runtime Pulse context injection
  • Does not replace OpenClaw's own memory/session stores — supplements them

Memory Architecture

OpenClaw.NET maintains its own memory and session stores (separate from Fractal Memory). The exact format is not detailed in the public README beyond "session support" and "trajectory export."

Shared Harness State

A passive coordination mechanism for multi-agent scenarios:

  • Read/write sets per participant
  • Assumptions and verifier obligations
  • Evidence links
  • Conflict detection

Governance Ledger

Durable approval and oversight decisions. Not replayed (each approval is a unique decision) but stored for audit.

Evidence Bundles

Run evidence per contract execution:

  • Checks performed
  • Risks identified
  • Human review records
  • Linked to Harness Contracts

Trajectory Export

openclaw admin trajectory export --anonymize --output ./trajectory.jsonl

JSONL format — anonymized run data for analysis or debugging.

07

Orchestration

OpenClaw.NET — Orchestration

Multi-Agent Support

Yes — via optional Microsoft Agent Framework (MAF) adapter and A2A (Agent-to-Agent) protocol.

Default: Single agent per gateway instance. With MAF: Runtime.Orchestrator=maf — Microsoft Agent Framework orchestration. With A2A: Agent-to-Agent protocol for multi-agent coordination. With durable workflows: maf-durable-http backend for durable step execution.

Execution Mode

Background daemon — the gateway runs continuously as a self-hosted service. It handles incoming requests from:

  • Web chat UI
  • 9 channel adapters (Slack, Discord, Teams, Signal, Telegram, SMS, WhatsApp, email, webhooks)
  • OpenAI-compatible HTTP API
  • MCP endpoint

The gateway starts on boot (via openclaw setup service) and processes requests continuously.

Isolation Mechanism

OpenClawNet.Sandbox.OpenSandbox — sandboxed execution environment. The gateway binds to 127.0.0.1 by default; network exposure requires explicit security hardening (auth token, tooling roots, signature validation).

Multi-Model

Yes — LLM providers configurable: OpenAI, Claude, Gemini, Azure OpenAI, Ollama, OpenAI-compatible endpoints, embedded local models (Gemma 4 GGUF).

Plan-Execute-Verify Mode

Optional governance mode:

  1. Plan: Generate Harness Contract (structured JSON with actions, risks, verification)
  2. Execute: Run planned actions (tool calls)
  3. Verify: Run verification steps from contract (dotnet test, custom commands)

Evidence Bundle collected; result recorded in Governance Ledger.

Orchestration Pattern

sequential by default. parallel-fan-out possible with MAF or A2A.

Durable Workflows

Via maf-durable-http backend — provides durability and retries for long-running agent workflows (analogous to Inngest's role in Utah).

Harness Regression

openclaw harness test — runs offline tests on harness/runtime changes. This is the closest OpenClaw.NET comes to auto-validators.

08

Ui Cli Surface

OpenClaw.NET — UI / CLI Surface

CLI Binary (openclaw)

Full-featured NativeAOT CLI with 48+ subcommands:

openclaw start
openclaw setup
openclaw setup launch --config ~/.openclaw/config/openclaw.settings.json
openclaw setup service --platform all
openclaw setup tailscale serve
openclaw models presets
openclaw models packages
openclaw models install gemma-4-e4b --accept-license
openclaw models doctor
openclaw harness test
openclaw harness map
openclaw skills inspect ./skills/my-skill
openclaw compatibility catalog
openclaw insights
openclaw admin trajectory export --anonymize --output ./trajectory.jsonl
openclaw upgrade check
openclaw upgrade rollback --offline
openclaw migrate upstream --source ./upstream-agent
openclaw maintenance scan
openclaw maintenance fix --dry-run

Web Chat UI

http://127.0.0.1:18789/chat — full chat interface

Admin UI

http://127.0.0.1:18789/admin — admin panel with:

  • Skills management (/admin/skills)
  • Maintenance report (/admin/maintenance)
  • Observability summary (/admin/observability/summary)
  • Operator insights (/admin/insights)
  • Audit export (/admin/audit/export)
  • Trajectory export (/admin/trajectory/export)

Companion App

Desktop companion app (included in desktop bundles) for setup flow:

  • Starts the NativeAOT gateway
  • Setup tab: provider/model selection
  • Writes local config
  • Connects to gateway on 127.0.0.1

Terminal UI (OpenClaw.Tui)

TUI component in the project — not documented separately in README.

Port

Default: 18789

Private Access via Tailscale

openclaw setup tailscale serve — exposes via tailnet without binding publicly.

Observability

  • Explicit startup phase markers in logs
  • Started with notices: startup summary
  • /admin/observability/summary
  • Trajectory export (JSONL, anonymizable)
  • OpenAI-compatible API for external monitoring

Related frameworks

same archetype · same primary tool · same memory type

OpenHarness ★ 13k

Open-source Python agent runtime providing complete harness infrastructure: tools, memory, governance, swarm coordination, and…

Trae Agent ★ 12k

Research-friendly open-source CLI coding agent by ByteDance, designed for academic ablation studies and modular LLM provider…

Sweep AI ★ 7.7k

Autonomous GitHub bot that converts issues to pull requests using a sequential multi-agent pipeline.

Agent Governance Toolkit (microsoft) ★ 2.3k

Enterprise-grade AI agent governance: YAML policy enforcement, 12-vector prompt injection defense, zero-trust identity,…

TDD Guard ★ 2.1k

Mechanically enforces the Red-Green-Refactor TDD cycle by blocking file writes that violate TDD principles via a PreToolUse hook…

Agentic Coding Flywheel Setup (ACFS) ★ 1.5k

Take a complete beginner from laptop to three AI coding agents running on a VPS in 30 minutes via an idempotent manifest-driven…