v0.6.0

HTTP API

Last updated


The read-only JSON endpoints the daemon serves on 127.0.0.1, with their parameters, responses, and error codes.

Base URL


The daemon listens on 127.0.0.1 only and writes its address to ~/.config/kuradb/endpoint (for example http://localhost:21182). The port is random unless pinned with kura port set <port>; see Configuration.
  1. BASE="$(cat ~/.config/kuradb/endpoint)"

MethodPathPurpose
GET/api/healthLiveness check, returns the plain text OK
GET/api/listLoaded and registered databases
GET/api/searchKeyword search in one database
GET/api/keywordLegacy alias of /api/search with the target fixed to keyword
any/mcpMCP over streamable HTTP, mounted only when remote MCP is enabled (MCP Server)

GET /api/list


  1. curl "$BASE/api/list"

  1. {
  2. "loaded": ["notes"],
  3. "registered": [{ "db": "notes", "createAt": "2026-10-21T07:13:55Z" }]
  4. }

FieldMeaning
loadedDatabases opened by this daemon at startup and therefore searchable
registeredEvery entry in db.json, including databases added after startup or skipped because they failed to open

GET /api/search


  1. curl "$BASE/api/search?db=notes&q=sqlite%20wal&limit=5"

ParameterRequiredValue
dbYesA name from loaded
qYesSpace-separated keywords
limitNo1 to 100 chunks; anything else falls back to 10
targetNokeyword or omitted

The response is {"keyword": [...]} with chunks grouped by source file; matching and ranking rules are on Keyword Search. /api/keyword takes the same db, q, and limit parameters; it is kept so existing Agenvoy builds keep working and is marked for deprecation in v1.

Errors


Errors return a JSON body {"error": "<message>"}.
StatusMessageCause
400db is requireddb missing
400"<name>" not existdb is not a loaded database
400invalid argument: q is requiredq missing or empty
400invalid argument: unknown target "<value>"target is not keyword
500Database error textQuery failure, or db.json cannot be read on /api/list


中文