Skip to main content

3.16.2 dmoss-agent

@dmoss/agent is a standalone NPM package aimed at automation. For normal RDK Studio workflows, prefer the previous section’s rdkstudio.

Consider dmoss-agent for CI/CD, Docker, or headless scripts only.

Install

npm install -g @dmoss/agent

Requires Node.js 20+ (22.x recommended).

Verify:

dmoss-agent --version

Configuration

Set the model via environment variables or ~/.dmoss-agent/config.json. Keep API keys in CI secrets or env—not in git.

export DMOSS_API_KEY=<your-api-key>
export DMOSS_MODEL=qwen3.6-plus
export DMOSS_BASE_URL=https://dashscope.aliyuncs.com/compatible-mode/v1
export DMOSS_WORKSPACE=/path/to/your/project

Optional variables:

VariablePurpose
DMOSS_EXEC_BACKENDCommand backend: local or remote
DMOSS_DEVICE_*Remote device (IP, user, keys, …)
DMOSS_WEIXIN_ILINK_TOKENWeChat iLink channel token

Modes

# Interactive
dmoss-agent

# One-shot
dmoss-agent "Organize this directory"

# Pipe
echo "Explain this code" | dmoss-agent

Extra flags

@dmoss/agent adds automation-oriented switches beyond rdkstudio:

FlagPurpose
--weixinEnable WeChat iLink; CLI acts as bot server
--meshJoin Agent Mesh for multi-host work
--debug / --quietVerbosity
--log-level=<level>Fine-grained logging
--jsonMachine-readable output
--no-colorDisable ANSI color
--help, -hHelp
--version, -vVersion

Interactive commands

CommandAction
/modelSwitch model
/modelsList models
/memoryInspect agent memory
/skillsList loaded skills
/quitExit

vs rdkstudio

Aspectrdkstudio@dmoss/agent
InstallDesktop enables + PATHnpm install -g
ConfigShared with desktopEnv or ~/.dmoss-agent/config.json
Devicesdevice subcommandsNot supported
WeChatNot supported--weixin
MeshNot supported--mesh
Best forDaily dev + light automationCI / Docker / pure agent

Picking between them

ScenarioChoice
CI code review@dmoss/agent (no desktop dependency)
Agent inside Docker@dmoss/agent (smaller image story)
WeChat bot from scriptsdmoss-agent --weixin
Everyday terminal tasksrdkstudio (shared config)