Agent Brain CLI - Command-line interface for managing AI agent memory and knowledge retrieval
Project description
Agent Brain CLI
Command-line interface for managing AI agent memory and knowledge retrieval with the Agent Brain RAG server.
Agent Brain (formerly doc-serve) is an intelligent document indexing and semantic search system designed to give AI agents long-term memory. This CLI provides a convenient way to manage your Agent Brain server and knowledge base.
Why Agent Brain?
AI agents need persistent memory to be truly useful. Agent Brain provides the retrieval infrastructure that enables context-aware, knowledge-grounded AI interactions.
Search Capabilities
| Search Type | Description | Best For |
|---|---|---|
| Semantic Search | Natural language queries using OpenAI embeddings | Conceptual questions, related content |
| Keyword Search (BM25) | Traditional keyword matching with TF-IDF ranking | Exact matches, technical terms |
| Hybrid Search | Combines vector + BM25 approaches | General-purpose queries |
| GraphRAG | Knowledge graph retrieval | Understanding relationships |
Installation
pip install agent-brain-cli
Quick Start
agent-brain init # Initialize project
agent-brain start # Start server
agent-brain index ./docs # Index documents
agent-brain query "search term"
Note: The legacy command
doc-svr-ctlis still available but deprecated. Please useagent-brainfor new installations.
Development Installation
cd agent-brain-cli
poetry install
Usage
# Check server status
agent-brain status
# Search documents
agent-brain query "how to use python"
# Index documents from a folder
agent-brain index ./docs
# Reset/clear the index
agent-brain reset --yes
Configuration
Set the server URL via environment variable:
export AGENT_BRAIN_URL=http://localhost:8000
Or use the --url flag:
agent-brain --url http://localhost:8000 status
Note: The legacy environment variable
DOC_SERVE_URLis still supported for backwards compatibility.
Commands
Server Management
| Command | Description |
|---|---|
init |
Initialize project for Agent Brain (creates .claude/agent-brain/) |
start |
Start the Agent Brain server for current project |
stop |
Stop the running server |
list |
List all running Agent Brain instances |
status |
Check server health and indexing status |
Data Management
| Command | Description |
|---|---|
query |
Search indexed documents |
index |
Start indexing documents from a folder |
reset |
Clear all indexed documents |
Options
All commands support:
--url- Server URL (orAGENT_BRAIN_URL/DOC_SERVE_URLenv var)--json- Output as JSON for scripting
Example Workflow
# 1. Initialize a new project
cd my-project
agent-brain init
# 2. Start the server
agent-brain start
# 3. Index your documentation
agent-brain index ./docs ./src
# 4. Query your knowledge base
agent-brain query "How does authentication work?"
# 5. Stop when done
agent-brain stop
Documentation
- User Guide - Getting started and usage
- Developer Guide - Contributing and development
- API Reference - Full API documentation
Release Information
- Current Version: See pyproject.toml
- Release Notes: GitHub Releases
- Changelog: Latest Release
Related Packages
- agent-brain-rag - The RAG server that powers Agent Brain
License
MIT
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file agent_brain_cli-9.0.0.tar.gz.
File metadata
- Download URL: agent_brain_cli-9.0.0.tar.gz
- Upload date:
- Size: 42.6 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
591270caa2c51334d13e488e76530cb44d06086993ff81cd0d65e6414fa6591e
|
|
| MD5 |
170babc8f6b2ad0f8833bab75e752755
|
|
| BLAKE2b-256 |
3c3399c05564f02e5abd975c5534392bdb80e01789d6d970ab51839b7f46bff7
|
Provenance
The following attestation bundles were made for agent_brain_cli-9.0.0.tar.gz:
Publisher:
publish-to-pypi.yml on SpillwaveSolutions/agent-brain
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
agent_brain_cli-9.0.0.tar.gz -
Subject digest:
591270caa2c51334d13e488e76530cb44d06086993ff81cd0d65e6414fa6591e - Sigstore transparency entry: 1111862378
- Sigstore integration time:
-
Permalink:
SpillwaveSolutions/agent-brain@48dc9dbf47de5c144e1d5aed7ffff3d74d3bf94e -
Branch / Tag:
refs/tags/v9.0.0 - Owner: https://github.com/SpillwaveSolutions
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish-to-pypi.yml@48dc9dbf47de5c144e1d5aed7ffff3d74d3bf94e -
Trigger Event:
release
-
Statement type:
File details
Details for the file agent_brain_cli-9.0.0-py3-none-any.whl.
File metadata
- Download URL: agent_brain_cli-9.0.0-py3-none-any.whl
- Upload date:
- Size: 62.4 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
1f487862f167f19506569296d117c7bf48112e0a103db0a1fbdd87cbd266c3d6
|
|
| MD5 |
fb5b4faf88f8ce9b6f746e4ad228b425
|
|
| BLAKE2b-256 |
6eb240ab565021d82f24771a57410e66b4d813e9ba97afbbce3fd45bcd5b514e
|
Provenance
The following attestation bundles were made for agent_brain_cli-9.0.0-py3-none-any.whl:
Publisher:
publish-to-pypi.yml on SpillwaveSolutions/agent-brain
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
agent_brain_cli-9.0.0-py3-none-any.whl -
Subject digest:
1f487862f167f19506569296d117c7bf48112e0a103db0a1fbdd87cbd266c3d6 - Sigstore transparency entry: 1111862392
- Sigstore integration time:
-
Permalink:
SpillwaveSolutions/agent-brain@48dc9dbf47de5c144e1d5aed7ffff3d74d3bf94e -
Branch / Tag:
refs/tags/v9.0.0 - Owner: https://github.com/SpillwaveSolutions
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish-to-pypi.yml@48dc9dbf47de5c144e1d5aed7ffff3d74d3bf94e -
Trigger Event:
release
-
Statement type: