arizuko › products › Reality agent — setup
Reality agent — setup
The setup deploys Rhias on Telegram, with WhatsApp as an optional input: the instance, the group from ant/examples/reality/, the first facts/threads/ and the monthly sweep.
Rhias needs KVM, a bot and a model key
- A host with Docker.
- The build part of the install: the binary, the images and the guest kernel, with
DATA_DIRset to the data directory of this instance. A turn is one KVM guest, so the host needs/dev/kvm. - A Telegram bot token from @BotFather. Optionally a WhatsApp account for the asymmetric pattern.
- Anthropic API access. The
oracleskill also needsCODEX_API_KEYorOPENAI_API_KEY, in the host.envor for each user at/dash/me/env. The store refuses model keys at folder scope.
create makes the instance
arizuko create -i demo
$EDITOR /srv/data/arizuko_demo/.env
.env holds the bot token and the observe window
ASSISTANT_NAME=assistant
WEB_HOST=demo.example.com
# Primary channel
TELEGRAM_BOT_TOKEN=REPLACE_ME
# Optional WhatsApp side for asymmetric channels: run `arizuko package add catalog:whapd`
# and pair the account.
# Optional: more observed context in a turn, for a busy WhatsApp group
OBSERVE_WINDOW_MESSAGES=25
OBSERVE_WINDOW_CHARS=8000
arizuko create already wrote AUTH_SECRET and SECRETS_KEY into .env. reference / env lists every variable.
A package selection installs the channel
Select Telegram. Select catalog:whapd too for WhatsApp.
arizuko package add -i demo catalog:teled
Start the instance as a systemd service, as getting started shows. Restart the service to start the adapter.
sudo systemctl restart arizuko_demo
group add makes the assistant group from the template
The template in ant/examples/reality/ holds the persona in group/SOUL.md, group/BRANDING.md, the first facts/ and the tests. At the first turn, runed renames SOUL.md to PERSONA.md. One command makes the group, selects the template and routes your Telegram DM to it. package sync writes the files of the template:
arizuko group -i demo add 'telegram:<bot-id>/user/<your-tg-id>' assistant -p reality
arizuko package sync -i demo
# to change the persona, edit group/SOUL.md in the template source, then sync again
The facts/ files of the template are examples, not package files, so package sync never rewrites them. Copy them once from the repository checkout:
cp -r ant/examples/reality/facts /srv/data/arizuko_demo/groups/assistant/
One file for each situation goes into facts/threads
Threads hold ongoing context across weeks. Make one file for each current situation in groups/assistant/facts/threads/:
facts/threads/q3-architecture.md
facts/threads/launch-prep.md
facts/threads/relationship-alice.md
Each one is a Markdown file: free text at the top and dated entries below. The agent adds entries when the situation changes. Put the context that already exists into each file, so the first conversation has a place to start.
group add already wrote the main route
Check it with arizuko route -i demo list. The row looks like this:
seq match target
0 room=<bot-id>/user/<your-tg-id> assistant
Add routes for other channels on purpose, with arizuko route -i demo add. Add a assistant/content group if you want a separate memory and persona for longer writing. Route it from a separate Telegram chat or a /chat/<token>/ URL.
An observe route reads WhatsApp without replies
To bring WhatsApp messages into the same memory without replies on WhatsApp, add a second route in #observe mode:
arizuko route -i demo add 'platform=whatsapp room=<group-id>@g.us' 'assistant#observe' --seq 20
The table then reads:
seq match target
0 room=<bot-id>/user/<your-tg-id> assistant
20 platform=whatsapp room=<group-id>@g.us assistant#observe
WhatsApp messages go into assistant/ as context and start no turn. When something from WhatsApp matters, the agent replies on Telegram with a source line. Asymmetric channels has the full recipe.
A scheduled task runs the monthly sweep
The compact-memories skill distills the session transcripts into episodes/YYYYMMDD.md and rolls the days into weeks and months on its own schedule. Ask the agent for a monthly sweep that reads them:
@assistant schedule a task: every first of the month at 06:00 local,
read episodes/ for last month and surface what changed,
what was resolved, what's still open.
The agent writes the task with the schedule_task MCP tool, and timed sends the prompt on schedule.
The agent must answer in its persona
arizuko status -i demoshows the stack up.- Send the bot a DM on Telegram. The agent replies in the voice of its persona file.
- Ask "what threads do I have?". The agent lists the files in
facts/threads/. - With the web layer on, open
https://<WEB_HOST>/dash/. Theassistantgroup, its route and its scheduled tasks show there.
PERSONA.md sets the voice
The shipped persona sets the voice. Edit groups/assistant/PERSONA.md to change it, and add rules for this deployment in groups/assistant/SYSTEM.md. The rules add to the persona and do not rewrite it. The next turn uses the change. To edit the files from another machine, use WebDAV.
Four pages give the details
- Reality agent
- What users see.
- asymmetric channels
- The WhatsApp and Telegram split as a general recipe.
- routing modes
- The fragments of a route target.
- env reference
- The
OBSERVE_WINDOW_*variables and the rest.