Skip to main content

Outcome

Each run of the agent starts by reading two pages: a playbook your team owns and a memory page the agent maintains. Before it finishes, the agent appends a dated entry to the memory page. The next run, from any trigger and in any fresh session, starts with what the previous runs learned. This is the recommended way to give an agent memory. Sessions are disposable and every run boots from a clean template snapshot, so anything written only inside the sandbox is gone when the session ends. A wiki page keeps that memory outside the sandbox. People can read and correct it in the tool they already use, and it is versioned there, without a PR or a template rebuild. If the memory has to live in git, see Agent that opens a PR on your GitHub repo.

Before you start

  • You are an org admin.
  • The agent exists on the roster and has a default template. See Create the agent.
  • You can create an integration in Notion, or an API token in Atlassian, for the account the agent should act as.
  • Two pages exist: a playbook (for example “Support playbook”) and an empty memory page (for example “Support agent memory”). Copy their URLs or ids.

Do it

1

Create a Notion integration and share the pages

In Notion, create an internal integration under Settings > Connections > Develop or manage integrations and copy its secret. Open the playbook page and the memory page and add the integration under Connections. The token can read and write only the pages shared with it.Give it Read content, Update content and Insert content. It needs nothing else.
2

Connect Notion to the agent only

Notion is a built-in provider. In Settings > Context > Tools & MCP, click New tool or MCP server, choose Tool, and pick Notion from the catalog.
Add a provider dialog showing the built-in provider catalog, including Notion

Notion is in the built-in catalog.

On the Notion page, click Add connection. Choose API key, set Scope to Agent, pick the agent, and paste the integration secret into Add a personal API token. Click Connect. Sessions that run as that agent get the token as NOTION_API_TOKEN. No other agent or person receives it.
Connect Notion dialog with API key authentication, Agent scope selected and an agent picker

An agent-scoped connection is used only in that agent's sessions.

1

Write the memory skill

The skill tells the agent where its memory lives and when to read and write it. Create it in Settings > Context > Skills with this SKILL.md, using your page ids. List the provider slug (notion or confluence) under requires.integrations.
2

Attach it to the agent's template and rebuild

Attach the skill to the agent’s default template, then build. Like any skill, it is not in sessions until the template builds.
3

Edit the playbook, not the template

From now on, change how the agent works by editing the playbook page. The next run reads the new version. Template context and skills still need a rebuild or a new session to change. The playbook page does not.

Verify

Run the agent twice, each time in a new session. Ask the first run to note something specific (“remember that refunds over $500 need a second reviewer"). Ask the second run what it knows about refunds over $500. The second run should quote the memory entry, and the memory page should show one new dated entry per run.

Gotchas

  • Notion returns 404 for pages it can see in the UI. The integration has to be added under Connections on each page, or on a parent page. A valid token with no shared pages finds nothing.
  • Dashboard sessions don’t get agent connections. A session you open from the dashboard runs as no agent, so it has no NOTION_API_TOKEN unless you add a personal connection. Test through the agent’s trigger, or with --agent-id.
  • Keep the playbook read-only to the agent. In Confluence, use page restrictions so the bot user can edit only the memory page. In Notion, an integration has the same capabilities on every page shared with it. The skill’s rule and Notion’s page history are your guardrail, or you can use a second read-only integration for the playbook.
  • Memory grows. Have someone prune or summarize the memory page now and then, or tell the agent to read only the latest 50 entries. A long page costs tokens on every run.
  • Confluence updates need the version number. A PUT with a stale version.number returns 409. The agent should read the page, then write right away.

Tools and connections

Providers, connections and scopes, and which connection a run uses.