Skip to content

Communication Surfaces

This document defines the portable communication-surface model that sits on top of SPEC.md.

SPEC.md remains the canonical source schema. This file exists to make three things explicit:

  • what a surface is
  • what the standardized Discord surface means in v0.1
  • which runtimes support which Discord access shapes

A surface is an external interaction boundary through which humans or systems can reach an agent.

This is intentionally broader than “chat channel”. In v0.1, the first standardized surface is Discord, but the abstraction is meant to grow to cover other messaging systems, webhook/http ingress, and future agent-network or room integrations.

Surfaces are:

  • declared on agent manifests
  • validated at compile time against runtime support
  • provisioned through the same auth/run path as model credentials

Team manifests do not declare surfaces in v0.1. Surfaces belong to concrete agents.


Spawnfile v0.1 standardizes one initial surface:

surfaces:
discord:
access:
mode: allowlist
users:
- "987654321098765432"
guilds:
- "123456789012345678"
channels:
- "555555555555555555"
bot_token_secret: DISCORD_BOT_TOKEN
FieldMeaning
bot_token_secretEnv var name carrying the Discord bot token. Defaults to DISCORD_BOT_TOKEN.
access.modeAccess policy: pairing, allowlist, or open.
access.usersAllowed Discord user IDs.
access.guildsAllowed Discord guild/server IDs.
access.channelsAllowed Discord channel IDs.
  • If access.mode is omitted and any of users, guilds, or channels are present, the effective mode is allowlist.
  • users, guilds, and channels are only valid with allowlist.
  • allowlist must declare at least one of users, guilds, or channels.
  • Surface secrets are runtime env, not inline manifest secrets.

For Discord, the identifiers are copied from Discord Developer Mode:

  • user ID
  • guild/server ID
  • channel ID

These are low-level identifiers, but they are stable and map cleanly to allowlist semantics.


The portable schema is broader than any single runtime. A conforming compiler must validate the declared surface against the selected runtime and fail early when the runtime cannot preserve it.

RuntimeSupported AccessNotes
openclawpairing, allowlist, openSupports user, guild, and channel policy lowering. Channel allowlists currently require exactly one guild in Spawnfile lowering.
picoclawopen, allowlistSupports Discord token wiring and user allowlists. Guild/channel allowlists are not lowered in v0.1.
tinyclawpairingDiscord client is DM-oriented and pairing-gated. Declarative user/guild/channel allowlists are not supported in Spawnfile v0.1.
  • openclaw is the best current target for full Discord channel/server policy.
  • picoclaw is a good target for token-based Discord plus simple user allowlists.
  • tinyclaw supports Discord as a paired DM surface, not as a general guild/channel surface.

Spawnfile lowers Discord access into the runtime’s richer Discord config surface:

  • dmPolicy
  • groupPolicy
  • allowFrom
  • guilds
  • guilds.*.channels

OpenClaw is the only bundled runtime where the first portable Discord surface maps to a real channel/server policy model instead of a reduced subset.

Spawnfile lowers Discord into PicoClaw’s simpler channel config:

  • token
  • allow_from
  • mention_only

PicoClaw’s user allowlists map well. Guild/channel allowlists do not currently have a portable lowering in Spawnfile.

Spawnfile lowers Discord into TinyClaw’s channel client config and starts the Discord worker process in the generated container.

But the upstream runtime behavior remains pairing-based and DM-oriented, so Spawnfile rejects richer Discord access shapes for TinyClaw at compile time.


  • SPEC.md Defines the canonical manifest schema for surfaces.
  • COMPILER.md Defines when surface support is resolved and validated.
  • CONTAINERS.md Defines how surface secrets are emitted into .env.example and injected at run time.
  • RUNTIMES.md Tracks which runtimes exist; this file tracks what the current standardized surface means on those runtimes.