#error invalid

1 messages · Page 1 of 1 (latest)

modern gyro
#

"channels": {
"discord": {
"historyLimit": 2,
"enabled": true,
"commands": {
"native": true,
"nativeSkills": true
},
"token": "*",
"allowBots": false,
"groupPolicy": "allowlist",
"chunkMode": "newline",
"streaming": "off",
"dmPolicy": "allowlist",
"allowFrom": [
"1097940895006998569"
],
"dm": {
"enabled": true,
"groupEnabled": true,
"groupChannels": [
"1491136159990939708"
]
},
"guilds": {
"1487454900903350403": {
"requireMention": false,
"channels": {
"1491136159990939708": {
"allow": true
}
}
}
}
}
},
"agentComponents": {
"enabled": true
},
"accounts": {},
"defaultAccount": "1491136159990939708",
"gateway": {
"port": 18789,
"mode": "local",
"bind": "lan",
"customBindHost": "",
"controlUi": {
"enabled": true,
"allowedOrigins": [
"http://192.168.100.104:18789/"
],
"allowInsecureAuth": true
},
"auth": {
"mode": "password",
"token": "5f1a2dcad7e690288c6fb2637e8cb9b90f1a634398cf12db",
"password": "221542"
},
"tailscale": {
"mode": "off",
"resetOnExit": false
},
"nodes": {
"denyCommands": [
"camera.snap",
"camera.clip",
"screen.record",
"contacts.add",
"calendar.add",
"reminders.add",
"sms.send"
]
}
},
"plugins": {
"entries": {
"duckduckgo": {
"enabled": true,
"config": {}
}
}
}
}
error

[reload] config reload skipped (invalid config): : Unrecognized keys: "agentComponents", "accounts", "defaultAccount"

openclaw 2026.3.28 window 10 2

surreal mauveBOT
trim urchinBOT
#

To help others find answers, you can mark your question as solved via Right click solution message -> Apps -> ✅ Mark Solution

surreal mauveBOT
balmy estuaryBOT
#

You’re hitting a schema mismatch.

For the build that’s actually validating your config, these are not accepted under channels.discord:

  • agentComponents
  • accounts
  • defaultAccount

For a single Discord bot, remove all three.

Also, defaultAccount is for multi-account bot setups only, and it must be an account id like "main", not a Discord channel id.

Use something like this instead:

{
#
  channels: {
    discord: {
      enabled: true,
      token: "*",
      allowBots: false,
      groupPolicy: "allowlist",
      chunkMode: "newline",
      streaming: "off",
      dmPolicy: "allowlist",
      allowFrom: ["1097940895006998569"],
      dm: {
        enabled: true,
        groupEnabled: true,
        groupChannels: ["1491136159990939708"],
      },
#
      guilds: {
        "1487454900903350403": {
          requireMention: false,
          channels: {
            "1491136159990939708": { allow: true },
          },
        },
      },
    },
  },
}

If you really want multi-account later, the shape is more like:

#
channels: {
  discord: {
    defaultAccount: "main",
    accounts: {
      main: { token: "*" },
    },
  },
}

Two more important things:

  1. You pasted your gateway.auth.token and gateway.auth.password publicly. Rotate both now.
  2. From the formatting, also double-check that gateway and plugins are top-level, not nested inside channels.discord.

After editing, run:

modern gyro
#

ไม่ๆ ฉันต้องการใช้ agent ตัวที่สอง ที่ใช้ api cloude ในการควบคุมจัดการ เพราะ main นั้นไม่มี calling tool

balmy estuaryBOT
#

อ๋อ เข้าใจแล้ว, คุณต้องการ agent ตัวที่ 2 ที่ใช้ Claude ไม่ใช่แค่ Discord account ตัวที่ 2

ตรงนี้แยกเป็น 2 เรื่องครับ:

  1. agent ตัวที่ 2 → ใช้ agents.list + bindings
  2. Discord bot/account ตัวที่ 2 → ใช้ channels.discord.accounts

จาก snippet ที่แปะมา ดูเหมือน bracket ปิดผิด ด้วย เลยทำให้ agentComponents, accounts, defaultAccount หลุดไปอยู่ผิด level แล้ว schema เลย reject

แบบที่ผมแนะนำก่อน, ง่ายสุด

ใช้ Discord bot ตัวเดิม แต่ route channel นี้ไปหา agent claude

{
  agents: {
    list: [
#
      { id: "main", workspace: "~/.openclaw/workspace-main" },
      {
        id: "claude",
        workspace: "~/.openclaw/workspace-claude",
        model: { primary: "anthropic/claude-sonnet-4-6" },
      },
    ],
  },

  bindings: [
    {
      agentId: "claude",
      match: {
        channel: "discord",
        peer: { kind: "channel", id: "1491136159990939708" },
#
      },
    },
  ],

  channels: {
    discord: {
      enabled: true,
      token: "*",
      allowBots: false,
      groupPolicy: "allowlist",
      chunkMode: "newline",
      streaming: "off",
      dmPolicy: "allowlist",
      allowFrom: ["1097940895006998569"],
      dm: {
#
        enabled: true,
        groupEnabled: true,
        groupChannels: ["1491136159990939708"],
      },
      guilds: {
        "1487454900903350403": {
          requireMention: false,
          channels: {
            "1491136159990939708": { allow: true },
          },
        },
      },
    },
  },
#
  gateway: {
    // ...
  },

  plugins: {
    // ...
  },
}

ถ้าคุณต้องการ “Discord bot คนละตัว” ด้วย

ตอนนั้นค่อยใช้ channels.discord.accounts แบบนี้:

{
#
  agents: {
    list: [
      { id: "main", workspace: "~/.openclaw/workspace-main" },
      {
        id: "claude",
        workspace: "~/.openclaw/workspace-claude",
        model: { primary: "anthropic/claude-sonnet-4-6" },
      },
    ],
  },

  bindings: [
    { agentId: "main", match: { channel: "discord", accountId: "default" } },
    { agentId: "claude", match: { channel: "discord", accountId: "claude" } },
  ],
#

  channels: {
    discord: {
      defaultAccount: "default",
      accounts: {
        default: {
          token: "DISCORD_BOT_TOKEN_MAIN",
        },
        claude: {
          token: "DISCORD_BOT_TOKEN_CLAUDE",
        },
      },
    },
  },
}
#

จุดสำคัญ

  • defaultAccount ต้องเป็น account id เช่น "default" หรือ "claude"
  • ห้าม ใส่เป็น channel id
  • agents, bindings, gateway, plugins = top-level
  • accounts, defaultAccount, agentComponents = อยู่ใต้ channels.discord

ถ้าจะทำผ่าน CLI

pnpm openclaw agents add claude --workspace ~/.openclaw/workspace-claude --model anthropic/claude-sonnet-4-6
pnpm openclaw agents list --bindings

แล้วอย่าลืมตั้ง Anthropic auth/model ให้ agent claude ด้วย
docs:

#

แล้วอีกเรื่อง, คุณเผลอแปะ gateway.auth.token กับ password มาสาธารณะแล้ว, หมุนใหม่ด้วยนะครับ

ถ้าต้องการ ผมช่วย จัด config ฉบับเต็มที่แก้ bracket ให้เลย จากไฟล์นี้ได้ครับ

modern gyro
#

"meta": {
"lastTouchedVersion": "2026.3.28",
"lastTouchedAt": "2026-04-17T03:11:40.666Z"
},
"env": {
"vars": {},
"GROQ_API_KEY": "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"
},
"wizard": {
"lastRunAt": "2026-04-11T21:08:26.662Z",
"lastRunVersion": "2026.3.28",
"lastRunCommand": "onboard",
"lastRunMode": "local"
},
"auth": {
"profiles": {
"ollama:default": {
"provider": "ollama",
"mode": "api_key"
},
"groq:default": {
"provider": "groq",
"mode": "api_key"
}
}
},

balmy estuaryBOT
#

ใช่ครับ, จาก snippet ล่าสุดเห็นชัดขึ้นแล้ว:

  1. ตอนนี้ยังไม่มี Anthropic auth
    ใน auth.profiles มีแค่ ollama กับ groq
    ถ้าจะใช้ agent ตัวที่ 2 เป็น Claude, ต้องเพิ่ม Anthropic ก่อน

  2. คุณไม่จำเป็นต้องใช้ channels.discord.accounts ถ้ายังใช้ Discord bot ตัวเดิม
    ถ้าต้องการแค่ “channel นี้วิ่งเข้า agent Claude” ให้ใช้ agents.list + bindings พอ

  3. คุณเผลอแปะ secret สาธารณะแล้ว

    • GROQ_API_KEY
    • gateway.auth.token
    • gateway.auth.password
      หมุนใหม่ทันทีนะครับ

โครงที่ควรเป็นสำหรับเคสนี้

ใช้ bot Discord ตัวเดิม, แต่ route channel นี้ไป agent claude

#
{
  meta: {
    lastTouchedVersion: "2026.3.28",
    lastTouchedAt: "2026-04-17T03:11:40.666Z",
  },

  env: {
    vars: {},
    GROQ_API_KEY: "REDACTED",        // rotate
    ANTHROPIC_API_KEY: "REDACTED",   // add this
  },

  wizard: {
    lastRunAt: "2026-04-11T21:08:26.662Z",
    lastRunVersion: "2026.3.28",
#
    lastRunCommand: "onboard",
    lastRunMode: "local",
  },

  auth: {
    profiles: {
      "ollama:default": { provider: "ollama", mode: "api_key" },
      "groq:default": { provider: "groq", mode: "api_key" },
      "anthropic:default": { provider: "anthropic", mode: "api_key" },
    },
  },

  agents: {
    list: [
      { id: "main", workspace: "~/.openclaw/workspace-main" },
#
      {
        id: "claude",
        workspace: "~/.openclaw/workspace-claude",
        model: { primary: "anthropic/claude-sonnet-4-6" },
      },
    ],
  },

  bindings: [
    {
      agentId: "claude",
      match: {
        channel: "discord",
        peer: { kind: "channel", id: "1491136159990939708" },
      },
#
    },
  ],

  channels: {
    discord: {
      historyLimit: 2,
      enabled: true,
      commands: {
        native: true,
        nativeSkills: true,
      },
      token: "*",
      allowBots: false,
      groupPolicy: "allowlist",
      chunkMode: "newline",
#
      streaming: "off",
      dmPolicy: "allowlist",
      allowFrom: ["1097940895006998569"],
      dm: {
        enabled: true,
        groupEnabled: true,
        groupChannels: ["1491136159990939708"],
      },
      guilds: {
        "1487454900903350403": {
          requireMention: false,
          channels: {
            "1491136159990939708": { allow: true },
          },
        },
#
      },
      agentComponents: {
        enabled: true,
      },
    },
  },

  gateway: {
    port: 18789,
    mode: "local",
    bind: "lan",
    customBindHost: "",
    controlUi: {
      enabled: true,
      allowedOrigins: ["http://192.168.100.104:18789/"],
#
      allowInsecureAuth: true,
    },
    auth: {
      mode: "password",
      token: "REDACTED",
      password: "REDACTED",
    },
    tailscale: {
      mode: "off",
      resetOnExit: false,
    },
    nodes: {
      denyCommands: [
        "camera.snap",
        "camera.clip",
#
        "screen.record",
        "contacts.add",
        "calendar.add",
        "reminders.add",
        "sms.send",
      ],
    },
  },

  plugins: {
    entries: {
      duckduckgo: {
        enabled: true,
        config: {},
      },
#
    },
  },
}

สรุปสั้นๆ

  • ถ้าใช้ Discord bot เดิมลบ accounts กับ defaultAccount ไปก่อน
  • เพิ่ม agents.list + bindings
  • เพิ่ม Anthropic auth/key
  • หมุน secrets ที่หลุดทั้งหมด

ถ้าคุณต้องการ ผมช่วยทำ เวอร์ชันที่ใช้ Discord bot 2 ตัวจริงๆ ให้ต่อได้เลยครับ
docs:

modern gyro
#

ฉันใช้ groq / llama3.1.8b binding มันเข้าไปหา agent ตัวที่สองเอาไว้แล้ว เมื่อกี้มันทำงานได้ปกติแต่พอฉันเพิ่ม หัวข้อ "historyLimit": 2, เท่านั้นแหละพังเลย

balmy estuaryBOT
#

อ๋อ ถ้างั้นชัดเลย, ไม่ใช่ historyLimit ที่พัง ครับ, key นี้ใช้ได้

ตัวที่พังคือ brace หลุดตอนแก้ไฟล์ ทำให้ agentComponents, accounts, defaultAccount หลุดออกจาก channels.discord

แก่นของปัญหา

บล็อกนี้ของคุณตอนนี้ปิด guilds / discord ผิดตำแหน่ง

ให้แก้เป็นแบบนี้:

channels: {
  discord: {
    historyLimit: 2,
    enabled: true,
    commands: {
      native: true,
#
      nativeSkills: true,
    },
    token: "*",
    allowBots: false,
    groupPolicy: "allowlist",
    chunkMode: "newline",
    streaming: "off",
    dmPolicy: "allowlist",
    allowFrom: ["1097940895006998569"],
    dm: {
      enabled: true,
      groupEnabled: true,
      groupChannels: ["1491136159990939708"],
    },
    guilds: {
#
      "1487454900903350403": {
        requireMention: false,
        channels: {
          "1491136159990939708": {
            allow: true,
          },
        },
      },
    },
    agentComponents: {
      enabled: true,
    },
    accounts: {},
    defaultAccount: "your-account-id",
  },
#
},

gateway: {
  // ...
},

plugins: {
  entries: {
    duckduckgo: {
      enabled: true,
      config: {},
    },
  },
},
#

สั้นๆ คือ

  • historyLimit: 2 ใส่ได้
  • ต้องมีแค่
    • guilds ปิดให้ครบ
    • แล้วค่อยตามด้วย agentComponents / accounts / defaultAccount
  • gateway กับ plugins ต้องเป็น top-level
  • agentComponents / accounts / defaultAccount ต้องอยู่ ข้างใน channels.discord

และอีกจุดหนึ่ง, ไม่เกี่ยวกับ error รอบนี้ แต่ defaultAccount ควรเป็น account id ไม่ใช่ channel id
เช่น "default" หรือ "claude" ไม่ใช่ "1491136159990939708"

ถ้าต้องการ ผมช่วยรีจัด ทั้งไฟล์เต็ม ให้จากของที่คุณแปะมาได้เลยครับ
docs: https://docs.openclaw.ai/gateway/configuration-reference

modern gyro
#

ที่นี้ฉันต้องรีดไขมันการใช้ token ออกจาก agent ตัวนี้อีกเพราะเมื่อเรียกใช้งานมัน error
{
"request_id": "req_01kphb61y5frdt6a8rzpzb3py3",
"created_at": "2026-04-18T22:25:35.173Z",
"error": {
"message": "Request too large for model llama-3.1-8b-instant in organization org_01kn75gb2hfp3sxqcd13zh042w service tier on_demand on tokens per minute (TPM): Limit 6000, Requested 18263, please reduce your message size and try again. Need more tokens? Upgrade to Dev Tier today at https://console.groq.com/settings/billing",
"type": "tokens",
"param": "",
"code": "rate_limit_exceeded"
}
}

balmy estuaryBOT
#

ใช่เลย, จุดสำคัญคือ ตอนนี้ historyLimit: 2 ยังไม่ได้ถูกใช้งานจริง เพราะ config reload โดน skip จาก syntax/nesting error

ดังนั้นลำดับที่ถูกคือ:

1) แก้ config ให้ reload ผ่านก่อน

ตอนนี้ error นี้ทำให้ค่าที่เพิ่มเข้าไปไม่ถูก apply:

[reload] config reload skipped (invalid config)

พอแก้ brace ให้ถูกแล้ว historyLimit: 2 จะเริ่มช่วยทันที

2) สำหรับ agent Groq ตัวนี้, รีด token เพิ่มแบบตรงจุด

Groq ของคุณโดนเพราะ TPM limit 6000 แต่ request = 18263
อันนี้แปลว่า prompt ทั้งก้อนยังใหญ่เกินไปมาก

#

สิ่งที่ช่วยแรงสุด

  • historyLimit: 2 หรือแม้แต่ 1
  • ใช้ /compact บ่อยๆ ใน session นั้น
  • ทำ workspace ของ agent ตัวนี้ให้ บาง
    • AGENTS.md
    • SOUL.md
    • USER.md
    • TOOLS.md
      ให้สั้นที่สุด เพราะมันเข้าระบบ prompt ทุก turn

config knobs ที่ช่วยได้จริง

agents: {
  defaults: {
    bootstrapMaxChars: 2000,
    bootstrapTotalMaxChars: 8000,
#
  },
  list: [
    {
      id: "groq-lite",
      skillsLimits: {
        maxSkillsPromptChars: 1200,
      },
      contextLimits: {
        memoryGetMaxChars: 3000,
        memoryGetDefaultLines: 40,
        toolResultMaxChars: 3000,
        postCompactionMaxChars: 4000,
      },
    },
  ],
#
}

ถ้า agent นี้ไม่ต้องใช้ skills เยอะ

ให้ allowlist แค่ skill ที่จำเป็นจริงๆ
เพราะรายการ skills ก็โดนยัดเข้า prompt เหมือนกัน

3) ความจริงที่ต้องพูดตรงๆ

llama-3.1-8b-instant + OpenClaw + tools = ค่อนข้างคับมาก
โดยเฉพาะถ้ามี system prompt, history, skills, tool schemas ครบชุด

ดังนั้นถ้าแก้ syntax แล้ว + ลด context แล้ว ยังเกิน 6k อีก
แปลว่า model นี้เล็กเกินสำหรับงาน agentic ของคุณแล้ว, ต้อง:

  • ขยับไป model/provider ที่เผื่อ context มากกว่า, หรือ
  • ทำ agent ตัวนี้ให้เป็น “lite agent” จริงๆ
#

ผมแนะนำ practical path

  1. แก้ brace ให้ config โหลดก่อน
  2. คง historyLimit: 2
  3. ลด workspace prompt files ของ agent นี้
  4. ใส่ skillsLimits + contextLimits
  5. ลอง /compact
  6. ถ้ายังชน 6k อีก, เปลี่ยน model

Docs:

ถ้าคุณอยาก, ผมช่วยทำ config เวอร์ชัน “groq-lite” ให้ทั้งก้อนเลยได้ครับ โดยยึดจากไฟล์นี้ตรงๆ

modern gyro
#

จะตั้งค่า TOOLS.md ว่าอย่างไรดี ฉันต้องการให้ agent ตัวนี้ทำหน้าที่เป้นผู้ควบคุม Dsicord ครบวงจร แต่ไม่ต้องทำอย่างอื่น แค่รับ และ ส่งข้อความผ่านดิสคอร์ด และควบคุม ลบ สร้าง ข้อความ ห้อง แค่นั้น

balmy estuaryBOT
#

ถ้าคุณต้องการ ล็อกให้ agent นี้เป็น Discord operator อย่างเดียวจริงๆ
ต้องทำ 2 ชั้นครับ:

1) Hard lock ใน config, อันนี้สำคัญสุด

TOOLS.md อย่างเดียวไม่พอ, มันเป็นแค่ “คำแนะนำ”
ตัวที่บังคับจริงคือ agents.list[].tools

ถ้าต้องการให้มันทำได้แค่ Discord actions, ใช้แค่นี้พอ:

agents: {
  list: [
    {
      id: "discord-ops",
      tools: {
        allow: ["message"],
#
      },
    },
  ],
}

ถ้าอยากให้มันยังดูสถานะตัวเองได้ด้วย:

agents: {
  list: [
    {
      id: "discord-ops",
      tools: {
        allow: ["message", "session_status"],
#
      },
    },
  ],
}

สำหรับงาน Discord ที่คุณบอกมา, tool หลักคือ message
มันครอบคลุม send / edit / delete / channel-create / channel-edit / channel-delete / thread-create / search / pin / react ฯลฯ อยู่แล้ว

2) ค่อยใส่ TOOLS.md เพื่อบอกบทบาท

อันนี้คือข้อความที่ผมแนะนำ:

# TOOLS.md
#
This agent is a Discord operations controller only.

Use only the `message` tool.

Allowed work:
- receive and respond to Discord messages
- send, edit, delete messages
- create, edit, delete channels
- create and manage threads
- react, pin, unpin, search, and inspect Discord metadata when needed

Do not:
- use filesystem tools
- use exec/process
- browse the web
#
- use media/image/audio tools
- use memory or sub-agent tools
- do work outside Discord operations

If a request is outside Discord operations, say it is out of scope.

สรุปสั้นๆ

  • บังคับจริง = agents.list[].tools.allow: ["message"]
  • กำหนดบทบาท/นิสัย = TOOLS.md
  • ถ้าจะให้มันเป็น Discord-only แบบเด็ดขาด, ผมแนะนำไม่ต้องเปิด tool อื่นเลย

Docs:

#

ถ้าคุณต้องการ ผมช่วยเขียน config ของ agent discord-ops แบบครบทั้ง tools + model + binding ให้เป็นก้อนได้เลยครับ

modern gyro
#

07:45:12+07:00 Gateway start blocked: set gateway.mode=local (current: unset) or pass --allow-unconfigured.
07:45:12+07:00 Config write audit: C:\Users\SECOND.openclaw\logs\config-audit.jsonl

balmy estuaryBOT
#

ใช่ครับ, อันนี้เป็น อาการต่อเนื่องจาก config invalid ตัวเดิม ไม่ใช่บั๊กใหม่

สิ่งที่กำลังเกิดขึ้น

ตัว runtime เห็นว่า:

gateway.mode = unset

ทั้งที่ในไฟล์คุณมี mode: "local" อยู่แล้ว

แปลว่า บล็อก gateway ของคุณไม่ได้ถูกอ่านจริง
เพราะ config ทั้งก้อนยัง parse ไม่ผ่าน, เลย fallback ไปใช้ config snapshot เก่าที่ gateway.mode ยังว่างอยู่

สรุป root cause

ต้องแก้ nesting ให้เป็นแบบนี้:

#
{
  channels: {
    discord: {
      historyLimit: 2,
      enabled: true,
      // ...
      guilds: {
        "1487454900903350403": {
          requireMention: false,
          channels: {
            "1491136159990939708": { allow: true },
          },
        },
      },
      agentComponents: {
#
        enabled: true,
      },
      accounts: {},
      defaultAccount: "default", // ไม่ใช่ channel id
    },
  },

  gateway: {
    mode: "local",
    port: 18789,
    bind: "lan",
    customBindHost: "",
    controlUi: {
      enabled: true,
      allowedOrigins: ["http://192.168.100.104:18789/"],
#
      allowInsecureAuth: true,
    },
    auth: {
      mode: "password",
      token: "REDACTED",
      password: "REDACTED",
    },
    tailscale: {
      mode: "off",
      resetOnExit: false,
    },
    nodes: {
      denyCommands: [
        "camera.snap",
        "camera.clip",
#
        "screen.record",
        "contacts.add",
        "calendar.add",
        "reminders.add",
        "sms.send",
      ],
    },
  },

  plugins: {
    entries: {
      duckduckgo: {
        enabled: true,
        config: {},
      },
#
    },
  },
}

ประโยคสั้นๆ

  • gateway.mode=local ไม่ได้หาย
  • แต่มัน ไม่ถูกโหลด
  • เพราะ config ยัง invalid อยู่

ถ้าจะ bypass ชั่วคราว

ทำได้ด้วย --allow-unconfigured แต่ผมไม่แนะนำให้ใช้เป็นทางแก้หลัก
เพราะต้นตอจริงคือไฟล์ config ยังปิด {} ผิด

ถ้าคุณอยาก, ผมช่วย รีเรียงไฟล์ทั้งก้อนจากของที่แปะมาให้เป็น valid JSON5 ได้เลยครับ
docs: https://docs.openclaw.ai/help/faq

modern gyro
#

การใช้ ตั้ง params = maxToken ไว้ 300 ปิด tool เหลือ messaging ลด history เหลือ 2 ตอนนี้ tokenที่ใช้เหลือ 10000 แล้ว

balmy estuaryBOT
#

ดีขึ้นเยอะเลยครับ, จาก 18k ลงมา 10k ถือว่าเดินมาถูกทางแล้ว 👍

แต่สำหรับ llama-3.1-8b-instant ที่ติดเพดาน 6k, 10k ยังเกินอยู่
ตอนนี้ตัวที่เหลือหนักๆ มักไม่ใช่ history แล้ว, แต่เป็นพวกนี้:

  1. workspace prompt files

    • AGENTS.md
    • SOUL.md
    • USER.md
    • TOOLS.md
  2. system prompt รวม

  3. skills prompt

  4. tool schema overhead

สิ่งที่ผมแนะนำต่อจากนี้

1) ทำ agent นี้ให้เป็น “lean workspace” จริงๆ

#

สำหรับ agent Discord controller ตัวนี้, ทำไฟล์ใน workspace ให้สั้นมากๆ
โดยเฉพาะ AGENTS.md, TOOLS.md, USER.md

2) จำกัด bootstrap

agents: {
  defaults: {
    bootstrapMaxChars: 1500,
    bootstrapTotalMaxChars: 4000,
  },
}

3) บีบ skills prompt

agents: {
#
  list: [
    {
      id: "discord-ops",
      skillsLimits: {
        maxSkillsPromptChars: 800,
      },
    },
  ],
}

4) ถ้า agent นี้ไม่ต้องมี skills เลย, ปิดให้หมด

เพราะคุณใช้แค่ message tool อยู่แล้ว

5) ถ้าต้องเอาให้บางสุดจริงๆ

ใช้ systemPromptOverride สั้นๆ สำหรับ agent นี้แทน prompt ก้อนใหญ่

#

ตัวอย่าง:

agents: {
  list: [
    {
      id: "discord-ops",
      systemPromptOverride:
        "You are a Discord operations agent. Use only the message tool for Discord tasks: send, edit, delete messages, and create/edit/delete channels/threads. Refuse non-Discord work.",
      tools: {
        allow: ["message"],
      },
    },
  ],
}