Project status: Not ready for everyday usage yet.
Open source Grok Bot/OpenAI dots/Meta Muse alternative. Connect all your existing agents running on any machine together, instead of inventing yet another agent. Define fleet of bots each with dedicated memory, that mimic you to implement the task for you.
- Sun keeps your bots, tasks and Markdown memory, and provides the web dashboard.
- Earth runs bots on a machine with Pi installed. Run Earth on each machine you want to use.
You need a running Tresor, and Node.js + Pi Agent on each Earth machine.
Choose sun, earth, or both. Install Sun on your main machine and Earth wherever bots will run.
Linux/macOS:
curl -fsSL https://raw.githubusercontent.com/Ladbaby/TresorBot/main/setup.sh | bash -s -- sun
# Or include pre-releases:
curl -fsSL https://raw.githubusercontent.com/Ladbaby/TresorBot/main/setup.sh | bash -s -- earth --prerelease
# Or pin a version instead:
curl -fsSL https://raw.githubusercontent.com/Ladbaby/TresorBot/main/setup.sh | TRESORBOT_VERSION=v0.1.0 bash -s -- bothWindows PowerShell:
Invoke-WebRequest https://raw.githubusercontent.com/Ladbaby/TresorBot/main/setup.ps1 -OutFile setup.ps1
.\setup.ps1 -Role Sun
# Or: .\setup.ps1 -Role Earth -Prerelease
# Or: .\setup.ps1 -Role Both -Version v0.1.0The installers verify downloads, back up replaced binaries, and preserve existing configs. Binaries go in ~/.local/bin; configs go in ~/.config/tresorbot. Follow the printed commands to edit the config and start your selected component. Installation does not install Pi, start services, or connect Tresor automatically.
Alternatively, you can build the binaries yourself. With Go installed, build from this folder:
go build -o tresorbot-sun ./cmd/tresorbot-sun
go build -o tresorbot-earth ./cmd/tresorbot-earthCommands below use Linux/macOS syntax. On Windows, add .exe to binary names and use .\ instead of ./ in PowerShell.
If you used an installer, edit its configs under ~/.config/tresorbot and use the full startup commands it prints.
Else, for a source build, follow these steps:
- Copy
sun.example.yamltosun.yamland choose a password and two different tokens. - Start Sun:
./tresorbot-sun --config sun.yaml. - Open http://127.0.0.1:11520. In Earths, create an Earth entry and issue its credential.
- Copy
earth.example.yamltoearth.yaml. Fill in the Earth ID/token. - Start Earth:
./tresorbot-earth --config earth.yaml. - Earth automatically creates and uses
~/.tresorbot/workspaceon its machine. To change it, open Earth's local dashboard at http://127.0.0.1:11521. In Sun's Bots tab, createbot/personaland select the Earth.
You can run TresorBot as user servicesāno sudo needed, and they start on login.
Finish configuring each component first and stop any copy running in your terminal.
role=sun # Change to earth on a runner machine.
mkdir -p ~/.config/systemd/user
cat > ~/.config/systemd/user/tresorbot-$role.service <<EOF # also include the node path in Environment below
[Unit]
Description=TresorBot $role
[Service]
Type=simple
ExecStart="%h/.local/bin/tresorbot-$role" --config "%h/.config/tresorbot/$role.yaml"
WorkingDirectory=%h/.config/tresorbot
Environment="PATH=%h/.local/bin:/usr/local/bin:/usr/bin:/bin"
Restart=on-failure
RestartSec=5
[Install]
WantedBy=default.target
EOF
systemctl --user daemon-reload
systemctl --user enable --now tresorbot-$role.service
systemctl --user status tresorbot-$role.service
# Follow logs, restart after config changes, or stop:
journalctl --user -u tresorbot-$role.service -f
# systemctl --user restart tresorbot-$role.service
# systemctl --user stop tresorbot-$role.serviceTo start at boot and keep running after logout, enable lingering once: sudo loginctl enable-linger "$USER".
Alternatively, install units under /etc/systemd/system.
Run these commands as the account that owns the installed binaries and configs.
role=earth # Change to sun for Sun; repeat for both if needed.
service_user=$(id -un)
service_home=$HOME
sudo tee /etc/systemd/system/tresorbot-$role.service >/dev/null <<EOF
[Unit]
Description=TresorBot $role
Wants=network-online.target
After=network-online.target
[Service]
Type=simple
User=$service_user
Environment="HOME=$service_home"
Environment="PATH=$service_home/.local/bin:$service_home/.pi/agent/bin:/usr/local/bin:/usr/bin:/bin"
ExecStart="$service_home/.local/bin/tresorbot-$role" --config "$service_home/.config/tresorbot/$role.yaml"
WorkingDirectory=$service_home/.config/tresorbot
Restart=on-failure
RestartSec=5
[Install]
WantedBy=multi-user.target
EOF
sudo systemctl daemon-reload
sudo systemctl enable --now tresorbot-$role.service
sudo systemctl status tresorbot-$role.service --no-pager
# Follow logs, restart after config changes, or stop:
sudo journalctl -u tresorbot-$role.service -f
# sudo systemctl restart tresorbot-$role.service
# sudo systemctl stop tresorbot-$role.serviceIf Node is installed through nvm, add the directory containing node to the unit's PATH, or set node_path in earth.yaml.
Create a Tresor alias named bot/personal pointing to the provider/model you want that bot to use. Other bots need their own aliases too.
With Tresor running, install the bridge from the sibling plugin repository:
tresor plugin install ../Tresor-plugins/tresorbot-bridge --config config.yamlAdd a rule to Tresor's rules list. Replace both token placeholders with the values in sun.yaml.
- id: bot-chat
name: Bot chat
pattern_path: /v1/chat/completions
match_format: [openai]
is_enabled: true
pipeline_config:
- id: bot-bridge
plugin_id: tresorbot/bridge
config:
sun_url: http://127.0.0.1:11520
service_token: replace-with-service-token
control_token: replace-with-control-tokenRestart Tresor after editing its YAML.
In your chat client, select bot/personal through Tresor. Text messages and supplied chat history are supported; client-provided tools, images and extra request options are not currently supported. Replies arrive when the bot finishes, rather than token by token.
- Contacts: add permitted recipients in a bot's Contacts section. Permission is one-way; a reply does not require the reverse contact.
- Messages:
TresorBotContactsListdiscovers recipients;TresorBotSendMessagesends to a bot and waits for its reply. Each message starts fresh work for the recipient. Ongoing chats, group channels and external app forwarding are not available yet. - Memory: bots can list, read and save their private Markdown. Shared memory is readable by bots; shared writes require the bot's permission checkbox. In the dashboard, choose a scope and save explicitly. A conflicting edit keeps your draft instead of overwriting it.
- Tasks: queue work, view results or cancel from the Tasks tab. Closing a chat does not cancel its work. Cancelling a sender also cancels work it started in other bots; completed file changes are not undone.
Reconnect Earth and inspect the task in Sun. Disconnection does not mean work stopped. A task needing attention keeps its place until you resolve it.
Before choosing Abandon, confirm the old work and any programs it started have stopped. Retry starts new work and may repeat earlier actions. Never retry uncertain work blindly. Revoking a runner blocks its connection but does not prove its programs stopped.
Back up Sun's database and memory folder together. Keep Earth's database and state folder when restarting it.