- Install dependencies:
uv pip install -e . - Run Matrix bot:
uv run --project . yabot-matrix - Run CLI:
uv run --project . yabot-cli - Run daemon:
uv run --project . yabotd - Tool install (refresh tool env):
uv tool install --force --editable .
OPENAI_API_KEY: required.MATRIX_HOMESERVER: defaults tohttps://matrix.org.MATRIX_USER: required for Matrix login.MATRIX_PASSWORD: required on first login and for cross-signing reset UIA.BOT_NAME: defaults toyabot.ALLOWED_USERS: comma-separated allowlist; empty means allow all.CROSS_SIGNING_RESET: set to1/true/yesto force a cross-signing reset.YABOT_DAEMON_URL: when set, the CLI and Matrix bot connect to a running daemon instead of running the agent locally.YABOT_CLI_DAEMON_AUTOSTART: when set to1/true/yes, the CLI will start the daemon if it is not reachable.YABOT_DAEMON_HOST: host interface for the daemon (default127.0.0.1).YABOT_DAEMON_PORT: port for the daemon (default8765).YABOT_TRACE_PATH: optional path for JSONL trace logs; defaults to the per-user log directory.
The agent writes JSONL traces (prompts, tool calls, approvals, responses, metadata) to the per-user log dir.
By default this is under your platform log directory for the app name, with trace.jsonl as the filename.
Each trace line includes schema_version, event, trace_id, room_id, conv_id, and model when available.
Start the daemon once, then point both clients at it:
uv run --project . yabotdYABOT_DAEMON_URL=ws://127.0.0.1:8765 uv run --project . yabot-matrixYABOT_DAEMON_URL=ws://127.0.0.1:8765 uv run --project . yabot-cli
The CLI is text-only (print/input) and supports the same commands as the Matrix bot. Use !help to see them.
Key bindings:
Ctrl+N: new conversationCtrl+R: reset conversationCtrl+L: list conversationsCtrl+M: list modelsCtrl+S: stop current responseCtrl+H: show helpCtrl+Q: quit
If ALLOWED_USERS is set, the bot ignores all senders not in the list. This is enforced in the message handler and is silent aside from logs.
The bot logs to stdout with INFO level by default. Message handling logs include sender, room ID, and decrypted/verified flags.
- The bot auto-joins when invited to a room.
- It auto-trusts devices in its own trust store after each sync.
The bot maintains cross-signing keys in:
~/.local/share/yabot/cross_signing.json~/.local/share/yabot/cross_signing_uia.json(UIA reset session)
On each sync, the bot:
- Ensures cross-signing keys exist locally.
- Uploads cross-signing keys if missing on the server.
- Signs all of the bot's devices with the self-signing key.
This removes "encrypted by a device not verified by its owner" warnings in other clients once they refresh keys.
If server keys are out of sync or need to be replaced:
- Set
CROSS_SIGNING_RESET=1in.env. - Ensure
MATRIX_PASSWORDis set. - Restart the bot once. It will log a reset approval URL.
- Open the URL in a browser logged in as the bot account and approve.
- Restart the bot again. It should log:
Uploaded cross-signing keysSigned N device(s)
- Remove
CROSS_SIGNING_RESETfrom.env.
If the bot keeps logging "Cross-signing reset requires approval", the approval is not tied to the bot account session.
After a successful reset, some clients need a refresh to clear the warning:
- Log out/in, or
- Use a "Refresh keys" option if the client has one.
- Check allowlist:
ALLOWED_USERSmust include the sender. - Check logs for
room_senderrors (E2EE member sync or permissions).
- Ensure the data dir is writable.
- The bot creates
~/.local/share/yabot/nio_storeon startup.
- If you see "Server master key does not match local key file", run the reset flow above.
- If you lost the local key file but server keys exist, do not regenerate without resetting on the server.