Mitosis Labs

Memory

Connecting sources

Discover what a user can connect, and hand them a link that does it.

An agent can never connect a source itself. Connecting is an authorization the user performs in their own dashboard. What an agent can do is discover what is connectable and produce the link that takes them there.

That distinction matters when you are writing agent copy: the link only shows the user a page. It grants nothing on its own, so offering it is safe and needs no hedging.

Discover what is available

cortex_connectable_sources takes no arguments and lists the sources this user has not yet connected, with what each one would answer:

{}

cortex_connect_link returns the link for one source:

ArgumentTypeNotes
source_idstringRequired. The id exactly as listed, e.g. google-workspace, github, notion.
link_textstringLink text naming what connecting answers, in the user's own words.

link_text is worth care. "Connect Google Workspace" describes a mechanism; "find the thread where we agreed the launch date" describes what the user gets. The second is the one that gets clicked, so take the phrasing from what they actually asked.

{
  "source_id": "google-workspace",
  "link_text": "search the mail thread where you agreed the launch date"
}

When to offer one

Do not volunteer connect links against every weak result. Offer one when the response explicitly tells you the source is missing: a source_gap or memory_state block, each of which already carries a ready-made cta.headline and cta.url. Those are the moments where connecting genuinely unblocks the user's question rather than interrupting it.

Ingestion is not instant

After a user connects something, ingestion runs in the background. cortex_status reports the backlog. A memory that answers poorly one minute after a large mailbox is connected is not broken. It is still filling.