Skip to content
Mycelis Roleplay · Reference · 13 min min read

Blueprint Reference (Role Format v1alpha1)

Structure & Minimal Example

Every role in Mycelis Roleplay is a declarative YAML document (apiVersion: mycelis/v1alpha1, kind: Blueprint). Defaults are restrictive (selfProvisioning: approval, spawn.mode: disabled, autonomy: souffleur):

apiVersion: mycelis/v1alpha1
kind: Blueprint
metadata:
  name: linux-ops
  version: 1.0.0
  displayName: Linux Ops
  description: Maintains Linux servers and verifies services.
spec:
  runtime:
    platform: ubuntu-24.04
    screen: none
    sandbox:
      provider: container
      network:
        egress: allowlist
        allow: ["api.github.com", "registry.npmjs.org"]
  brain:
    driver: mycelis-agent
    agent: ops-brain
  agent:
    execution:
      mode: auto
      reasoningEffort: medium
    stepTimeoutSeconds: 0
  capabilities:
    required:
      - name: shell
        source: { type: builtin, id: mycelis.capabilities.shell }
  budget:
    tokens: 2000000
    wallClockMinutes: 120

Validation: Validate blueprints locally via mycelis-roleplay role set <file.yaml> or inside the repository using dotnet run --project src/Mycelis.Roleplay.Blueprint.Validator -- --strict <file.yaml>.


spec.runtime — Machine, Sandbox & Network

Field Values / Meaning
platform Target OS identifier, e.g., windows-11-24h2, ubuntu-24.04, macos-15 (determines windows / linux / macos platform family).
screen present or none (headless server). When none, GUI capabilities and vision cannot be marked required (V18).
sandbox.provider hyper-v, container, windows-sandbox, macos-vm, or bare-metal. bare-metal requires selfProvisioning.mode: disabled (V01). Linux GUI requires container (V21).
sandbox.network.egress allowlist (requires non-empty allow list per V06), denylist, or open.

spec.brain & spec.agent

brain (Required)

Field Meaning
driver mycelis-agent (connected via /api/proxy/v1), anthropic, or openai-compatible.
agent Mycelis Agent slug (valid and required only for mycelis-agent). model, endpoint, and apiKeyRef are forbidden in this mode (V15).
model Provider model ID (required for anthropic and openai-compatible).
endpoint Base URL (required for openai-compatible, optional for anthropic). Non-loopback http:// emits warning V17.
apiKeyRef Secret reference (secret://..., vault://..., env://..., dpapi://...) — never a literal API key (V16).

agent

  • planning: mode (open | playbook-only), approval (auto | required), maxSteps (1–50, default 12), maxRevisions (0–20, default 5).
  • execution: mode (verified | auto | open), restrictOpenSceneTools (default false), openScene.maxToolRounds (0 = unlimited), openScene.timeoutSeconds (0 = unlimited), reasoningEffort ("default" | "disabled" | "low" | "medium" | "high" — never write unquoted off!).
  • commands: defaultTimeoutSeconds (0 = unlimited), maxTimeoutSeconds (0 or >= defaultTimeoutSeconds, V22).
  • contextPolicy: maxScreenshots (2, warning if > 4), screenshotRetention (last-n), includeUiaTreeDiff (true), maxToolResultChars (12000), compactAtTokens (80000), keepRecentRounds (4).
  • memory: mode (enabled | disabled), reflect (false), autoSkills (false), perScene (8), companyMemoryAccess (read-write | read-only | disabled).
  • web.search: provider (brave | tavily | searxng), apiKeySecret, endpoint (V22).
  • schedules: max (0–200, default 20).
  • meeting: transcription, speech, inputDevice, outputDevice, segmentSeconds, maxDurationMinutes, maxToolRounds (V24).
  • concurrency: maxMissions (1–16), maxSubtasks (0–16), subtaskShare (0.05–0.9, maxSubtasks * subtaskShare <= 1.0 per V25), maxCpuPercent, minFreeMemoryMb, hireAfterMinutes.

spec.capabilities — Built-In & External Capabilities

Built-in capabilities (source.type: builtin) ship with the runtime and require no download:

ID Purpose
mycelis.capabilities.shell Shell sessions, background processes, file read/write/edit/search, file_view_image
mycelis.capabilities.windows / macos / linux Native GUI automation via UIA / Accessibility / AT-SPI (must match OS family, V19)
mycelis.capabilities.vision Screenshots, vision_scroll, vision_drag, OCR (requires screen: present, V18)
mycelis.capabilities.coding Headless orchestration of Claude Code, Codex CLI, opencode, Gemini CLI, and Aider
mycelis.capabilities.packages OS package management via winget, apt, brew
mycelis.capabilities.web web_fetch and optional web_search
mycelis.capabilities.meeting Join, transcribe, and speak in browser meetings

External MCP servers support source.type: mcp-registry, winget, npm, oci, or local. Under selfProvisioning, configure mode (disabled | approval | auto), allowedSources, allowedNamespaces (required for auto, "*" forbidden per V02), denyPackages, and maxInstallsPerMission (default 3).


spec.autonomy, spec.policy & spec.budget

  • autonomy: souffleur (default) or stegreif.
  • policy.gates & policy.forbidden: Rules specifying action, optional glob scope, and approval: required | auto.
  • Canonical policy action identifiers: capability.install, capability.mount, capability.uninstall, package.install, package.uninstall, file.read, file.write, file.delete, process.start, process.kill, process.elevate, registry.read, registry.write, network.egress, credential.read, credential.write, ui.click, ui.type, ui.screenshot, delegation.spawn, delegation.request, plan.revise, memory.write, schedule.create, media.record, media.speak, role.draft, agent.ask, subtask.spawn, staff.request, watch.manage, system.dialog.
  • policy.verification: requireDeterministicPostcondition: true, onUnverifiable (escalate | fail | continue), maxRetriesPerStep, escalationLadder (default [native, uia, ocr, human]), agentMayChooseStage (true).
  • budget: At least one limit is mandatory (V05): tokens, wallClockMinutes (0/omitted = unlimited), steps, costUsd. Child budgets via childInheritance.mode (share-of-parent with 0 < maxShare < 1.0, fixed, or none, V04).

spec.delegation, spec.watch, spec.duty & spec.lifecycle

  • delegation: spawn (mode, maxDepth, maxChildren, allowedBlueprints – V03/V10) and peers (inbound.allowBlueprints, inbound.exposeCapabilities, outbound.allowBlueprints).
  • plans: Bound playbooks with ref, version, trigger (manual | schedule | event, V14).
  • watch: sources (imap, ics, file, process, webhook, heartbeat, feed, http, advisory, threshold, drift with optional quiet), reports (daily, weekly), and alerts (V23).
  • duty: area, goals, limits, reportsTo, triage.brain, periodic budget, procedures (stages with env, do, check, waitHours, window, ask, provision, plus rollback), and reports (V27, V28).
  • lifecycle: ttlMinutes (mandatory when spawn.mode != disabled, V03), idleShutdownMinutes, restartPolicy (never | on-failure | always; always forbidden when spawned per V09), healthCheck.
  • observability: ledger.enabled, ledger.level (full | actions | disabled, V08), logLevel, retainArtifactsDays, redactSecretFields (true).

Next steps