← 返回
未分类 中文

Agent Templates System

OpenClaw Agent Templates system reference and workflow guide. Use when creating, editing, reviewing, debugging, or extending the built-in Agent Templates fea...
OpenClaw 代理模板系统参考和工作流指南。适用于创建、编辑、审查、调试或扩展内置的代理模板功能。
maverick-software maverick-software 来源
未分类 clawhub v1.0.0 1 版本 100000 Key: 无需
★ 0
Stars
📥 357
下载
💾 0
安装
1
版本
#agents#latest#openclaw#templates#ui

概述

Agent Templates System

Use this skill when working on OpenClaw's built-in Agent Templates feature.

What this system does

The Agent Templates system lets OpenClaw store reusable agent blueprints in SQLite, edit them in the Control UI, and materialize real agents from those blueprints.

A template can define:

  • identity defaults
  • included skills
  • partial agent config
  • workspace files
  • memory seeds

From the UI, a user can:

  • list templates
  • create templates
  • edit templates
  • delete templates
  • create a real agent from a selected template

Core workflow

  1. Read references/implementation.md first.
  2. If UI work is involved, also read references/ui-design.md.
  3. If you need payload examples, read references/template-schema.md and inspect assets/examples/.
  4. When changing behavior, keep storage, gateway methods, and UI state in sync.
  5. When validating a bug or feature, test both:
    • template CRUD
    • agent creation from template

Source of truth files

Read these files in the OpenClaw repo when making code changes:

  • src/agents/templates.ts
  • src/gateway/server-methods/agent-templates.ts
  • ui/src/ui/controllers/templates.ts
  • ui/src/ui/views/templates.ts

Important behaviors

  • Templates are stored in SQLite under the OpenClaw state dir.
  • Template definitions are normalized before storage/use.
  • Creating an agent from a template updates OpenClaw config, creates a workspace, writes identity/workspace files, and seeds memory.
  • Included skills are merged with template config and create-time overrides.
  • Workspace file paths are constrained to stay inside the target workspace.

Practical guidance

  • Prefer small, composable template definitions.
  • Put durable persona/role setup in workspace.files.
  • Put starter memory in workspace.memorySeeds.
  • Use definition.skills for reusable attached skills.
  • Keep UI wording aligned with the underlying JSON schema.
  • If the UI allows raw JSON editing, make parser errors user-legible.

Debugging checklist

  • Can agentTemplates.list return the template?
  • Does agentTemplates.get return the expected normalized definition?
  • Does the UI render the selected template and preserve edits?
  • Does agents.createFromTemplate create a non-conflicting agent id?
  • Were SOUL.md, IDENTITY.md, AGENTS.md, and any seeded files written as expected?
  • Did config get updated with workspace, identity, and merged skills?

References in this skill

  • references/implementation.md — architecture and code map
  • references/template-schema.md — practical schema notes and field behavior
  • references/ui-design.md — Control UI layout and UX notes
  • assets/examples/agent-template-definition.json — example template payload

版本历史

共 1 个版本

  • v1.0.0 当前
    2026-05-07 12:24 安全 安全

安全检测

腾讯云安全 (Keen)

安全,无风险
查看报告

腾讯云安全 (Sanbu)

安全,无风险
查看报告

🔗 相关推荐

ai-agent

Self-improving Agent Memory Upgrade (SurrealDB)

maverick-software
综合知识图谱记忆系统,支持语义搜索、情景记忆、工作记忆、自动上下文注入及代理隔离。
★ 1 📥 2,540
content-creation

Copywriting Pro

maverick-software
为任何形式撰写有说服力、高转化率的文案——广告、着陆页、邮件、销售页、标题、产品描述、CTA和社交帖子。App...
★ 2 📥 5,007
ai-agent

Maton MCP Tools

maverick-software
通过 Maton AI 连接 SaaS 工具,包含 Clawdbot Gateway 仪表盘的完整 UI 集成。适用于设置 Maton 集成及连接应用(如 Gmail 等)。
★ 0 📥 2,038