F FourIA GitHub ↗

SDK Domain Modules

On this page

createClient() returns a MoltlazyClient with 7 domain modules. Each module wraps a set of related Admin HTTP RPC methods with typed parameters and response types.

config

client.config.get()                        // config.get
client.config.set(params: ConfigSetParams)  // config.set
client.config.apply(params: ConfigApplyParams) // config.apply

ConfigSetParams and ConfigApplyParams both accept:

{
  raw: string;        // serialised JSON config fragment
  baseHash?: string;  // optional optimistic concurrency token
}

Example — set session DM scope:

await client.config.set({
  raw: JSON.stringify({ session: { dmScope: 'per-channel-peer' } }),
});

agents

client.agents.list()
client.agents.create(params: AgentCreateParams)
client.agents.update(params: AgentUpdateParams)
client.agents.delete(params: AgentDeleteParams)

AgentCreateParams requires name and workspace:

await client.agents.create({
  name: 'coder',
  workspace: '/home/openclaw/workspace',
  model: 'claude-opus-4', // optional
});

channels

client.channels.status(params?: ChannelStatusParams)
client.channels.start(params)
client.channels.stop(params)

ChannelStatus includes ts, channelOrder, channels, channelAccounts, and channelDefaultAccountId.

devices

client.devices.list()
client.devices.approve(params: DevicePairActionParams)
client.devices.reject(params: DevicePairActionParams)
client.devices.remove(params: DevicePairActionParams)

DevicePairRequest fields: requestId, deviceId, displayName, publicKey, ts.

cron

client.cron.list()
client.cron.get(params: { name: string })
client.cron.add(params: CronAddParams)
client.cron.update(params: CronUpdateParams)
client.cron.remove(params: CronRemoveParams)
client.cron.run(params: CronRunParams)

CronAddParams requires a discriminated CronSchedule union (at / every / cron) plus name, sessionTarget, wakeMode, and a payload union (systemEvent | agentTurn).

models

client.models.list();
client.models.authStatus();

ModelInfo has required fields id and name.

gateway

client.gateway.health()
client.gateway.status()
client.gateway.restart()
client.gateway.logsTail(params?)

HealthResponse and GatewayStatus are moltlazy-defined types with no direct upstream equivalent.