---
title: "ask-kit"
url: https://temet.ai/docs/ask-kit/
modified: 2026-11-19
summary: "Give your coding agent one tool that digs through your past sessions and your code, and answers with evidence."
---

# ask-kit

[![ask-kit — playful brown stacked wordmark](images/ask-kit-logo.png)](https://github.com/temet-ai/ask-kit)

Most of a coding agent's context goes on finding things out: searching, opening files, following
calls, checking what was tried before. All of it stays in the context and crowds out the work
the agent was asked to do.

ask-kit moves that work out of the agent's context. It gives the agent one tool, `ask`. The agent
asks a question in plain words, and a cheap investigator works it out in its own context. The
agent gets back a short answer with the evidence it's based on, and its own context stays free
for designing, writing and fixing code.

```
you:  add a CSV exporter like the other ones

agent → ask: how are the exporters built and registered, and which tests cover them?

ask   → Exporters implement Exporter in src/export/base.ts:12 and are registered in
        src/export/index.ts:30. JsonExporter (src/export/json.ts) is the closest model;
        tests are in test/export/*.test.ts.
        [code · glm-5.3-flash · 21s · $0.0031]
```

The agent reads that three-line answer and starts the change from there. (The exchange above is
an example of what an answer looks like.)

## How the investigator answers

For each step of a question, the investigator writes a small JavaScript program and runs it in a
REPL. The program does whatever the step needs: loops, filters, joins, counts, comparisons,
parsing. It is written fresh for that question. A domain gives the programs access to the data.
What a program prints is all that returns to the investigator's model. Common
questions already have scripts, so it can start from one of those.

![Your agent sends one question; the investigator writes small programs for it in its own context, reaching code, sessions and your own domains, and returns a short answer with path:line evidence](https://temet.ai/docs/ask-kit/images/how-an-ask-works.svg)

Your agent writes only the question and gets only the answer. The investigator is a cheap, fast
model, and its programs, their intermediate results and the files they read all stay in its
session; a follow-up with `continue: true` reuses what has already run, because the REPL's
variables are still there.

![Median per ask over 105 real asks to mike-ask: the investigator worked through 125,025 tokens, and about 445 went back to your agent; 36 seconds and $0.011](https://temet.ai/docs/ask-kit/images/context-kept-out.svg)

[How it works](https://temet.ai/docs/ask-kit/how-it-works/) goes into more detail.

Each kind of thing `ask` can answer about is a **domain**. A domain gives the investigator's
programs access to its data, and instructions for searching it. ask-kit comes with two, as a
starting point:

- **code**: the repository the agent is working in, cited as `path:line`.
- **sessions**: your past agent sessions, from the transcripts Claude Code, Codex, Copilot CLI,
  Gemini CLI and opencode already save.

[Add your own](https://temet.ai/docs/ask-kit/domains/) for anything else your agent keeps digging through: a database, logs,
a service, a docs folder.

## Get started

1. Paste this into the agent you already use (Claude Code, Codex, Copilot CLI, Gemini CLI or
   opencode):

   ```
   Read https://github.com/temet-ai/ask-kit/blob/main/AGENTS.md, then set up ask-kit for me.
   ```

   It installs ask-kit and asks you a few questions. The main one is which model does the
   digging.
2. Restart your agents.
3. Give your agent a task. It calls `ask` by itself when it needs to find something out. You
   can also ask directly: `ask where the config file is read`.

## Guide pages

- [Use it](https://temet.ai/docs/ask-kit/asking/): what to ask, reading answers, follow-ups. **Start here.**
- [Set it up](https://temet.ai/docs/ask-kit/setup/): what setup does, and how to change it later.
- [Choose the model](https://temet.ai/docs/ask-kit/models/): an API key, a subscription you already pay for, or a local model.

Use cases:

- [Write code with it](https://temet.ai/docs/ask-kit/use-coding/)
- [Search code and past work](https://temet.ai/docs/ask-kit/use-searching/)
- [Pick up where you left off](https://temet.ai/docs/ask-kit/use-resuming/)
- [Make it better](https://temet.ai/docs/ask-kit/tuning/): fix the questions it answers badly.

More:

- [Domains](https://temet.ai/docs/ask-kit/domains/): teach `ask` about something new.
- [How it works](https://temet.ai/docs/ask-kit/how-it-works/)
- [Command line and files](https://temet.ai/docs/ask-kit/command-line/)
- [What it stores and sends](https://temet.ai/docs/ask-kit/privacy/)
- [Troubleshooting](https://temet.ai/docs/ask-kit/troubleshooting/)

How-to guides:

- [Write a domain](https://temet.ai/docs/ask-kit/guides/write-a-domain/): a working domain over a folder of notes, step by
  step.
- [Add a script](https://temet.ai/docs/ask-kit/guides/add-a-script/), including turning a draft into a script.
- [Debug a bad answer](https://temet.ai/docs/ask-kit/guides/debug-a-bad-answer/): from a wrong answer to the fix, using the
  journal.
- [Add a model or provider](https://temet.ai/docs/ask-kit/guides/add-a-backend/)
- [Support another coding agent](https://temet.ai/docs/ask-kit/guides/add-an-agent/): a transcript adapter and setup.
- [Run the benchmark](https://temet.ai/docs/ask-kit/guides/run-the-benchmark/)
- [Run the tests](https://temet.ai/docs/ask-kit/guides/testing/)

Reference:

- [Config file](https://temet.ai/docs/ask-kit/reference/config/): every key in `config.json`.
- [The ask tool](https://temet.ai/docs/ask-kit/reference/ask-tool/): parameters, answers and errors.
- [What the investigator's programs can reach](https://temet.ai/docs/ask-kit/reference/domain-api/): globals, helpers and
  every script.
- [Files and environment variables](https://temet.ai/docs/ask-kit/reference/files-and-env/)
- [Journal format](https://temet.ai/docs/ask-kit/reference/journal/)

Internals, for changing ask-kit itself:

- [Map of the code](https://temet.ai/docs/ask-kit/internals/): the processes, every source file and a reading order.
- [Life of one ask](https://temet.ai/docs/ask-kit/internals/ask-lifecycle/): router, backend, cells, answer and journal.
- [The REPL](https://temet.ai/docs/ask-kit/internals/repl/): how cells run, saved state, scripts.
- [Backends](https://temet.ai/docs/ask-kit/internals/backends/): APIs, agent CLIs and local models.
- [Domains](https://temet.ai/docs/ask-kit/internals/domains/): the domain contract, the two built-in domains, the gallery.
- [Transcript adapters](https://temet.ai/docs/ask-kit/internals/transcripts/): how each agent's sessions are read.
- [Setup](https://temet.ai/docs/ask-kit/internals/setup/): `init`, `setup`, `apply`, `doctor`, `uninstall` and the files they
  write.

## Status

Early. It has been used on one Linux machine. CI runs on Linux, macOS and Windows. There are no
releases yet, so you install from `main`.

ask-kit started as mike-ask, a proof of concept that answers from what
[mike](https://github.com/temet-ai/mike) records of every Claude Code session. ask-kit is the
general version: it needs no mike and no server, reads what your agents already save, and can
be given any domain.
