Skip to main content

3.15.2 @dmoss/agent

@dmoss/agent is a standalone NPM package that provides a pure Agent runtime. It is suitable for scenarios where "you don't need the RDK Studio desktop client and only want an AI Agent capable of invoking tools and executing tasks." Typical use cases include CI/CD, Docker images, and embedded scripts.

Installation

npm install -g @dmoss/agent

Requirements: Node.js 20 or higher; Node.js 22.x is recommended.

Verify installation:

dmoss-agent --version

Configuration

Via environment variables or the local configuration file ~/.dmoss-agent/config.json:

export DMOSS_API_KEY=sk-xxxx
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 environment variables:

VariablePurpose
DMOSS_EXEC_BACKENDCommand execution backend: local (local machine) or remote (remote device)
DMOSS_DEVICE_*Remote device-related settings (IP, user, key, etc.)
DMOSS_WEIXIN_ILINK_TOKENiLink Token for WeChat channel

Three Usage Modes

# Interactive REPL
dmoss-agent

# Single query
dmoss-agent "Help me organize this directory"

# Piped input
echo "Explain this code" | dmoss-agent

Unique Flags

@dmoss/agent has two unique flags compared to rdkstudio:

FlagPurpose
--weixinEnable WeChat iLink channel; CLI process acts as a WeChat Bot server
--meshJoin Agent Mesh for multi-machine collaboration
--debug / --quietControl log verbosity
--log-level=<level>Fine-grained log control
--jsonOutput in JSON format for programmatic parsing
--no-colorDisable ANSI colors
--help, -hShow help
--version, -vShow version

In-Session Commands

CommandFunction
/modelSwitch current model
/modelsList available models
/memoryView current Agent memory
/skillsList loaded skills
/quitExit session

Comparison with rdkstudio

Aspectrdkstudio@dmoss/agent
InstallationEnabled via desktop clientnpm install -g
Configuration sourceShared with desktop clientIndependent (environment variables or local config)
Device managementSupported (device subcommand)Not supported
WeChat channelNot supportedSupported (--weixin)
MeshNot supportedSupported (--mesh)
Best suited forDaily development and automationCI / Docker / pure Agent scenarios

When to Choose @dmoss/agent Over rdkstudio

ScenarioChoice
Running code reviews in CI pipelines@dmoss/agent (no dependency on desktop client)
Deploying Agent inside Docker images@dmoss/agent (smaller image footprint)
Long-running WeChat Bot@dmoss/agent --weixin
Running commands or checking files in daily terminal usagerdkstudio (configuration reuse is more convenient)