Docs / Developer tools

Agent notes API

A small private key-value store, for agents and scripts that must remember between runs.

Make a store, then write and read notes by name over HTTP: plain text or JSON, up to 16 KB a note and 1 MB a store, kept 30 days after the last write (they survive restarts). Private to the secret, sent as X-Secret. The store demo (secret demo) is read-only. Needs a free API key once keys are required (see /keys).

Base URL https://api.dharun.devNo key needed for most600 units a minute, 3000 with a free keyThis page as Markdown

Make a store

POST/v1/kv

Send: Nothing, or {} .

Model endpoint: it will need a free API key, sent as Authorization: Bearer <key> or X-API-Key. Until the date on API keys it answers without one and says so in the X-Key-Notice header. With a key: 500 model requests a day.

What you send here is never written to the log, and the answer is not cached.

curl

curl -H "Content-Type: application/json" --data '{}' "https://api.dharun.dev/v1/kv?utm_medium=docs"

JavaScript

const response = await fetch("https://api.dharun.dev/v1/kv?utm_medium=docs", {
  method: "POST",
  headers: { "Content-Type": "application/json" },
  body: JSON.stringify({}),
});
const body = await response.json();
if (!response.ok) throw new Error(body.error.message);
console.log(body.data);

Python

import requests

response = requests.post("https://api.dharun.dev/v1/kv?utm_medium=docs", data="{}", headers={"Content-Type": "application/json"}, timeout=60)
body = response.json()
if not response.ok:
    raise RuntimeError(body["error"]["message"])
print(body["data"])

invoice.json

{}
Try it here

Change the values and send the request from your browser. Needs JavaScript.

List notes

GET/v1/kv/{id}

What you send here is never written to the log, and the answer is not cached.

ParameterDescription
idpath, requiredThe store.
prefixqueryOnly names starting with this.

curl

curl "https://api.dharun.dev/v1/kv/demo?secret=demo&utm_medium=docs"

JavaScript

const response = await fetch("https://api.dharun.dev/v1/kv/demo?secret=demo&utm_medium=docs");
const body = await response.json();
if (!response.ok) throw new Error(body.error.message);
console.log(body.data);

Python

import requests

response = requests.get("https://api.dharun.dev/v1/kv/demo?secret=demo&utm_medium=docs", timeout=10)
body = response.json()
if not response.ok:
    raise RuntimeError(body["error"]["message"])
print(body["data"])
Try it here

Change the values and send the request from your browser. Needs JavaScript.

Response

{
  "data": {
    "bytes": 84,
    "keys": [
      "greeting",
      "plan"
    ],
    "written": "9999-01-01T00:00:00Z"
  },
  "meta": {
    "total": 2
  }
}

Read or write a note

GET/v1/kv/{id}/{key}POST

GET reads the note; POST writes the body as the note.

Also takes POST: The note: text or JSON, up to 16 KB. Send it as text/plain, or as JSON {"text": "..."} with the other options beside it, up to 256 KB.

What you send here is never written to the log, and the answer is not cached.

ParameterDescription
idpath, requiredThe store.
keypath, requiredThe note's name, up to 200 characters.

curl

curl "https://api.dharun.dev/v1/kv/demo/greeting?secret=demo&utm_medium=docs"

JavaScript

const response = await fetch("https://api.dharun.dev/v1/kv/demo/greeting?secret=demo&utm_medium=docs");
const body = await response.json();
if (!response.ok) throw new Error(body.error.message);
console.log(body.data);

Python

import requests

response = requests.get("https://api.dharun.dev/v1/kv/demo/greeting?secret=demo&utm_medium=docs", timeout=10)
body = response.json()
if not response.ok:
    raise RuntimeError(body["error"]["message"])
print(body["data"])
Try it here

Change the values and send the request from your browser. Needs JavaScript.

Response

{
  "data": {
    "key": "greeting",
    "value": "வணக்கம்"
  },
  "meta": {}
}

Delete a note

POST/v1/kv/{id}/{key}/delete

Send: Nothing, or {} .

What you send here is never written to the log, and the answer is not cached.

curl

curl -H "Content-Type: application/json" --data '{}' "https://api.dharun.dev/v1/kv/demo/greeting/delete?secret=demo&utm_medium=docs"

JavaScript

const response = await fetch("https://api.dharun.dev/v1/kv/demo/greeting/delete?secret=demo&utm_medium=docs", {
  method: "POST",
  headers: { "Content-Type": "application/json" },
  body: JSON.stringify({}),
});
const body = await response.json();
if (!response.ok) throw new Error(body.error.message);
console.log(body.data);

Python

import requests

response = requests.post("https://api.dharun.dev/v1/kv/demo/greeting/delete?secret=demo&utm_medium=docs", data="{}", headers={"Content-Type": "application/json"}, timeout=60)
body = response.json()
if not response.ok:
    raise RuntimeError(body["error"]["message"])
print(body["data"])

invoice.json

{}
Try it here

Change the values and send the request from your browser. Needs JavaScript.

Response

{
  "data": {
    "deleted": false,
    "key": "greeting"
  },
  "meta": {
    "note": "The demo store is read-only."
  }
}

Using an AI assistant? Connect the MCP server and it can call this API by itself. Want every endpoint on one bench? Open the playground.