Metadata-Version: 2.4
Name: agentkb
Version: 0.1.1
Summary: A unified search and knowledge tool for AI agents and developers
License-Expression: MIT
Requires-Python: <3.14,>=3.11
Requires-Dist: click>=8.0
Requires-Dist: numpy>=1.24
Requires-Dist: pylate>=1.1
Requires-Dist: pyyaml>=6.0
Requires-Dist: tree-sitter-c
Requires-Dist: tree-sitter-go
Requires-Dist: tree-sitter-java
Requires-Dist: tree-sitter-javascript
Requires-Dist: tree-sitter-python
Requires-Dist: tree-sitter-ruby
Requires-Dist: tree-sitter-rust
Requires-Dist: tree-sitter-typescript
Requires-Dist: tree-sitter>=0.24
Provides-Extra: web
Requires-Dist: beautifulsoup4>=4.12; extra == 'web'
Requires-Dist: requests>=2.28; extra == 'web'
Description-Content-Type: text/markdown

# 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 unified search and knowledge tool for AI agents and developers. Braids together your **code**, a **knowledge base** of markdown files, and your **Claude Code chat history** into one searchable system.

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

```bash
pip install agentkb
```

## Quick Start

```bash
# Index your code
agentkb code index

# Search semantically
agentkb search "database connection pooling"

# Initialize a knowledge base
agentkb kb 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, project context, accumulated knowledge.
- **Chat History** — Claude Code conversations exported as readable markdown, fully searchable

## Search

```bash
agentkb search "retry logic with backoff"              # semantic search (default: code)
agentkb search -s kb "why did we choose JWT"            # search knowledge base
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
```

## Documentation

Full docs at [isaacflath.com/plait](https://isaacflath.com/plait).

## 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.
