# AGENTS.md

Your AI second brain. Self-hostable. Get answers from the web or your docs. Build custom agents, schedule automations, do deep research. Turn any online or local LLM into your personal, autonomous AI (gpt, claude, gemini, llama, qwen, mistral). Get started - free.

## Setup

```
uv sync
```

## Commands

```
pytest         # run the test suite
ruff check .   # lint
```

## Layout

- `src/`           227 source files
- `tests/`         28 source files
- `documentation/` 4 source files
- `scripts/`       2 source files

## Conventions

- Tests live alongside the code they cover, following `src/interface/emacs/tests/khoj-tests.el`.
- CI defines what passing means. See `.github/workflows/build_khoj_el.yml`, and keep it green.
- TODO: add the two or three conventions a newcomer always gets wrong here.

## Gotchas

- `src/khoj/routers/helpers.py` is 129KB. It will not fit comfortably in context, so read it in parts.

---

Drafted by agentreadme.com from what is in this repository. Everything marked TODO
needs a human. Check it in as AGENTS.md at the root.
