Skip to main content

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 wiki 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 wiki 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. A wiki 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
  • Wiki: 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. This is knowledge (what you've learned), not procedures. Agent skills handle the step-by-step workflows; the wiki gives the agent the context to execute those skills well.
  • Chat History: Claude Code conversations exported as readable markdown, fully searchable. The raw material that feeds the wiki.

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 wiki. 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 wiki pages.

Agent Integration

agentkb hooks install                 # install Claude Code hooks

Hooks tell the agent about your wiki 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

agentkb-0.1.4.tar.gz (183.6 kB view details)

Uploaded Source

Built Distribution

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

agentkb-0.1.4-py3-none-any.whl (54.9 kB view details)

Uploaded Python 3

File details

Details for the file agentkb-0.1.4.tar.gz.

File metadata

  • Download URL: agentkb-0.1.4.tar.gz
  • Upload date:
  • Size: 183.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.9.2

File hashes

Hashes for agentkb-0.1.4.tar.gz
Algorithm Hash digest
SHA256 df41953723252cec8bb9b6df9f04f8bd796b56ebc963b988f00d6c28658c4674
MD5 4d381f52aee9d3edbec54cb9a969e29d
BLAKE2b-256 e9db8f55f57dc8915f1e7877e9976eb535f9bcec75757b4bcd29f42ebce9f948

See more details on using hashes here.

File details

Details for the file agentkb-0.1.4-py3-none-any.whl.

File metadata

  • Download URL: agentkb-0.1.4-py3-none-any.whl
  • Upload date:
  • Size: 54.9 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.9.2

File hashes

Hashes for agentkb-0.1.4-py3-none-any.whl
Algorithm Hash digest
SHA256 3d784f9615479f1b83a2f41612ac77fa3468e03a67d85a23f9235b42c61ff2d3
MD5 5bb22dfd1164fda9ec76ed821a6c855e
BLAKE2b-256 9756212e540f536c2bf70fa3da85896033a73f015846b194d56c04b942efa18c

See more details on using hashes here.

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