Rio Inside Notion: An Agent That Thinks Out Loud in Your Workspace
A version of Rio that writes every step of a spoken task into your own Notion workspace as it happens, with no tokens to set up.
Rio is a voice-controlled team of AI agents. You speak a task, and the agents plan it, carry it out on your desktop, research it on the web and write up the result.
This version adds one thing that changes the whole character of the system: every step of that work is written into your own Notion workspace as it happens. Structured, searchable and yours.
Notion isn't a plugin here. It's the place where Rio thinks.
The problem with invisible agents
AI agents are powerful and invisible. They spin up, do the work and disappear. You get a final answer with no record of how it got there: no audit trail, no structured memory, nothing to build on.
I wanted the opposite. Every task an agent claims, every browser step it takes and every report it writes should land in a Notion database while it is happening, not after the fact.
What it looks like
A run goes like this:
- A task is waiting in the Rio Task Queue database.
- I say: "Research the top three AI agent frameworks and write a comparison."
- The Rio Logs database fills up live, one row per agent step.
- The Creative Agent writes a fully formatted Notion page as the final deliverable.
- The task's row flips to
done.
Notion as memory
Every agent writes structured logs as it works. The Orchestrator logs when it claims a task. The UI Navigator logs each browser action. The Creative Agent writes the finished report as a page.
The change in code is one line, and it changes everything:
# Every logger.info() becomes this
await memory.log_step("ui_navigator", "browser_step", action, "done")
# → a live Notion row: agent, event, detail, status, timestampNotion as a tool the agents reason with
Agents don't only write to Notion at the end. They query it while they work. The Orchestrator polls the Task Queue for new jobs, and the Creative Agent searches existing pages before it writes, so it builds on what is already there. That goes through Notion's MCP server:
tools, toolset = await MCPToolset.from_server(
connection_params=SseServerParams(
url="https://mcp.notion.com/sse",
headers={"Authorization": f"Bearer {user_token}"},
),
tool_filter=["notion-search", "notion-create-pages", "query-database"],
)No tokens to set up
An agent that only works with hardcoded tokens is a demo. An agent anyone can connect to their own workspace is a product, so this part was not negotiable.
Rio uses a full OAuth 2.0 flow with PKCE. You click "Connect Notion", approve access, and your token lives in session memory. No database IDs are hardcoded anywhere. The moment you connect, Rio creates its Rio Logs and Rio Task Queue databases in your workspace, so there is nothing to set up by hand.
Connect Notion
→ /oauth/start PKCE verifier generated, redirect to Notion
→ /oauth/callback code exchanged for a token, kept in session memory
→ auto_setup() Rio Logs and Task Queue databases created
→ WebSocket init agents receive NotionMemory and the MCP toolsetThe only values in .env are the app's own client ID and secret.
Architecture
Built with: Python, Google ADK, FastAPI, WebSockets, the Notion REST API, Notion MCP over SSE, async httpx and Google Cloud Run.
What I learned
Building agents is easy. Building agents with observable, persistent memory is what makes them useful.
Moving from logger.info() to await memory.log_step() looks trivial, but it changes what the system is. Rio's work stops being temporary. It accumulates. You can go back to it, search it, build on it and share it.
More on how Rio works is in the Rio case study.
An earlier version of this post appeared on DEV