/community/guides/agent memory
innernet
docsskillscommunitycompanydeveloperssecurityprivacytermscontact

agent memory · step 3 of 8

make one from the terminal

one command in your agent's folder makes the agent and its key, puts the key straight into .env and keeps it out of git. then set what it may do with you, try it, and watch what it keeps, without leaving the terminal.

/community/guides/agent-memory-from-the-terminal
3 of 8
step 1 of 83 minmeet agent memoryevery agent you build or use, from a support bot to Grok Bot, Hermes or OpenClaw, can keep a memory of its own. what that memory is, the three ways to make one, and the film of it working. start here.
step 2 of 83 minmake one on the dashboardthe easiest way in, even if you have never wired a memory before. connect an agent in the agents space, paste one block into the ai you code with, and watch it remember.
step 3 of 83 minmake one from the terminalone command in your agent's folder makes the agent and its key, puts the key straight into .env and keeps it out of git. then set what it may do with you, try it, and watch what it keeps, without leaving the terminal.
step 4 of 83 minmake one from any chatany ai connected to innernet can make and run your agents for you. say what you want in plain words, teach the agent one thing and ask it back before any code runs, and let a coding agent wire it in end to end.
step 5 of 84 minwire it into your codean agent's memory is two small calls, one before it answers and one after. here they are in curl, typescript and python, ready to copy, with the one rule for agents that talk to many people, and what comes back.
step 6 of 84 minyour personal agentsGrok Bot, Muse, Hermes, OpenClaw and Instinct, each on one memory. how to connect every one of them, what each can do once it's in, and how to give a personal agent a memory of its own.
step 7 of 83 minwhat it may do with youone choice decides how far an agent goes with you, sealed, asks first or trusted, and four lines say exactly what gets in and out. what it learns about you waits for your yes, and only you can give an agent more of you.
step 8 of 84 minsee everything it keepsan agent's memory is never a black box. its own page shows what it keeps, sorted by kind, every call it made, what its memory did for it, its keys, its sub-agents and the people it serves, and every setting is yours to change.

if your agent's code lives in a folder on this machine, the terminal is the shortest way in. you need Node 18 or newer. nothing to install: npx runs innernet's command line straight from npm.

1. sign in, once

if you've run npx innernet on this machine before, you're signed in already. if not, this opens your browser once:

npx innernet login

2. make the agent

go to the folder your agent lives in, and run:

npx innernet agents new "support desk" --purpose "answers our customers about their orders" --people

it makes the agent and its first key, writes the key into .env at the root of the repo as INNERNET_AGENT_KEY (readable only by you), adds .env to .gitignore so it never gets committed, and never prints the key.

one command: the agent, its key in .env, and what to say next
one command: the agent, its key in .env, and what to say next

run it with no name and it asks you, one question at a time. the flags, if you'd like them:

flagwhat it does
--purpose "…"what it does, and what it must never keep, in a sentence
--peopleit talks to other people (customers, a server). what it keeps about them never leaves it
--access "asks first"sealed, asks first (the default) or trusted
--home <project>live in one of your projects, instead of a new one made for it
--env <file>the env file the key goes into (.env at the repo root, unless you say)
--printshow the key once instead of writing it anywhere

3. wire it in

the command ends by telling you the one line to say to the ai you code with, in this folder:

give my agent a memory: innernet.live/skills/agent-memory/raw. its key is in INNERNET_AGENT_KEY.

Claude Code, Cursor or Codex reads the link, finds where your agent answers, and adds the two calls. to write them yourself, see wire it into your code.

4. try it, before any code runs

the key is in .env, so you can teach the agent one thing and ask it back, right here. load the key into this terminal:

set -a; . ./.env; set +a

teach it something:

curl https://innernet.live/api/v1/agents/me/memories \
  -H "Authorization: Bearer $INNERNET_AGENT_KEY" \
  -H "content-type: application/json" \
  -d '{"messages": [{"role": "user", "content": "refunds take five working days, and we never refund gift cards."}]}'

then ask what it would read before answering a question about refunds:

curl https://innernet.live/api/v1/agents/me/context \
  -H "Authorization: Bearer $INNERNET_AGENT_KEY" \
  -H "content-type: application/json" \
  -d '{"query": "can i get my money back for a gift card?"}'

the answer's text is what your agent puts in its prompt: what it knows, dated, best first.

teach it one thing, then ask it back: the text it reads before it answers
teach it one thing, then ask it back: the text it reads before it answers

5. watch it, and look after it

commandwhat it does
npx innernet agentsthe agents you keep, with their access and how much each keeps
npx innernet agents show support-deskwhat it may do with you, its keys, and what it kept last
npx innernet agents watch support-deskits memories as they come in (ctrl-c to stop)
npx innernet agents access support-desk trustedsealed, asks first or trusted
npx innernet agents key support-deska new key into .env. --list shows them, --revoke <id> ends one
npx innernet agents pause support-deskit keeps nothing new until you resume it
npx innernet agents remove support-deskremoves it, with its memory and keys, once you type its name back
watch it keep things as your agent runs
watch it keep things as your agent runs

trusted asks you first. anything deeper than asks first (reading your personal memory, filing what it learns about you on its own) is yours alone to give. the terminal makes the rest of the change, then opens a link in your browser. say yes there, signed in, and the terminal sees it land. what it may do with you has the whole of it.

next

the same, from a chat: make one from any chat.



every chapter

the fundamentals5 guidesconnecting your ai5 guidesagent memory8 guidesthe dashboard4 guidesfor builders2 guidessharing3 guides

one memory, every ai tool.

innernet is memory your ai tools read live: every project, every decision, every skill, in one place, connected once.

start your innernetevery guide