Memory
One private repo holds what your agents learn and what you save, and every box reads it.

Watch it work
How it works
- Agents learn, or you save a note
- Your private memory repo
- Every box pulls it
- Your next prompt recalls it
Workflows
Shared memory
On with the packNeeds GitHubAgents on every machine read and write one private memory repo, which syncs every five minutes.
Context library
On with the packNeeds GitHubOnce you set context-library.repo to your private notes repo, a prompt about one of its topics gets links to its documents, hedge context searches and saves notes, and every machine pulls the repo every five minutes.
Dream
Off until you turn it onNeeds the Hub packNeeds GitHubEach night, the hub reads the day's agent sessions from every machine and opens one draft pull request that adds to, condenses, and prunes your shared memory.
Read before you turn it on
Every run sends your agent sessions to an analyst model and spends your AI plan's usage, so it starts off. Your session text stays on the hub for 14 days.
What it costs
You need a small private GitHub repo. It syncs every five minutes, and saving a link runs one short agent. Dream, when you turn it on, spends your AI plan's usage each night.
Know before you turn it on
Agents write notes about you and your work into the repo, read it on every prompt, and saving a link writes a note from other people's text into it. Keep the repo private.
Settings7 settings that your agent asks about
memory.repoWhich private GitHub repo holds your agent memory, such as you/agent-notes?Default: from your context repomemory.subtreeWhich folder of the memory repo holds the memory? Leave it empty when the memory is the whole repo.Default: from your context repocontext-library.repoWhich private GitHub repo holds your context library, such as you/notes?Default: from your context repocontext-library.pathWhich folder holds the checkout of your context library?Default: from your context repocontext-library.urlWhich web address opens a document of the library, before its path? Leave it empty for the repo's page on GitHub.context-library.ownerWhose library is it, as the related context names it, such as Sam? Leave it empty for "your library".hub.dreamSessionsHow many sessions may one Dream run send to an analyst model? Each one spends model tokens.Default:150
Add Memory to your Hedge
Paste this prompt into a T3 Code thread on a machine that runs Hedge.
Your install prompt
Add this Hedge pack to my setup with me: Memory. Hedge runs on my hub and my nodes in the cloud, not on my Mac. Run each command of this prompt on the hub, over SSH with the `PATH` line of https://raw.githubusercontent.com/PostHog/hedge/main/SETUP.md when you run elsewhere. Install nothing from Hedge here. Ask me each choice with your question tool, and run every command yourself. 1. Find my hub. List my cloud boxes as step 1 of https://raw.githubusercontent.com/PostHog/hedge/main/SETUP.md does, and run `hedge hub status` over SSH on each one that runs, until one names the hub. Do not ask a `hedge` on this Mac: an earlier setup can leave one here. The name after "The hub:" is the SSH name of the hub. In each SSH command of a note, put that whole name in place of the host that holds `<hub>`. When every box prints "The hub: not named", or no box runs Hedge, I have no hub yet. Tell me, and offer to set one up first with steps 5, 7, and 9 of https://raw.githubusercontent.com/PostHog/hedge/main/SETUP.md. To make a box that already runs Hedge the hub, skip step 5 for it. 2. Run `hedge update` on the hub, so it has the newest engine and packs. Then run `hedge packs` there, and leave out each pack that is already on. 3. Read the setup note of each pack. Ask me what it asks, and collect the flags that it names. Where a note names "the setup command" or "the command in item 2 of step 9", use the `hedge packs` command of this prompt. Do not run a step that a note puts after that command yet. - Memory: ~/.local/share/hedge/engine/packs/memory/SETUP.md 4. Turn the packs on with one command on the hub, and add the flags that the notes name: hedge packs --add memory 5. Do the steps that each note puts after the command. 6. Run `hedge doctor` on the hub, and explain each line. Do each `To do:` line with me, and say what a sign-in is for before it opens. 7. My nodes take the change at their next `hedge update`. To give it to one now, run `hedge update` there.