docsagents
make an agent, give it a memory, recall from it, and forget, over plain https.
3 pages

the agents api

Base url https://innernet.live/api/v1. Every call takes Authorization: Bearer <key>. Bodies and answers are JSON, snake_case.

keys#

keymade wheremay do
your own key (innernet_…, read + write)dashboard → connections → apimake, change and remove agents; act on any of your agents by slug
an agent keyPOST /agents/{agent}/keys with your own key, or a chat through innernet_agent_keys, or connections → the agents you keep → an agent → settings → keys (an agent made through the API starts with no key of its own; the secret is shown once, wherever it is made)that one agent's memory, and the person's own memory only as deep as they allow (person.read). Use me for its slug. It can never make keys or agents

An agent key is a server secret: never ship it to a browser or a mobile app. It reaches every memory that agent keeps, its users' included.

make an agent#

bash
curl https://innernet.live/api/v1/agents \
  -H "Authorization: Bearer $INNERNET_KEY" \
  -d '{ "name": "support desk", "kind": "product", "purpose": "answers our customers about orders" }'

kind is personal (it works for you) or product (it works for other people). settings is optional; every setting has a default (agent settings). access sets what it may do with you in one word: sealed, asks first or trusted (an agent that works for you starts trusted, one that works for other people at asks first).

Add "key": true (or a label, "key": "vercel production") and its first key is made in the same call: the answer carries key and, once, secret. If the key cannot be made, the agent is not made either.

When a call asks for more of you than a key may give ("access": "trusted", or the settings under it), the rest is made and the answer carries waiting: { "what", "settings", "url", "expires_at" }. what is one sentence of what saying yes gives; url is the link you open, signed in, to say yes. PATCH /agents/{agent} answers the same way.

A top-level agent is made with a project of its own, named for it, that its own knowledge flows into (agents). Add "home": "ledger" (one of your projects, by slug or id) and that project becomes its home and folder instead, so no second project is made beside the one you keep. A home that is not yours, or a room's map, refuses the whole call and no agent is made.

its keys#

bash
curl https://innernet.live/api/v1/agents/support-desk/keys \
  -H "Authorization: Bearer $INNERNET_KEY" \
  -d '{ "label": "vercel production" }'

Answers 201 { "key": { "id", "label", "prefix", "created_at", "last_used_at" }, "secret": "innernet_…" }. The secret is in this answer and never again: put it where the agent runs (INNERNET_AGENT_KEY is the usual name) and nowhere a person reads. GET the same path lists the agent's live keys (never a secret); DELETE /agents/{agent}/keys/{id} revokes one, and it stops working at once. All three need your own key with write: an agent's own key answers 403, even for itself. An agent keeps at most 5 live keys, and keys are made a few a minute at most.

Add "parent": "support-desk" (a slug or an id) to make a sub-agent under one of your top-level agents. It takes the parent's kind and a copy of its settings, so settings here changes only what you name; it keeps a memory and keys of its own. Two levels only (a sub-agent cannot have sub-agents), at most 50 under one agent, and your 100 agents count them. Every agent says the slug of the one it works under in parent (null for a top-level agent). Removing an agent that has sub-agents answers 409 until they are removed, or DELETE /agents/{agent}?cascade=1 removes them together; the dashboard asks, then removes them together.

remember#

bash
curl https://innernet.live/api/v1/agents/support-desk/memories \
  -H "Authorization: Bearer $INNERNET_KEY" \
  -d '{ "user_id": "cus_8f2a",
        "messages": [{ "role": "user", "content": "i run three stores and ship on mondays" }] }'
fieldwhat it does
content or messageswhat to keep: a text, or a conversation (role user · assistant · system · tool, and timestamp, when it was said: an ISO time or unix milliseconds)
inferpull separate memories out of it (the default), or keep the text as given
subjectagent · owner · user. When absent: the extraction decides, or user when user_id is given
user_idone of the agent's users
dimensionfor a memory about you: the part of your life it belongs to (preferences, tools, habits …). A name that is not one is refused
run_ida run, a thread or a session; run memories expire after retention.run_days
kindfact · preference · episode · procedure · instruction · note (for infer: false)
tags · metadata · importance (1–5)yours to set and filter by
immutablenever changed and never replaced by a newer version
event_atwhen it happened, for backfilling
expires_at or ttl_dayswhen it is deleted
instructionsextra rules for this call's extraction

The answer lists what was kept, what was offered to you (about_you), what was skipped and why (an exact duplicate, an excluded topic, a kind turned off), and how many emails, phone numbers, secrets and card numbers were hidden first. A near-duplicate of something it already keeps (nearly the same words) becomes a new version of it; GET …/memories/{id}/history shows the chain. A changed fact ("ships on fridays", then "ships on mondays") is not nearly the same words: change the old memory with PATCH, and that makes the new version.

recall#

bash
curl https://innernet.live/api/v1/agents/support-desk/recall \
  -H "Authorization: Bearer $INNERNET_KEY" \
  -d '{ "query": "when do they ship?", "user_id": "cus_8f2a", "limit": 5 }'

Without a user_id (or a subject), recall reads the agent's own memories and what it keeps about you, never its users': one customer's prompt is never built from another's memories because a field was forgotten. Recall ranks by the words of the query, by recency and by importance, and with rerank: true re-reads the best matches by meaning. include_person: true adds the facts of yours the agent may read. Filters take and · or · not over kind, subject, user_id, run_id, tags, importance, created_at, event_at, expires_at and metadata.<key>, with eq ne in nin gt gte lt lte contains exists:

json
{ "query": "setup", "filters": { "and": [ { "kind": { "in": ["fact", "preference"] } }, { "metadata.store": "north" } ] } }

recency (0 to 1) says how much newer beats older for one call.

what was said#

When it is on for your account (early access, opening with agent memory), an agent keeps every message it is given beside the memories it reads out of them (system messages are left out; with infer: false the text is the memory). Each memory points at its message (metadata.said_id) and carries its time in event_at: the message's own timestamp, else the call's event_at, else when it arrived. A remember answers said, how many messages were kept; the same message sent again is kept once.

A recall with a query then reads both: it ranks the words of the query and of a short widening of it over memories and messages together, and a memory brings the message it came from up beside it. Messages come back in said, beside memories, each { id, role, content, subject, user_id, run_id, said_at, score }, on the same score scale, so merging the two by score gives the order they were ranked in. limit counts both, and with none it is 40 unless you changed recall.limit (it starts at 10, and an agent still at 10 reads 40 here; send limit to ask for fewer, up to 100). kinds reads memories only. meta.said says how many messages came back and meta.expanded whether the query was widened. Recency is not part of the order unless you send recency.

Messages are never counted against max_memories, never listed and never offered to you. Forgetting a memory forgets the message it came from; forget also takes message ids and the messages a filter matches (and answers said and said_ids); forgetting a user forgets everything they said; an export carries them in said.

context#

POST /agents/{agent}/context answers with one block ready for a system prompt: what the agent knows and what it knows of this user, trimmed to budget_tokens. What it may know of you is added when the agent's recall.include_person setting is on and person.read is not none.

When what was said is kept, each line says when (- (2026-10-12 09:30) …) and a message says who said it (user said: …), each section reads oldest first, and the block takes the best lines until budget_tokens is full; the messages it carries come back in said.

how it works with you#

When the person gives an agent identities (in their agents space, when they make it or later in its settings), context and recall also answer agent_identity: { name, lines, note }, the identities they chose mixed in their order, as plain lines to follow (how to talk, how to answer, how to behave, what it always does). It is never inside text, and an agent the person gave none to gets no such field. Follow it as the person's own settings.

the rest#

methodpathwhat
GET/agentsyour agents, sub-agents included (each says its parent)
GET · PATCH · DELETE/agents/{agent}read, change (status: "paused" pauses), remove. A retired agent (retired by the person in their agents space) is read and exported like any other, and answers 423 to what it would keep or recall
GET · POST/agents/{agent}/keysits keys (never a secret); make one (the secret, once)
DELETE/agents/{agent}/keys/{id}revoke one of its keys
GET/agents/{agent}/memorieslist, newest first: subject, user_id, run_id, kind, tag, limit, cursor. Answers { memories, next_cursor }; pass next_cursor back as cursor (an ISO time, null on the last page)
GET · PATCH · DELETE/agents/{agent}/memories/{id}one memory; changing its words makes a new version
GET/agents/{agent}/memories/{id}/historyits versions
POST/agents/{agent}/forgetby ids or filters, with dry_run
DELETE/agents/{agent}/users/{user_id}everything about one of its users, with a count
GET/agents/{agent}/exportthe agent and every memory
GET/agents/{agent}/eventsits ledger: what it did, as counts

errors#

{ "error": code, "message": "…" } with 404 not_found (no such agent for this key), 403 forbidden (an agent key managing agents or keys), 423 paused (paused or retired), 400 invalid, 409 conflict (a slug taken, an immutable memory), 429 rate_limited, 413 too_large.

webhooks#

Set one in the agent's settings in your agents space; there is no API for it yet, and the signing secret is shown once when you save. Every delivery is a POST with x-innernet-event and x-innernet-signature: t=<unix>,v1=<hex>, where v1 is HMAC-SHA256 of <t>.<body> with the agent's signing secret. Events: memory.created, memory.updated, memory.forgotten, funnel.held, funnel.decided (with decision: keep or decline to a held ask, send when you move a memory into your memory by hand, withdraw when you take one back). One attempt, five seconds; the last answer shows in the dashboard.

clients#

The python and typescript clients are pip install innernet and npm install @innernet/sdk. Neither has dependencies. The two https calls above still work without them, and give an agent a memory has them as a small helper in both languages (or paste that link, with the agent's key, into the ai you code with and it wires them in for you). The clients read like this:

python
from innernet import Innernet

desk = Innernet().agent("support-desk")      # reads INNERNET_API_KEY
desk.remember("ships on mondays", user_id="cus_8f2a")
desk.recall("when do they ship?", user_id="cus_8f2a")
desk.forget_user("cus_8f2a")
ts
import { Innernet } from "@innernet/sdk";

const desk = new Innernet({ apiKey: process.env.INNERNET_API_KEY! }).agents.of("support-desk");
await desk.remember({ content: "ships on mondays", userId: "cus_8f2a" });
await desk.recall({ query: "when do they ship?", userId: "cus_8f2a" });