A unified search and knowledge tool for AI agents and developers
Project description
AgentKB
Pre-alpha. This is under active development. APIs, CLI commands, and storage formats may change without notice and will likely break frequently. Use at your own risk.
A knowledge tool that makes AI agents smarter over time. Braids together your code, a knowledge base of markdown files, and your Claude Code chat history into one searchable system.
The power is in the cross-intersection: code tells you what exists, chat history tells you what was tried, what failed, and what was learned, and the knowledge base captures the distilled lessons so the agent doesn't repeat mistakes. Each source fills gaps the others can't — code alone doesn't capture why a decision was made, chats alone are noisy and unsearchable, and a knowledge base alone goes stale without activity to drive updates.
Your data stays local, in universal formats (source files, markdown, JSONL), on your machine. Back everything up with agentkb sync push and restore on a new machine with agentkb sync pull.
Install
pip install agentkb
Quick Start
# Index your code
agentkb code index
# Search semantically
agentkb search "database connection pooling"
# Initialize a wiki
agentkb wiki init
# Index your Claude Code chat history
agentkb chats index
# Search across everything
agentkb search -s all "authentication flow"
Stores
AgentKB has three store types:
- Code — source files parsed with tree-sitter (Python, JS, TS, Rust, Go, Java, C, Ruby), searchable by meaning
- Knowledge Base — plain markdown files you and your agents write. Hard-won lessons, techniques, taste, people, tools, domain knowledge — anything that helps the agent do better work next time.
- Chat History — Claude Code conversations exported as readable markdown, fully searchable. The raw material that feeds the knowledge base.
Search
agentkb search "retry logic with backoff" # semantic search (default: code)
agentkb search -s wiki "why did we choose JWT" # search wiki
agentkb search -s chats "how did I fix the auth bug" # search chat history
agentkb search -s all "authentication" # search everything
agentkb search -e "async def" "error handling" # regex + semantic
agentkb search --include="*.py" "config parsing" # filter by file type
agentkb search --json "query" # JSON output for scripts
Consolidation
Turn your git activity and chat history into wiki knowledge:
agentkb consolidate # what's happened in the last 7 days vs. wiki state
agentkb consolidate --since 30d # last 30 days
This cross-references what changed in code, what was discussed in chats, and what's already in the knowledge base. It produces a report with every session in the time range, paths to read them, and instructions for extracting reusable knowledge. The agent reads the sessions, extracts lessons (mistakes, techniques, taste decisions, people knowledge, domain expertise), and writes or updates knowledge base pages.
Agent Integration
agentkb hooks install # install Claude Code hooks
Hooks tell the agent about your knowledge base at session start and remind it about semantic search when it reaches for Grep/Glob.
Documentation
Full docs at isaacflath.com/agentkb.
How It Works
Hybrid search: ColBERT multi-vector embeddings (semantic) + SQLite FTS5 (keyword), fused with reciprocal rank fusion. Indexes are incremental — only changed files are re-encoded.
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
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 agentkb-0.1.2.tar.gz.
File metadata
- Download URL: agentkb-0.1.2.tar.gz
- Upload date:
- Size: 183.4 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.13.5
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
323558f4119563ebe8e17dcc3d4b2c02152cbc5467c4d13b54ccb2a82f2bd92d
|
|
| MD5 |
7b3802c1001f2fbb06f775998df94dd5
|
|
| BLAKE2b-256 |
6ef75a3bc503d54a602c6b25ecb6509b821cde95dc07410a4d348c13ecd385c5
|
File details
Details for the file agentkb-0.1.2-py3-none-any.whl.
File metadata
- Download URL: agentkb-0.1.2-py3-none-any.whl
- Upload date:
- Size: 54.8 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.13.5
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
95fe6e2dd766e8aec8d3194d34f2035a822a88ca0190cacd7dadc112382204b5
|
|
| MD5 |
3c5b98d9369f5eeb3d12fd06fb9a8a52
|
|
| BLAKE2b-256 |
ef854f918b180a014a97bf9f65ada9b4b42696e2b74c3ccde5cfdcda1ef768c3
|