Skip to main content

Shared memory for AI development agents - remember, recall, and share knowledge across projects and teams

Project description

TribalMind

TribalMind

Shared memory for AI development agents — remember, recall, and share knowledge across projects and teams.

CI Release PyPI Python License


TribalMind is a CLI knowledge base that any AI agent (or human) can use to persist and retrieve knowledge. Store what you learn, recall it later, share it across your team — all through simple shell commands powered by Backboard.

Any agent that can run shell commands can use TribalMind. Pipe in via stdin, get structured JSON back, and build on top of shared team knowledge.

How It Works

  tribal remember "pytest needs -p no:cacheprovider on CI"
        │
        ▼
  LLM parses → structured memory → stored in Backboard
        │
        ▼
  tribal recall "pytest CI issues"
        │
        ▼
  Semantic search → ranked results with relevance scores
  1. tribal remember — store knowledge in natural language; an LLM parses it into structured fields (category, package, error, fix, confidence)
  2. tribal recall — semantic search across your project's memory, ranked by relevance
  3. tribal forget — remove outdated or incorrect knowledge
  4. Every command supports --json for machine consumption and stdin piping for agent workflows

Setup

Individual Developer

One-time setup — works across all your repos:

pip install tribalmind

# 1. Store your API key and create a global config
tribal init --global

# 2. In any repo, set up agent integration files
cd your-project
tribal setup-agents

That's it. Your agents will now use tribal remember and tribal recall automatically. The assistant for each repo is created on first use (matched by git remote URL), so you never need to run tribal init per repo.

Start using it right away:

tribal remember "Running migrations on PG 15 requires --no-lock flag to avoid deadlocks"
tribal recall "postgres migration"

Team Setup

Teams share knowledge by using the same Backboard account. Two options:

Option A: Shared API key (simplest) — generate one key, share it with the team. Everyone uses the same key in their tribal init --global.

Option B: Backboard organization — create an org in the Backboard dashboard, invite members, and each person gets their own API key under that org.

Either way, each member runs the individual setup above with their key. Same account/org = shared assistants. Same repo = same assistant (matched by git remote URL).

Alice ──┐                              ┌── tribal remember "fix: use --no-lock"
        ├── same Backboard account ────┤
Bob   ──┘                              └── tribal recall "migration issues"
                                            → sees Alice's fix

Per-Repo Override

If a specific repo needs its own config (different LLM, custom settings), run tribal init inside it:

cd special-project
tribal init                   # creates a project-specific tribal.yaml

Config resolution order (highest priority wins):

  1. ./tribal.yaml (CWD)
  2. <git-root>/tribal.yaml
  3. ~/.config/tribalmind/tribal.yaml (global)

Commands

Memory

tribal remember "knowledge to store"       # LLM-parsed memory
tribal remember --raw "exact text"          # Store as-is, skip LLM
echo "piped input" | tribal remember        # Stdin support

tribal recall "search query"               # Semantic search
tribal recall --limit 5 "query"            # Limit results
tribal recall --list                       # Browse all memories (free)
tribal recall --all "auth token format"    # Search across ALL repos

tribal forget "outdated info"              # Search and delete
tribal forget --id mem_abc123              # Delete by ID
tribal forget --all --yes                  # Clear everything

tribal activity                            # View recent activity feed
tribal activity -a remember               # Filter by action

All memory commands accept --json for structured output.

Project

tribal init                    # Set up project (API key + assistant)
tribal init --global           # User-level default for all repos
tribal init --api-key <key>    # Non-interactive / agent setup
tribal status                  # Show project info, memory count, config
tribal status --json           # Machine-readable status

Agent Integration

Set up AI coding agents to automatically use TribalMind:

tribal setup-agents                         # Auto-detect or prompt
tribal setup-agents -a CLAUDE.md            # Just Claude Code
tribal setup-agents -a CLAUDE.md -a .cursorrules
tribal setup-agents --all                   # All supported agents
tribal setup-agents --list                  # Show supported agents

Writes a TribalMind usage snippet into agent instruction files so agents recall before working and remember after solving problems. Supported agents:

File Agent
CLAUDE.md Claude Code
.cursorrules Cursor
.windsurfrules Windsurf
.github/copilot-instructions.md GitHub Copilot
AGENTS.md Generic convention

Configuration

tribal config set llm-provider openai       # Set a config value
tribal config set model-name gpt-4o
tribal config get llm-provider              # Read a single value
tribal config list                          # Show all resolved config (secrets redacted)
All config keys

backboard-base-url llm-provider model-name project-assistant-id

Secrets

Secrets live in your OS keyring — never in plain-text files.

tribal config set-secret backboard-api-key          # Prompts for value
tribal config set-secret backboard-api-key -v <key> # Pass value directly
tribal config debug-key                             # Show masked API key for debugging

Backboard Helpers

tribal config assistants            # List all Backboard assistants
tribal config clear-memory          # Wipe memories for the project assistant
tribal config clear-memory -a <id>  # Wipe memories for a specific assistant

Upgrade

tribal upgrade    # Upgrade to the latest version from PyPI
tribal --version  # Show installed version

Dashboard UI

TribalMind ships with a browser-based dashboard for exploring your assistants and knowledge base.

pip install 'tribalmind[ui]'
tribal ui

Opens http://localhost:7484 in your browser. Use --port to change the port or --no-browser to suppress auto-open.

Memory

A semantic knowledge base browser:

  • Pick an assistant from the dropdown to load its memories
  • Semantic search across all stored knowledge
  • Filter by category — error, fix, context, upstream — with dynamic filter buttons
  • Each memory card shows parsed tags: category, package, confidence %, trust score, and similarity
  • Expand any card to see the raw encoded memory
  • Delete individual memories or clear all at once

Assistants

Browse all Backboard assistants on your account — see names, IDs, and creation dates.

Architecture

tribal CLI (Typer + Rich)
  │
  ├── remember / recall / forget
  │     └── Backboard API (httpx async)
  │           ├── LLM parsing (structured memory encoding)
  │           ├── Vector search (semantic recall)
  │           └── Memory CRUD
  │
  ├── config / init / status
  │     ├── tribal.yaml (project settings)
  │     ├── pydantic-settings (resolution)
  │     └── keyring (secrets)
  │
  └── ui → FastAPI + React dashboard
        └── Backboard API proxy → assistants, memory browser

Backboard provides the unified backend: vector + relational storage for memories, 2200+ LLM models, and semantic search across your knowledge base.

Project Structure

lib/tribalmind/
  cli/        CLI commands (Typer)
  config/     Settings (pydantic-settings + YAML) and keyring credentials
  backboard/  Async HTTP client, memory encoding/parsing, assistant management
  web/        FastAPI server + Backboard API proxy

ui/           React + Tailwind + shadcn dashboard frontend

Contributing

# Clone and install with dev + ui dependencies
git clone https://github.com/zachary-nguyen/TribalMind.git
cd TribalMind
pip install -e ".[dev,ui]"

# Run tests
pytest

# Lint
ruff check lib/ tests/

Commit Convention

This project uses Conventional Commits for automatic semantic versioning. Every push to master triggers CI and, if warranted, an automatic release to PyPI.

Commit prefix Version bump Example
fix: patch (0.1.0 → 0.1.1) fix: handle missing config
feat: minor (0.1.0 → 0.2.0) feat: add memory search to UI
feat!: / BREAKING CHANGE: major (0.1.0 → 1.0.0) feat!: rename config keys
chore:, docs:, ci:, test: no release chore: update deps

Release Flow

git commit -m "feat: add new command"
git push origin master
  → CI runs (lint + tests)
  → Semantic Release detects releasable commit
  → Bumps version, builds wheel with bundled UI
  → Publishes to PyPI
  → Creates GitHub release + changelog

License

MIT

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

tribalmind-2.2.1.tar.gz (150.9 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

tribalmind-2.2.1-py3-none-any.whl (123.8 kB view details)

Uploaded Python 3

File details

Details for the file tribalmind-2.2.1.tar.gz.

File metadata

  • Download URL: tribalmind-2.2.1.tar.gz
  • Upload date:
  • Size: 150.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for tribalmind-2.2.1.tar.gz
Algorithm Hash digest
SHA256 2b8232c753ca48b3cf916ede4b68760dc86d1a8632e57189f84cc8d4232126b1
MD5 e44d3470db466e0ca30b9cd497d920ae
BLAKE2b-256 4069c69b72ee42afd23eb22ea88f2e3aeedf8557f100507424f3bc9172f4c352

See more details on using hashes here.

Provenance

The following attestation bundles were made for tribalmind-2.2.1.tar.gz:

Publisher: release.yml on zachary-nguyen/TribalMind

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file tribalmind-2.2.1-py3-none-any.whl.

File metadata

  • Download URL: tribalmind-2.2.1-py3-none-any.whl
  • Upload date:
  • Size: 123.8 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for tribalmind-2.2.1-py3-none-any.whl
Algorithm Hash digest
SHA256 86672ebea563067c7e31824445c2da498845fc1b66b18034ee0160bb552006c4
MD5 fde789538e078a2bdc6d004a0e4830b8
BLAKE2b-256 c3adea774c1ab25fa61eb22f4cd854f53b508e67da53e350b07770e4a96cbbf5

See more details on using hashes here.

Provenance

The following attestation bundles were made for tribalmind-2.2.1-py3-none-any.whl:

Publisher: release.yml on zachary-nguyen/TribalMind

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page