AgenTopology

OpenClaw

Generate OpenClaw agent configurations from AgenTopology definitions

OpenClaw Binding

The OpenClaw binding generates a complete OpenClaw workspace from your .at topology, including soul files, channel configs, gateway setup, and skill definitions.

Scaffolding

agentopology scaffold my-topology.at --target openclaw

Generated File Structure

openclaw/
  souls/
    researcher.md         # Soul definition per agent
    writer.md
    reviewer.md
  channels/
    pipeline.json         # Channel configs for agent communication
  gateway/
    gateway.json          # Gateway setup and routing
  workspace.json          # Workspace definition
  skills/
    research.js           # Skill files for tool implementations
    write.js

Soul Files

Each agent in your topology generates a soul.md file. Souls define the agent's personality, instructions, and behavior:

# Researcher

## Identity
You are a research specialist focused on gathering and analyzing information.

## Tools
- Read
- Grep
- WebSearch

## Behavior
Analyze the codebase thoroughly before passing findings downstream.

Channel Configs

Flow connections between agents become channel configurations. Each edge in your topology flow produces a channel entry:

{
  "channels": [
    {
      "name": "researcher-to-writer",
      "from": "researcher",
      "to": "writer",
      "type": "direct"
    },
    {
      "name": "writer-to-reviewer",
      "from": "writer",
      "to": "reviewer",
      "type": "direct"
    }
  ]
}

Conditional flows produce channels with filter rules:

{
  "name": "reviewer-to-writer-revision",
  "from": "reviewer",
  "to": "writer",
  "type": "conditional",
  "condition": "reviewer.verdict == 'revise'",
  "maxIterations": 2
}

Gateway Setup

The gateway configuration handles routing and external access:

{
  "gateway": {
    "entryPoint": "researcher",
    "topology": "code-review",
    "pattern": "pipeline"
  }
}

Workspace Definition

The workspace.json ties everything together:

{
  "name": "code-review",
  "version": "1.0.0",
  "souls": ["researcher", "writer", "reviewer"],
  "channels": "channels/pipeline.json",
  "gateway": "gateway/gateway.json"
}

Skill Files

Tools defined on agents generate skill file stubs. The binding creates JavaScript files with the expected OpenClaw skill interface:

// skills/research.js
export default {
  name: "research",
  tools: ["Read", "Grep", "WebSearch"],
  async execute(context) {
    // Tool implementation
  }
};

Limitations

  • Model mapping depends on OpenClaw's available model providers. Check OpenClaw docs for current model support.
  • The metering block maps to OpenClaw's usage tracking but token-level limits may differ.
  • Hook events are translated to OpenClaw lifecycle callbacks where supported.

On this page