Skip to main content

Federated Developer Knowledge Agent - autonomous background agent that observes terminal activity and shares validated fixes across teams

Project description

TribalMind

CI Release PyPI

Federated Developer Knowledge Agent — an autonomous, background-running agent that observes terminal activity, correlates local errors with upstream library health, and shares validated fixes across your team.

How It Works

  1. Shell hooks capture commands and exit codes as you work
  2. A background daemon processes errors through a LangGraph state machine
  3. Errors are matched against local history, team knowledge, and upstream GitHub issues
  4. Validated fixes are stored in Backboard and promoted to your team when trust thresholds are met

Installation

pip install tribalmind
tribal install

tribal install will:

  • Prompt for your Backboard API key (stored in your system keyring)
  • Detect your shell (bash, zsh, or PowerShell) and install the appropriate hook
  • Prompt for directories to monitor

Usage

# Start the background daemon
tribal start

# Check daemon status
tribal status

# Stop the daemon
tribal stop

# Enable team-wide knowledge sharing
tribal enable-team-sharing --org-id <your-org-assistant-id>

Watched Directories

TribalMind only monitors commands run inside directories you explicitly configure. Nothing is monitored by default.

# Add current directory to the watch list
tribal watch add

# Add a specific path
tribal watch add ~/dev/my-project

# See what's being watched
tribal watch list

# Remove a directory
tribal watch remove ~/dev/my-project

Configuration

# Set a config value (writes to tribal.yaml)
tribal config set llm-provider openai
tribal config set model-name gpt-4o

# Store secrets in the system keyring
tribal config set-secret backboard-api-key
tribal config set-secret github-token

# View all resolved configuration
tribal config list

Copy tribal.yaml.example to tribal.yaml in your project root to customize settings. Values can also be set via TRIBAL_* environment variables.

Live Log UI

A browser-based log viewer streams daemon activity in real time.

# Install UI dependencies
pip install 'tribalmind[ui]'

# Launch (opens browser automatically)
tribal ui

tribal ui opens your browser automatically. Use --no-browser to suppress this, or --port to change the port.

Architecture

Shell Hook (bash/zsh/powershell)
  │  sends JSON over TCP
  ▼
Daemon (asyncio TCP server on localhost:7483)
  │  writes logs to ~/Library/Application Support/tribalmind/daemon.log
  ▼
LangGraph State Machine
  ├── Monitor   → parse stderr, classify errors, generate fingerprints
  ├── Context   → search local/team memories + GitHub upstream
  ├── Inference → suggest fixes (via Backboard LLM)
  ├── Promotion → trust scoring, local → global knowledge promotion
  └── UI        → Rich terminal insight boxes

Live Log UI (FastAPI + React on localhost:7484)
  └── SSE stream from daemon log file → browser log viewer

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

Development

# Install with dev dependencies
pip install -e ".[dev]"

# Run tests
pytest

# Lint
ruff check lib/ tests/

Local development vs published install

Use two virtual environments so you can develop against your repo and still try the published package.

  1. Dev env — editable install; tribal uses your local source as you edit:

    cd TribalMind
    python -m venv .venv
    .venv\Scripts\activate   # Windows
    # source .venv/bin/activate   # macOS/Linux
    pip install -e ".[dev,ui]"
    
  2. Published env — install from PyPI to behave like an end user:

    python -m venv .venv-published
    .venv-published\Scripts\activate   # Windows
    # source .venv-published/bin/activate   # macOS/Linux
    pip install tribalmind[ui]
    

    Run tribal from this env to test the current PyPI version. Switch envs by activating the one you want; no need to uninstall.

  3. Test your built wheel — to try the exact artifact you’ll publish:

    pip install build
    python -m build
    .venv-published\Scripts\activate
    pip install --force-reinstall .\dist\tribalmind-*.whl
    
Goal Env Install
Day-to-day development .venv pip install -e ".[dev,ui]"
Try current PyPI version .venv-published pip install tribalmind[ui]
Try your built wheel .venv-published pip install dist\tribalmind-*.whl

Commit Convention

This project uses Conventional Commits for automatic semantic versioning. Every push to master is evaluated and a release is created automatically if the commits warrant one.

Commit prefix Example Version bump
fix: fix: handle missing watch_dirs patch 0.1.0 → 0.1.1
feat: feat: add log export command minor 0.1.0 → 0.2.0
feat!: or BREAKING CHANGE: feat!: rename config keys major 0.1.0 → 1.0.0
chore:, docs:, ci:, test: chore: update deps no release

Release Flow

git commit -m "feat: add new command"
git push origin master
  → CI runs (lint + tests)
  → PSR detects releasable commit
  → bumps version in pyproject.toml
  → builds wheel with bundled UI
  → publishes to PyPI
  → creates GitHub release + CHANGELOG

Project Structure

lib/tribalmind/
  cli/        CLI commands (Typer)
  config/     Settings (pydantic-settings + YAML) and keyring credentials
  backboard/  Async HTTP client for the Backboard API
  graph/      LangGraph state machine (monitor, context, inference, promotion, ui)
  daemon/     Asyncio TCP server and IPC protocol
  hooks/      Shell hooks for bash, zsh, and PowerShell
  upstream/   GitHub integration for issue/release monitoring
  web/        FastAPI server for the live log UI

ui/           React + shadcn log viewer frontend

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-1.2.0.tar.gz (64.5 kB view details)

Uploaded Source

Built Distribution

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

tribalmind-1.2.0-py3-none-any.whl (106.8 kB view details)

Uploaded Python 3

File details

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

File metadata

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

File hashes

Hashes for tribalmind-1.2.0.tar.gz
Algorithm Hash digest
SHA256 a2a6b1e144b52a622c31eab65733d6e8b3e33f548c3d92da96366b9d5083dabb
MD5 56faf2b5d582f87fcb4ab535ea255525
BLAKE2b-256 1efacbf1baf9f524ba060ae0ab0815be9edc9791fdd5e44a62d5e736fa065151

See more details on using hashes here.

Provenance

The following attestation bundles were made for tribalmind-1.2.0.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-1.2.0-py3-none-any.whl.

File metadata

  • Download URL: tribalmind-1.2.0-py3-none-any.whl
  • Upload date:
  • Size: 106.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-1.2.0-py3-none-any.whl
Algorithm Hash digest
SHA256 bc98f0a622ed9b7088f0481702c8d53b9f4fcee396761166c1ff76cc423b3816
MD5 cde20a0d69ffbd7bd0021c99a2eb7c2f
BLAKE2b-256 ad862c042217e15013ba0d9c1930f6122ec0d0c8d13902a390e9dae869c98c1f

See more details on using hashes here.

Provenance

The following attestation bundles were made for tribalmind-1.2.0-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