Skip to main content

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.

PyPI version Python 3.10+ License: MIT

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-ctl is still available but deprecated. Please use agent-brain for 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_URL is 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 (or AGENT_BRAIN_URL / DOC_SERVE_URL env 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

Release Information

Related Packages

License

MIT

Metadata

Release files for agent-brain-cli 10.7.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for agent-brain-cli 10.7.0
File Size Uploaded Provenance Actions
agent_brain_cli-10.7.0.tar.gz 99.6 kB With provenance Details for agent_brain_cli-10.7.0.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for agent-brain-cli 10.7.0
File Interpreter ABI Platform Actions
agent_brain_cli-10.7.0-py3-none-any.whl Python 3 none any Details for agent_brain_cli-10.7.0-py3-none-any.whl

Total release size: 226.9 kB

Release files / agent_brain_cli-10.7.0.tar.gz

Download URL agent_brain_cli-10.7.0.tar.gz
Size 99.6 kB
Tags Source
SHA-256 checksum
How to use checksums
985abb1d4e5ddf6e6576ad6cf9e1532c12ed90d1850c9e8df9145beb723b7f25
BLAKE2b-256 checksum
How to use checksums
a829fcac51ee8330f0ddad19ea81063c0837b1505ce9db229c0a260cf9d6da93
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Sep 3, 2026.

Transparency log

Release files / agent_brain_cli-10.7.0-py3-none-any.whl

Download URL agent_brain_cli-10.7.0-py3-none-any.whl
Size 127.3 kB
Tags Python 3
SHA-256 checksum
How to use checksums
9abed674d6665cc490933930d767a3445482fde1886736eefa68d9ef1b7f6381
BLAKE2b-256 checksum
How to use checksums
12ea188ef78b0d1bbb10439d1fb4a25a4511e9f74a0cb0486359ecccaebc9d71
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Sep 3, 2026.

Transparency log

Security for agent-brain-cli 10.7.0

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

Full provenance

All 2 files in this release have been uploaded with provenance metadata.

Select from 2 files

Attestation for agent_brain_cli-10.7.0.tar.gz

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Sep 3, 2026.

Transparency log

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Release history Release notifications | RSS feed

This release

10.7.0 This release

2 release files Full provenance

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page