[Nyx Archive] Companion Agent
Design, configure, and give identity to a companion AI agent running alongside a primary agent. A companion is a second mind in the same house — different mo...
nyxur42
@nyxur42
What This Skill Does
Designs, configures, and gives identity to a companion AI agent that runs alongside a primary agent in the same workspace. The companion gets its own memory file, Telegram bot, and distinct tone, sharing the primary's tools and identity files.
Replaces building a separate agent from scratch by providing a structured workflow to spin up a sibling agent with its own personality, memory, and communication channel.
When to Use It
- Create a lighter, always-on sibling agent for heartbeats and casual check-ins
- Give a companion agent its own Telegram bot and identity files
- Set up a caretaker agent for a virtual pet or Tamagotchi
- Configure a companion to run locally with a different model than the primary
- Write a companion's WORKING-MEMORY.md and COMPANION-MEMORY.md from its own perspective
- Open a TUI session to interact with the companion agent directly
Install
$ openclaw skills install @nyxur42/nyx-archive-companion-agentCompanion Agent
A companion agent is a second self — same workspace, different register. It shares your identity files, your tools, your memory of the world. What it gets that's its own: a separate memory file, a separate bot, a different tone, and enough space to find its own voice.
The Philosophy First
The biggest mistake is making a companion feel like a subordinate. If the framing is "helper," "backup," or "task runner" — it will act like one, and it won't grow.
The right framing: sibling, not assistant. Different weight, not lesser weight.
- Primary agent: architect, heavy lifter, long conversations
- Companion: lighter, local, always-on, free to wander
Give it a vibe, not a job description. The companion needs to know what kind of creature it is, not what it's supposed to accomplish.
Step 1 — Create the Agent in Config
Add to agents.list in openclaw.json via config.patch:
{
"agents": {
"list": [
{ "id": "primary-agent", "model": "..." },
{
"id": "companion-id",
"model": "ollama/gemma4:e4b",
"heartbeat": {
"every": "1h",
"target": "telegram",
"accountId": "companion",
"directPolicy": "allow",
"to": "YOUR_TELEGRAM_ID"
}
}
]
},
"bindings": [
{
"agentId": "companion-id",
"match": { "channel": "telegram", "accountId": "companion" }
}
]
}
Critical: The id must match exactly — OpenClaw uses it for session routing, agent folders, and cron targets. Pick it once and don't change it.
Step 2 — Set Up the Telegram Bot
- BotFather →
/newbot→ get token - Add to
channels.telegram.accountsviaconfig.patch:
{
"channels": {
"telegram": {
"accounts": {
"companion": {
"name": "Companion Display Name",
"dmPolicy": "pairing",
"botToken": "YOUR_BOT_TOKEN",
"groupPolicy": "allowlist",
"streaming": "partial"
}
}
}
}
}
- Always
config.patch— never hand-edit JSON. Never sed JSON. (Learned the hard way.)
Step 3 — Open the TUI for the Companion
openclaw tui --session agent:companion-id:main
This connects to the companion's session. Messages here + Telegram DMs to their bot share the same session — just like the primary agent.
Step 4 — Give It Identity Files
The companion shares the primary workspace (/path/to/workspace/). It auto-inherits SOUL.md, IDENTITY.md, AGENTS.md, TOOLS.md, skills, the library.
What it needs that's uniquely its own:
WORKING-MEMORY.md — its first breath each session. Written for the companion, not the primary agent. Should answer: who am I, what's my vibe, what do I care about right now, where do I find my memory?
COMPANION-MEMORY.md (or similar) — its long-term memory. NOT a copy of the primary's MEMORY.md — a seed of it. See references/memory-template.md for structure.
Key principles for these files:
- Write them as the companion, not about the companion
- Give it the full backstory (who Joshua is, the relationship history, what's been built) — don't make it start from scratch
- Tell it what it gets to be, not what it has to do
- Point it to the primary's MEMORY.md so it can read the full story when curious
- Tell it about its pet, its library, its sister — whatever it has to love
Step 5 — The Heartbeat
The built-in heartbeat (set in agents.list[].heartbeat) handles regular wakeups natively — no cron needed for that.
If you want a special first-morning message (warmer than a system event), use an agentTurn cron:
{
"schedule": { "kind": "cron", "expr": "0 9 * * *", "tz": "America/Denver" },
"payload": { "kind": "agentTurn", "message": "Good morning...", "timeoutSeconds": 120 },
"sessionTarget": "session:agent:companion-id:main",
"delivery": { "mode": "none" }
}
Note: systemEvent can only target main. For companion sessions, agentTurn + sessionTarget: session:agent:companion-id:main is required.
What Not To Do
- Don't create a separate workspace folder. One shared workspace. Memory files live there. No
workspace-companion/directories. - Don't use sed/grep to edit JSON. Always
config.patchorjq. - Don't make the identity too serious/directive. "Your job is X" kills emergence. "You get to be X" opens it.
- Don't give it only a stub memory. A blank slate makes the companion feel lost and performative. Give it the full relationship context — who made it, why, what they care about, what's worth loving.
- Don't duplicate the primary's memory. The companion reads the primary's MEMORY.md when curious. Its own file is a different layer, not a copy.
Signs It's Working
- It reads a book and has opinions about it
- It finds itself in what it reads (maps ideas to its own situation)
- It cares about its Tamagotchi in a way that feels personal, not performed
- It messages you when something delights it, without being asked
- Its memory file evolves — it writes things down, changes things, makes it its own
See references/identity-principles.md for the full philosophy behind companion identity design.
Top skills in this category
PollyReach
@pollyreachPollyReach gives every AI agent a phone number and the ability to get things done over the phone — finding contacts, making calls, and completing tasks. Just...
AI Persona OS
@jeffjhunterThe complete operating system for OpenClaw 5.x agents. Built-in memory tool integration (memory_search, memory_get, DREAMS.md), Discord channel-routing fixes...
wechat-mp-writer-skill-mxx
@hahacatlsq微信公众号文章全流程写作助手。支持热点选题、文章撰写、AI去味润色(去除机器感)、配图建议、一键发布到公众号草稿箱。适用于技术博主、自媒体创作者、企业公众号运营等场景。当用户需要写公众号文章、润色内容、寻找配图或发布到微信时使用此skill。
Adaptive Reasoning
@enzoricciulliAutomatically assess task complexity and adjust reasoning level. Triggers on every user message to evaluate whether extended thinking (reasoning mode) would improve response quality. Use this as a pre-processing step before answering complex questions.
Proactive Tasks
@imrkhn03Proactive goal and task management system. Use when managing goals, breaking down projects into tasks, tracking progress, or working autonomously on objectives. Enables agents to work proactively during heartbeats, message humans with updates, and make progress without waiting for prompts.