Configuration Reference
snsagent has three configuration surfaces:
- The interactive agent uses
~/.omp/agent/config.ymland~/.omp/agent/models.yml. - Existing installs may also have
~/.omp/agent/config.jsonwith compatibility provider and model values. - The small legacy
init,setup, andconfigrouter uses.sns-myagent/config.jsonin the current project directory.
Most users should use the interactive agent configuration described first.
Interactive agent configuration
The agent directory is normally ~/.omp/agent. It can be relocated by the upstream directory environment settings. The agent stores settings in:
| File | Purpose |
|---|---|
~/.omp/agent/config.yml | Persistent settings such as model roles, memory, tools, and UI preferences |
~/.omp/agent/config.json | Compatibility configuration, including provider and model values on existing installs |
~/.omp/agent/models.yml | Provider and model definitions |
~/.omp/agent/agent.db | SQLite state and migrated settings, managed by the application |
do not edit agent.db while the agent is running. Stop snsagent first, then edit or back up the file.
Provider and model setup
The quickest path is:
snsagent
/setup
For a custom provider, use the BYOK setup flow. A hand-written provider entry in ~/.omp/agent/models.yml looks like this:
providers:
nine-router:
baseUrl: http://127.0.0.1:20128/v1
api: openai-completions
auth: apiKey
apiKey: your-local-api-key
models:
- id: combo1
contextWindow: 1000000
supportsTools: true
Supported API types include:
| API type | Typical use |
|---|---|
openai-completions | OpenAI-compatible endpoints, OpenRouter, Ollama, vLLM, and LM Studio |
openai-responses | OpenAI Responses API |
anthropic-messages | Anthropic Claude |
google-generative-ai | Google Gemini |
azure-openai-responses | Azure OpenAI |
The models loader expects a concrete local API key value when the provider requires one. Keep this file private, or use the credential mechanism supported by your provider setup.
never commit API keys to git. Prefer environment variables (OPENAI_API_KEY, ANTHROPIC_API_KEY, …) or a git-ignored local config file over pasting a real key into models.yml in a shared repo.
Model roles
Role assignments are stored under modelRoles in config.yml. For example:
modelRoles:
default: nine-router/combo1
The orchestrate command resolves the persisted modelRoles.default role for its agent runs.
Settings
The settings schema is defined in src/config/settings-schema.ts. Common examples include:
modelRoles:
default: nine-router/combo1
memory:
backend: mnemopi
mnemopi:
autoRecall: true
autoRetain: true
recallLimit: 8
compaction:
enabled: true
thresholdPercent: 80
Supported memory backend IDs are mnemopi, hindsight, mnemosyne, mem0, lcm, local, and off. The mnemopi database normally lives below the agent directory, under memories/mnemopi/ or a scoped bank path.
use /settings for interactive settings changes. Use the top-level snsagent config ... command only when working with the legacy .sns-myagent/config.json router. These are separate configuration surfaces, so a change in one does not apply to the other.
Legacy project configuration
The legacy router creates .sns-myagent/config.json in the current directory. Its schema is defined in src/config/schema.ts and includes agentName, model, telegram, and memory fields. The default identity is sns-myagent.
Example:
{
"version": 1,
"agentName": "sns-myagent",
"model": {
"provider": "openai",
"model": "gpt-4o-mini",
"temperature": 0.7,
"maxTokens": 4096
},
"telegram": {
"token": "",
"allowedChatIds": [],
"pollIntervalMs": 1000
},
"memory": {
"path": "memory.jsonl",
"maxEntries": 1000,
"autoSummarize": true,
"backend": "mnemopi"
}
}
The legacy router supports:
snsagent init
snsagent setup
snsagent config show
snsagent config get model.provider
snsagent config set model.model gpt-4o
Environment variables
Provider-specific API key variables are supported by the provider configuration. Common examples are:
export OPENAI_API_KEY="your-key-here"
export ANTHROPIC_API_KEY="your-key-here"
The Telegram adapter uses:
export SNS_TELEGRAM_BOT_TOKEN="your-bot-token-here"
export SNS_TELEGRAM_AUTOSTART=0
Conversational configuration
The agent can help edit provider and feature settings through the interactive setup flow. Verify the resulting provider, model, and API key configuration before sending a request.