whatisgithub

What is docket?

nienhq/docket — explained in plain English

Analysis updated 2026-05-18

1TypeScriptAudience · developerComplexity · 3/5LicenseSetup · moderate

In one sentence

A TypeScript library that lets AI agents search a company's email archive with citations that trace back to the original message.

Mindmap

mindmap
  root((Docket))
    What it does
      Local mail retrieval library
      Citation backed answers
    Tech stack
      TypeScript
      SQLite
      MCP
    Use cases
      Agent search over email
      Fact ledger queries
      Compliance audits
    Audience
      TypeScript developers
    Design
      Immutable evidence
      Hybrid search rerank
      Bi temporal facts

Code map

Detail Auto

An interactive map of this repo's files and how they connect — its source is parsed live in your browser. Click Visualize to build it.

filefunction / class

What do people build with it?

USE CASE 1

Let an AI agent search years of business email with verifiable citations.

USE CASE 2

Ask what a fact, like payment terms with a vendor, was true as of a past date.

USE CASE 3

Reconstruct email threads for compliance or audit review.

USE CASE 4

Give an MCP-compatible AI client read access to a company's mail archive.

What is it built with?

TypeScriptSQLiteMCPNode.js

How does it compare?

nienhq/docket0xkinno/neuralvault0xmayurrr/ai-contractauditor
Stars111
LanguageTypeScriptTypeScriptTypeScript
Setup difficultymoderatehardeasy
Complexity3/54/52/5
Audiencedeveloperdeveloperdeveloper

Figures from each repo's GitHub metadata at analysis time.

How do you get it running?

Difficulty · moderate Time to first run · 1h+

Not published to a package registry, must be installed from a git checkout with pnpm.

So what is it?

Docket is a library for TypeScript apps that lets an AI agent search through years of business email and attachments and get answers that trace back to the exact original message. It runs fully inside your own application using SQLite for storage, so there is no separate server or cloud service to set up. The project's stance is that similar tools, like RAGFlow or R2R, are Python services meant to run alongside your app, which is a heavy dependency if your app is written in TypeScript and your data is just one company's mail archive. Docket instead installs like any other library and stores everything in a single directory on disk. Its design keeps the original email and attachment files untouched and permanent, treating anything derived from them, such as search indexes or AI embeddings, as something that can always be rebuilt. Every answer can point back to the exact bytes it came from. Rather than a single search that returns a fixed number of top results, an AI agent using Docket calls a set of tools to filter, search, follow a conversation thread, look at a timeline, or fetch a specific source. Search itself combines traditional keyword matching with vector based search, then reorders results with a reranking step. Docket also keeps a ledger of facts extracted from the mail, where each fact records when it became true in the real world and when the agent learned it, so newer information replaces older information without deleting the history, which lets you ask what was true as of a specific date. Email threads are reconstructed by matching message headers rather than by parsing subject lines. The package includes a command line tool that exposes these same features to any MCP compatible AI client, either read only or with permission to write new facts. It requires Node.js 20 or newer and is released under the MIT license.

Copy-paste prompts

Prompt 1
Help me install Docket and ingest a folder of .eml files into a local mail archive.
Prompt 2
Explain how Docket's bi-temporal fact ledger lets me query beliefs as of a past date.
Prompt 3
Show me how to run Docket's MCP server so my AI client can search my mail archive.
Prompt 4
Walk me through Docket's hybrid search and reranking process.

Frequently asked questions

What is docket?

A TypeScript library that lets AI agents search a company's email archive with citations that trace back to the original message.

What language is docket written in?

Mainly TypeScript. The stack also includes TypeScript, SQLite, MCP.

How hard is docket to set up?

Setup difficulty is rated moderate, with roughly 1h+ to a first successful run.

Who is docket for?

Mainly developer.

Open on GitHub → Ask about another repo

This repo across BitVibe Labs

Verify against the repo before relying on details.