Skip to content
LadbabyPublic

About

🌐Personal & multi-agent harness connecting all existing LLM apps together

Topics

Resources

Stars

0 stars

Watchers

0 watching

Forks

Latest commit

Ā 

History

21 Commits

Folders and files

Repository files navigation

TresorBot

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.

Start

You need a running Tresor, and Node.js + Pi Agent on each Earth machine.

Install prebuilt binaries

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 -- both

Windows 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.0

The 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.

Build from source

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-earth

Commands below use Linux/macOS syntax. On Windows, add .exe to binary names and use .\ instead of ./ in PowerShell.

Configure and start

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:

  1. Copy sun.example.yaml to sun.yaml and choose a password and two different tokens.
  2. Start Sun: ./tresorbot-sun --config sun.yaml.
  3. Open http://127.0.0.1:11520. In Earths, create an Earth entry and issue its credential.
  4. Copy earth.example.yaml to earth.yaml. Fill in the Earth ID/token.
  5. Start Earth: ./tresorbot-earth --config earth.yaml.
  6. Earth automatically creates and uses ~/.tresorbot/workspace on its machine. To change it, open Earth's local dashboard at http://127.0.0.1:11521. In Sun's Bots tab, create bot/personal and select the Earth.

Run as user-space systemd services (Linux)

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.service

To start at boot and keep running after logout, enable lingering once: sudo loginctl enable-linger "$USER".

Run as global-space systemd services (Linux)

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.service

If Node is installed through nvm, add the directory containing node to the unit's PATH, or set node_path in earth.yaml.

Connect Tresor

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.yaml

Add 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-token

Restart 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.

Use your bots

  • Contacts: add permitted recipients in a bot's Contacts section. Permission is one-way; a reply does not require the reverse contact.
  • Messages: TresorBotContactsList discovers recipients; TresorBotSendMessage sends 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.

If work is interrupted

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.

About

🌐Personal & multi-agent harness connecting all existing LLM apps together

Topics

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages