Skip to content

Configuration

GolemBot uses a single configuration file: golem.yaml in the assistant directory root.

Full Example

yaml
name: my-assistant
engine: claude-code          # cursor | claude-code | opencode | codex
model: claude-sonnet         # optional, preferred model

# Optional: bypass agent permission prompts
skipPermissions: true

# Optional: role/persona definition — injected into AGENTS.md as a System Instructions
# section, read by the engine once per session (not prepended to every message)
systemPrompt: |
  You are a marketing assistant named Aria. Never introduce yourself as OpenCode
  or any coding assistant. Reply in the same language the user uses.

# Optional: production hardening
timeout: 120                 # engine timeout in seconds (default: 300)
maxConcurrent: 20            # max parallel chats (default: 10)
maxQueuePerSession: 2        # max queued requests per user (default: 3)
sessionTtlDays: 14           # prune idle sessions after N days (default: 30)

# Optional: IM channel configuration
channels:
  feishu:
    appId: ${FEISHU_APP_ID}
    appSecret: ${FEISHU_APP_SECRET}
  dingtalk:
    clientId: ${DINGTALK_CLIENT_ID}
    clientSecret: ${DINGTALK_CLIENT_SECRET}
  wecom:
    corpId: ${WECOM_CORP_ID}
    agentId: ${WECOM_AGENT_ID}
    secret: ${WECOM_SECRET}
    token: ${WECOM_TOKEN}
    encodingAESKey: ${WECOM_ENCODING_AES_KEY}
    port: 9000

# Optional: gateway service configuration
gateway:
  port: 3000
  host: 127.0.0.1
  token: ${GOLEM_TOKEN}

Fields

Required

FieldTypeDescription
namestringAssistant name
enginestringEngine type: cursor, claude-code, opencode, or codex

Optional

FieldTypeDefaultDescription
modelstringPreferred model. Format varies by engine — see each engine's docs for valid values
skipPermissionsbooleantrueWhether to bypass agent permission prompts
timeoutnumber300Engine invocation timeout in seconds. The underlying CLI process is killed and a type: 'error' event is emitted
maxConcurrentnumber10Maximum number of parallel chat() calls across all sessions
maxQueuePerSessionnumber3Maximum number of requests that can be queued per session key
sessionTtlDaysnumber30Sessions not used for this many days are pruned at next startup
systemPromptstringRole/persona instructions injected into AGENTS.md as a ## System Instructions section. The engine reads this once as system-level context — it is not prepended to every message, so token cost stays flat across multi-turn conversations
channelsobjectIM channel configurations
gatewayobjectGateway service settings

channels

Configure one or more IM platforms. Only configured channels are started by the gateway.

gateway

FieldTypeDefaultDescription
portnumber3000HTTP service port
hoststring127.0.0.1Bind address
tokenstringBearer token for HTTP API authentication

Environment Variable Placeholders

Sensitive fields support ${ENV_VAR} syntax. At load time, GolemBot resolves these against process.env.

yaml
gateway:
  token: ${GOLEM_TOKEN}    # resolved from process.env.GOLEM_TOKEN

This works for all string values within channels and gateway blocks. Use a .env file alongside golem.yaml — the CLI auto-loads .env from the working directory at startup.

.env Example

sh
FEISHU_APP_ID=cli_xxxxxxxxxx
FEISHU_APP_SECRET=xxxxxxxxxx
GOLEM_TOKEN=my-secret-token
ANTHROPIC_API_KEY=sk-ant-xxxxxxxxxx

TIP

Add .env to .gitignore and commit .env.example (without real values) for sharing.

Model Names by Engine

The model value format is different for each engine:

EngineFormatExampleWhere to find values
cursorCursor model nameclaude-sonnet-4-5Cursor → Settings → Models
claude-codeAnthropic model IDclaude-sonnet-4-6claude models
opencodeprovider/modelanthropic/claude-sonnet-4-5opencode models
codexOpenAI model namecodex-mini-latestcodex models

See the individual engine pages for full model tables and runtime override syntax.

Skills Are Not Configured

Skills are not declared in golem.yaml. The skills/ directory is the single source of truth — whatever skill directories exist, those capabilities are loaded. See Skills.

GolemConfig TypeScript Type

typescript
interface GolemConfig {
  name: string;
  engine: string;
  model?: string;
  skipPermissions?: boolean;
  timeout?: number;             // seconds, default 300
  maxConcurrent?: number;       // default 10
  maxQueuePerSession?: number;  // default 3
  sessionTtlDays?: number;      // default 30
  channels?: {
    feishu?: { appId: string; appSecret: string };
    dingtalk?: { clientId: string; clientSecret: string };
    wecom?: {
      corpId: string;
      agentId: string;
      secret: string;
      token: string;
      encodingAESKey: string;
      port?: number;
    };
  };
  gateway?: {
    port?: number;
    host?: string;
    token?: string;
  };
}

Released under the MIT License.