tomo

module
v0.2.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jul 7, 2026 License: MIT

README

tomo (友)

ci Release Go Reference Go Report Card License

Your personal AI agent, one Go binary.

tomo (友, "companion") sits between your chat apps and a language model. You text it on Telegram, Discord, Slack, or iMessage, or open the local web chat, and it remembers you across conversations and acts with real tools: run commands, read and write files, fetch pages, save memories, schedule work. Every action passes a fail-closed policy gate first, and content pulled in from the outside taints the session so injected instructions cannot quietly reach your shell.

It runs as one static binary on your own hardware. Your provider key, your history, and your memory stay on your machine, and the only thing that leaves is the model call you would have made anyway.

InstallQuick startModelsDocsSafety

tomo showing its command surface, then writing a starter config with onboard and starting the daemon with the local web chat

Install

go install github.com/tamnd/tomo/cmd/tomo@latest

Release archives, Linux packages (deb, rpm, apk), and a container image at ghcr.io/tamnd/tomo ship with each tag.

Quick start

tomo onboard   # writes ~/.tomo/config.yaml and walks you through a provider
tomo chat      # talk from the terminal
tomo serve     # web chat on localhost plus every configured channel

Models

tomo is model-agnostic. The Anthropic API is native, and anything speaking the OpenAI chat completions dialect works through base_url: a local llama.cpp or ollama, a LAN inference box, or any hosted gateway.

default_model: anthropic/claude-fable-5
providers:
  anthropic:
    type: anthropic
    api_key: ${ANTHROPIC_API_KEY}
  local:
    type: openai
    base_url: http://gamingpc:8000/v1
    api_key: ${LOCAL_API_KEY}

A model is named provider/model, so the local provider above serves models like local/qwen2.5-coder. Set default_model to any of them, or override it per worker.

What it does

  • Speaks through the chat apps you already use. The local web chat is always on; Telegram, Discord, Slack, and iMessage start when you configure them, each with an allow-list.
  • Acts with real tools, behind a gate. Reads and network run, writes and code execution ask, and anything you have not allowed is declined. The moment a turn pulls in untrusted content, the session is tainted and writes and execution escalate to ask.
  • Remembers you across conversations. A markdown memory tomo reads and writes itself, with a curator that reflects after substantial turns and stamps each note with where it came from.
  • Gets better at your workflows. It follows skills you write and drafts new ones from workflows it sees you repeat. Installing a skill is always your call.
  • Works on its own when you want. Scheduled prompts and a heartbeat pick up standing work on a cadence and report back only when there is something worth saying.
  • Runs many agents when one is not enough. Named workers with their own persona, model, policy, and memory, routed by @name or channel, and one can hand a task to another.
  • Speaks and listens. Optional local voice: whisper transcribes voice notes in, piper speaks replies back, all on your machine.
  • Talks to other tools over MCP. Attach MCP servers to extend the toolset, or serve tomo's own tools to Claude Code and other clients.

Design in one breath

A gateway daemon owns sessions and a sqlite ledger. Channel adapters are thin: they turn platform messages into events and render replies, nothing else. Tools are typed and classified (read, net, write, exec), and a policy engine decides allow, ask, or deny per call, with approvals answered right in the channel you are talking on. Memory is plain markdown you can read and edit yourself.

Full documentation lives at tomo.tamnd.com, including the policy and safety model in full.

License

MIT

Directories

Path Synopsis
Package cli wires tomo's command surface: the cobra tree, the global flags, and the fang-rendered help and errors.
Package cli wires tomo's command surface: the cobra tree, the global flags, and the fang-rendered help and errors.
cmd
tomo command
Command tomo is a personal AI agent in one binary: chat channels in front, any model behind, and a policy gate on every action it takes.
Command tomo is a personal AI agent in one binary: chat channels in front, any model behind, and a policy gate on every action it takes.
pkg
agent
Package agent runs the conversation loop: send the history, stream the reply, execute whatever tools the model called, feed the results back, and repeat until the model ends its turn.
Package agent runs the conversation loop: send the history, stream the reply, execute whatever tools the model called, feed the results back, and repeat until the model ends its turn.
anttool
Package anttool exposes ant's URI front door as tomo tools.
Package anttool exposes ant's URI front door as tomo tools.
builtin
Package builtin holds the tools tomo ships with: run a command, read and write files, fetch a URL as Markdown, tell the time.
Package builtin holds the tools tomo ships with: run a command, read and write files, fetch a URL as Markdown, tell the time.
channel
Package channel is the front-door abstraction: every place a user can talk to tomo (the web UI, Telegram, and later Discord, Slack, iMessage) is a Channel.
Package channel is the front-door abstraction: every place a user can talk to tomo (the web UI, Telegram, and later Discord, Slack, iMessage) is a Channel.
channel/discord
Package discord is tomo's Discord channel.
Package discord is tomo's Discord channel.
channel/imessage
Package imessage is a no-op everywhere but macOS.
Package imessage is a no-op everywhere but macOS.
channel/slack
Package slack is tomo's Slack channel.
Package slack is tomo's Slack channel.
channel/telegram
Package telegram is tomo's Telegram channel.
Package telegram is tomo's Telegram channel.
channel/webchat
Package webchat is tomo's built-in channel: a small single-page UI served on localhost and a streaming endpoint behind it.
Package webchat is tomo's built-in channel: a small single-page UI served on localhost and a streaming endpoint behind it.
config
Package config loads ~/.tomo/config.yaml: providers, the default model, and agent knobs.
Package config loads ~/.tomo/config.yaml: providers, the default model, and agent knobs.
curator
Package curator runs a reflection pass after a substantial exchange.
Package curator runs a reflection pass after a substantial exchange.
kitbridge
Package kitbridge turns a tamnd/*-cli built on the kit framework into tomo tools.
Package kitbridge turns a tamnd/*-cli built on the kit framework into tomo tools.
mcp
Package mcp is a small Model Context Protocol client.
Package mcp is a small Model Context Protocol client.
memory
Package memory is tomo's long-term store: MEMORY.md is a one-line-per-fact index that rides in the system prompt, and each fact's detail lives in its own markdown topic file.
Package memory is tomo's long-term store: MEMORY.md is a one-line-per-fact index that rides in the system prompt, and each fact's detail lives in its own markdown topic file.
policy
Package policy is the fail-closed gate every tool call passes through.
Package policy is the fail-closed gate every tool call passes through.
provider
Package provider defines the model-neutral message types and the streaming interface every model backend implements.
Package provider defines the model-neutral message types and the streaming interface every model backend implements.
readable
Package readable turns an HTML page into clean Markdown.
Package readable turns an HTML page into clean Markdown.
schedule
Package schedule parses cron expressions and runs the ledger's jobs when they come due.
Package schedule parses cron expressions and runs the ledger's jobs when they come due.
skill
Package skill loads markdown skills that teach tomo a workflow.
Package skill loads markdown skills that teach tomo a workflow.
store
Package store persists sessions and their messages in one sqlite file, the ledger everything else replays from.
Package store persists sessions and their messages in one sqlite file, the ledger everything else replays from.
tool
Package tool holds the registry of actions the agent may take.
Package tool holds the registry of actions the agent may take.
voice
Package voice carries speech both ways.
Package voice carries speech both ways.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL