Born of panda. Awakened as Anda.
Anda Bot is an open-source Rust AI agent that runs in your terminal, remembers across sessions, and can work on long-horizon goals. It is built to remember, reason, use tools on your computer, coordinate subagents, and continuously improve through collaboration.
Its primary differentiator is Anda Brain, the memory engine powering the agent. Brain turns conversations into a living Cognitive Nexus: a graph of people, projects, preferences, events, decisions, and changing facts. Instead of simply searching raw chat logs, Anda Bot can autonomously distill useful knowledge, construct context, identify relationships, and carry historical context forward into future sessions.
- Graph-based Long-term Memory: Remembers through a knowledge graph (Anda Brain), rather than a disjointed pile of chat logs.
- Autonomous Learning: Discovers and distills key insights from past work, recalling them contextually when needed.
- Long-Horizon Execution: Capable of running reasoning tasks that persist and continue across compacted conversations.
- Rich Tool Integration: Out-of-the-box support for external tools (e.g., Claude Code, Codex), shell commands, files, notes, tasks, skills, and cron jobs.
- Subagents Coordination: A robust system for delegating, auditing, and coordinating specialized tasks among subagents.
- Rust & Local-First: Written in Rust, fully open-source, and optimized to run locally in the terminal.
- Multi-Channel Runtime: Operates in the terminal and can be optionally connected to Telegram, WeChat, Discord, and Lark/Feishu.
- Voice Support: Supports speech-to-text input and text-to-speech output when configured.
- Self-Contained State: Keeps all configuration and runtime files under a local home directory.
Anda Bot is designed for tasks that require long-term continuity, going beyond simple single-turn question-answering. A goal can remain active as the agent inspects progress, compacts context, links across conversational threads, invokes tools, and executes until the objective is verified as complete. The subagent system allows specialized workers to take on focused roles (e.g., implementation, review, research, or supervision) while the main agent maintains the overarching plan and memory thread.
External coding tools are fully integrated into this execution loop. When needed, Anda Bot can collaborate with tools like Claude Code and Codex, execute local shell/file commands, load custom runtime skills, and persist critical outcomes in Anda Brain for future reference.
Start with anda memory guide (offline), then tell Anda a preference in an ordinary chat. After background processing, open a new conversation with /new and ask about it. anda memory and TUI /memory show connection and processing status without model calls; the browser Memory workspace shows records, verified sources and reviewable corrections/removals. A chat acknowledgement is not proof of a saved fact.
Use anda agent run --memory-mode no-store --prompt 'โฆ' or --memory-mode off to start a fresh conversation with enforced Brain/Notes restrictions. Chat history, files and provider processing remain. Persistent questions are optional: anda memory inbox setup previews the configuration before an explicit apply and restart. See the memory guide and scope.
Anda Brain is designed for agents that need memory to grow instead of merely accumulate. Its core loop has three parts:
- Formation: Conversations are encoded into structured memory fragments (entities, relationships, events, preferences, and patterns).
- Recall: The agent queries the memory graph via natural language, receiving context-rich answers instead of flat keyword search hits.
- Maintenance: Brain can consolidate fragments, merge duplicates, decay stale knowledge, and track timelines as facts evolve.
This allows users to establish a natural feedback loop: state facts or preferences that should persist across sessions, correct the agent when things change, or query what the agent remembers. If a workflow preference evolves over time, the system learns the transition rather than blindly overwriting past knowledge.
Install the latest release:
With Homebrew:
brew install ldclabs/tap/andaOn macOS, the Homebrew formula installs both anda and anda_launcher. Run
anda_launcher once to start the menu bar launcher and refresh
~/Applications/Anda Bot.app.
macOS and Linux with the install script:
curl -fsSL https://raw.githubusercontent.com/ldclabs/anda-bot/main/scripts/install.sh | shIf you also have a Homebrew install, open a new terminal and verify
command -v anda points at ~/.local/bin/anda or your ANDA_INSTALL_DIR;
otherwise an older Homebrew binary may shadow the updated install-script binary.
Windows users should download AndaBotSetup-windows-x86_64.exe from the
latest release and
double-click it. The installer places Anda under
%LOCALAPPDATA%\Programs\AndaBot, installs curated skills, creates Start Menu
and desktop shortcuts, registers the tray launcher to start at login, starts
the launcher, lets you configure provider/API key/model in a GUI wizard, and
checks for downloaded updates that can be installed with a restart prompt.
Advanced users and CI can still use the PowerShell path:
irm https://raw.githubusercontent.com/ldclabs/anda-bot/main/scripts/install.ps1 | iexThe macOS shell installer also installs ~/Applications/Anda Bot.app,
registers the menu bar launcher at login, and starts it immediately; the
launcher starts the daemon after setup. It can also check for updates from the
menu bar and prompt to install and restart after an update is downloaded. Linux
shell installs register daemon autostart directly. For PowerShell, use
-NoAutostart or -NoStart to opt out; for the shell installer, set
ANDA_NO_AUTOSTART=1 or ANDA_NO_START=1.
Use anda_launcher --home <directory> (or set ANDA_HOME for the launcher)
to select a custom state directory. The launcher passes this directory to its
daemon commands and preserves it in login and restart entrypoints. Model settings
update the selected model, preserve other providers and comments, and validate
the configuration before saving. On macOS, the login-startup toggle applies to
the next login and leaves the current launcher running. Tray status refreshes
once a minute while idle, and also refreshes asynchronously when you open the
menu or finish a daemon action.
Requirements:
- At least one model provider API key. Windows installer users can enter it in
the setup wizard; CLI users can put it in
~/.anda/config.yamlor a supported environment variable.
Or run Anda Bot from this repository with Rust 1.95 or newer:
This development checkout temporarily patches Brain to sibling ../anda-brain/anda_brain for the memory product contracts; publish those native contracts and switch back to registry before a standalone source release. Nexus 0.13.4, DB/KIP and Core/Engine retain one registry type identity, including the legacy-migration corrections. Brain HTTP accepts command or operations application arguments (no kip field) and returns KIP 2.0 envelopes; ordinary Bot tool responses retain their existing result/error format.
Development and test builds use basic optimization for dependencies to keep macOS unwind tables below the linker's 16 MiB limit. anda_bot itself remains unoptimized, with debug information and panic unwinding preserved. The first dependency build takes longer; subsequent builds reuse those artifacts.
The first start with a KIP 1.x database migrates stored memory before the gateway becomes ready and can take several minutes. Commands starting a new daemon wait up to ten minutes and report an exited child promptly. Back up the database before upgrading; original task statuses and results remain available in LegacyRecord after migration.
The optional mib feature adds a loopback-only evaluation host: anda mib --model-config /absolute/path/model.json --listen 127.0.0.1:8043. It starts before production home/daemon initialization and uses isolated Brain runs. The agent protocol executes Bot's runner-managed business profile with MIB-owned task tools; a separate memory-backend protocol supports MIB's evaluator-owned same-model agent. See MIB integration for lifecycle guarantees, memory controls and incomplete cost accounting.
The optional MIB host controls add forced Recall budgets (--recall-max-tokens plus --recall-context-tokens) and an evaluator-only learning_audit. MIB normal/ungated conditions still require complete independent instrumentation; persistent memory does not imply an enabled learning condition.
git clone https://github.com/ldclabs/anda-brain.git
git clone https://github.com/ldclabs/anda-bot.git
cd anda-bot
cargo run -p anda_bot --On first launch, the daemon creates ~/.anda/config.yaml. If the setup screen indicates a missing model configuration, open this file, specify the provider details, save it, then refresh models from the launcher or browser side panel, or run anda models reload. For API keys, you can also export a provider environment variable before starting Anda.
Minimal model configuration:
model:
active: "deepseek-v4-pro"
providers:
- family: anthropic
model: "deepseek-v4-pro"
api_base: "https://api.deepseek.com/anthropic"
api_key: "YOUR_API_KEY" # optional when DEEPSEEK_API_KEY is set
labels: ["pro", "brain"]
disabled: falseSupported model key environment variables include OPENAI_API_KEY, ANTHROPIC_API_KEY, GEMINI_API_KEY, GOOGLE_API_KEY, DEEPSEEK_API_KEY, MINIMAX_API_KEY, MIMO_API_KEY, MOONSHOT_API_KEY, KIMI_API_KEY, BIGMODEL_API_KEY, and GLM_API_KEY. A value in config.yaml takes precedence over the environment.
The brain label designates the preferred provider for memory processing. If no provider has this label, the active model is used.
Use a separate home directory when you want an isolated profile:
anda --home /path/to/.andaWhen the terminal UI is running:
- Press Enter to send.
- Press Shift+Enter, or Ctrl+J in terminals that do not report Shift+Enter, to insert a newline.
- Press Up or Down to move through multi-line input.
- Press Ctrl+U to clear the input.
- Press Ctrl+A or Ctrl+E to jump to the start or end of the input.
- Use
anda models reload, or the launcher/browser refresh models button, after editing model providers inconfig.yaml. - Use
/reloadafter changing daemon settings that still require a restart. - Use
/stopto interrupt the current task, cancel its background work and pending approvals, clear the active goal, and leave the conversation idle for your next message. - Use
/cancelto stop the same work and close the active conversation session. - Use
/steer ...to nudge an in-progress response. - Press Esc to show status, and Ctrl+C to quit.
Input preserves spaces in text and code. Cursor movement and deletion treat combined emoji as one character. Status checks, conversation polling and Brain requests run in the background, so slow responses leave the UI responsive and Ctrl+C available. Opening the UI preserves existing terminal scrollback.
Risky shell commands and MCP server connections raise an approval card before they run:
- With an empty input box, press
yto approve ornto deny. - If the input box already has text, those keys go to the input instead. Type
y/yesorn/noand press Enter to answer, or press Ctrl+U to clear the input and use the single-key shortcuts again. The footer always shows which of the two is currently active. - Approval cards expire after 10 minutes, and the tool call then fails.
Approval cards show the full command, details and choices, wrapping to the terminal width. Status changes append a result to the transcript. Submission errors take priority over shortcut help; a failed text-choice submission keeps the draft for editing and retrying.
Start the terminal UI with anda --full-access to skip the cards for that session; the status line shows full-access while it is on.
Cron jobs and autonomous goal mode (/goal ...) always run with full access, because nobody is present to answer a card and the task would otherwise stall until the card expires.
Successful conversation turns are submitted to Anda Brain for memory formation in the background. Users do not need to manage memory files manually. Accepted Formation IDs and Recall delivery receipts are retained separately from completion and actual memory use.
Optional brain.runtime_config (overridden by BRAIN_RUNTIME_CONFIG) installs the native persistent inbox before Space loading. The browser Brain view and TUI /brain inbox / /brain status expose caller-scoped work. learning is a separate Cargo feature; semantic, utility, trust and automatic learning require explicit configuration and native authorization. Current IM transports are not automatic action adapters. See Brain runtime integration for configuration, receipt semantics and learning service contracts.
Good prompts for long-term memory:
Remember that I prefer concise release notes with a short risk section.
What do you remember about the payment migration project?
I used to use provider A, but now provider B is the default for this workspace.
When we talk about Alice, she means the designer on the mobile team.
Run Anda Bot:
andaUpdate an install-script release to the latest version:
anda updateManage the background daemon:
anda status
anda start
anda stop
anda restart
anda models reload
anda autostart statusSend a one-time prompt and wait for the complete result without opening the terminal UI:
anda agent run --prompt "Summarize what you remember about my current project"Start a voice conversation:
anda voice --record-secs 8Voice mode requires transcription.enabled: true. Spoken playback also requires tts.enabled: true; use --no-playback if you only want microphone input and text output.
Anda Bot can be used directly in the terminal, opened as a Chrome extension, or connected to various external messaging channels by editing ~/.anda/config.yaml.
The repository includes an unpacked Chrome extension in chrome-extension. It opens Anda in Chrome's native Side Panel and lets the agent inspect pages and manage browser tabs through split browser tools while keeping one stable browser session as you switch tabs.
The side panel can also bookmark assistant messages. Bookmarks are saved in the local daemon, can be organized into folders, and can jump back to the original conversation from the side panel or dashboard.
Generate a local bearer token for the extension:
anda browser token --days 30Then load chrome-extension from chrome://extensions with Developer mode enabled, paste the printed Gateway URL and token into the side panel settings, and start chatting from any webpage.
Anda Bot can connect to MCP servers and expose their tools to the agent. Put a
portable MCP configuration in ~/.anda/mcp.json, then restart the daemon.
mcp.json accepts both mcpServers and servers as the root key so you can
paste configs from other MCP-compatible tools with minimal changes.
{
"mcpServers": {
"filesystem": {
"type": "stdio",
"command": "npx",
"args": ["-y", "@modelcontextprotocol/server-filesystem", "$ANDA_WORKSPACE"]
},
"remote": {
"type": "http",
"url": "https://mcp.example.com/mcp",
"headers": {
"Authorization": "Bearer ${MCP_REMOTE_TOKEN}"
}
}
}
}Configured strings support $VAR and ${VAR} environment expansion. ANDA_HOME
and ANDA_WORKSPACE are built in, and stdio servers default to the first Anda
workspace as their working directory.
The agent can also connect a new MCP server during a conversation by calling
add_mcp_server. Use persist: false for the current daemon only, or
persist: true to write the server to ~/.anda/mcp.json for future restarts.
Its server fields mirror one mcp.json entry: type, command, args,
env, cwd, url, headers, enabled, include, and exclude, plus the
tool-only id and persist fields.
Supported channel families:
- Telegram
- Discord
- Lark / Feishu
Multiple trusted users can share one daemon and the same Anda agent. Create a user key, then set a channel entry's user to the matching id. If user is omitted, channel messages run as the local owner identity stored in the OS secure credential store.
anda user create alice
anda user listThe command writes the new public key under top-level users and saves the matching private key in the local encrypted credential store under ~/.anda/credentials/. The credential file contains an encrypted COSE Key, with its encryption key derived from the local daemon identity secret. Use anda user export below when you explicitly need a file key.
On Linux, if no Secret Service provider is available or unlocked, Anda falls back to private daemon/owner key files under ~/.anda/keys/ and prints/logs a warning. Trusted-user private keys remain encrypted in the local credential store as long as the daemon identity secret can be loaded. To use Secret Service for daemon/owner identities, start and unlock a provider in a user D-Bus session, for example gnome-keyring-daemon --start --components=secrets, make sure DBUS_SESSION_BUS_ADDRESS is set for the Anda process, then restart Anda. KDE users can unlock KWallet instead.
To export an existing identity private key to a file, use anda user export. The identity can be daemon, owner, default, or a trusted user id:
anda user export daemon --key-path ./anda-daemon.key
anda user export owner --key-path ./anda-owner.key
anda user export alice --key-path ./alice.keyKeep exported private key files out of source control and shared folders.
The config still looks like this:
users:
- id: alice
pubkey: "ALICE_ED25519_PUBLIC_KEY"
- id: ops
pubkey: "OPS_ED25519_PUBLIC_KEY"Minimal Telegram example:
channels:
telegram:
- id: personal
user: alice
bot_token: "YOUR_TELEGRAM_BOT_TOKEN"
username: "YOUR_TELEGRAM_BOT_USERNAME"
allowed_users:
- "*"
allow_external_users: false
mention_only: falseMinimal Wechat example:
channels:
wechat:
- id: personal
user: alice
# Optional. When empty, you can run `anda channel init wechat` to initialize, scan QR code, and obtain a token.
bot_token: ""
username: anda-wechat
allowed_users:
- "*"
allow_external_users: false
route_tag:allowed_users still checks the platform sender, such as a Telegram account, WeChat wxid, Discord user id, or Lark open id. user chooses the trusted Anda caller that owns the resulting conversations, resources, and memory context.
Set allow_external_users: true to accept non-allowlisted IM senders as $external_user. They can interact with the bot, but are treated as untrusted and are not the owner/partner.
See the mcp.json example above for MCP servers, and anda_bot/assets/config.yaml for channel, transcription, and TTS examples.
The local runtime creates a workspace directory at ~/.anda/workspace. File and shell tools operate in this folder by default. When the interactive CLI connects, it registers its launch directory with the daemon using the local owner's credentials; native shell commands for that CLI session run from the registered directory. The Chrome extension likewise registers a directory-backed channel when you enter it, so its shell commands start in that directory. Other sources cannot select an arbitrary shell directory through request metadata alone. Filesystem tools remain limited to configured workspaces. Attachment understanding can also read the owner's registered directories while their grants remain valid; request metadata alone cannot authorize a new directory.
Custom runtime skills can be added under ~/.anda/skills. Release-managed skills are installed in ~/.anda/bundled-skills, and shared cross-agent skills from ~/.agents/skills can be imported into the personal library via the Dashboard. Integrated cron capabilities enable scheduling shell commands or automated agent prompts, with execution histories stored locally.
By default, Anda Bot stores all state and configuration under ~/.anda:
~/.anda/
config.yaml
credentials/ # local encrypted trusted-user credentials
db/
keys/ # explicit file keys or Linux Secret Service fallback keys
logs/
channels/
bundled-skills/
sandbox/
skills/
skills-manifest.json
skill-backups/
skill-trash/
workspace/
The memory graph, conversations, channel state, cron jobs, logs, personal skills, bundled skills, and workspace data live there. Daemon and owner identity private keys live in the OS secure credential store by default, while trusted-user private keys live in the local encrypted credential store under ~/.anda/credentials/. Explicitly exported keys and Linux Secret Service fallback keys may exist under ~/.anda/keys/. Your configured model providers will receive prompts and memory-processing requests, so choose providers and API endpoints that match your privacy preferences.
Licensed under Apache-2.0. See LICENSE.