Gowshik S
All posts

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.

Published
Reading time
2 minutes
Project
Rio case study

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:

  1. A task is waiting in the Rio Task Queue database.
  2. I say: "Research the top three AI agent frameworks and write a comparison."
  3. The Rio Logs database fills up live, one row per agent step.
  4. The Creative Agent writes a fully formatted Notion page as the final deliverable.
  5. The task's row flips to done.
Video on VimeoWatch the demo on Vimeo

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:

Python
# Every logger.info() becomes this
await memory.log_step("ui_navigator", "browser_step", action, "done")
# → a live Notion row: agent, event, detail, status, timestamp

Notion 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:

Python
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.

Diagram
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 toolset

The only values in .env are the app's own client ID and secret.

Architecture

How Rio works inside NotionYou speak a task. The Orchestrator hands it to three agents. Every step they take is written to Notion as it happens, and the agents can search and create pages while they work. You speak a taskOrchestrator agentpolls the Task Queue, plans, delegatesLive agentvoice in,voice outUI navigatorbrowser anddesktop actionsCreative agentresearch andNotion pagesNotionMemorywrites every step as it happensRio LogsTask QueueMCP toolsetthe agents search, query andcreate pages while they workNotion REST APINotion MCP over SSEYour Notion workspaceconnected with OAuth and PKCE, nothing to set up by hand
Swipe sideways to see the whole diagram. You speak a task. The Orchestrator hands it to three agents. Every step they take is written to Notion as it happens, and the agents can search and create pages while they work.

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.

Code on GitHubGemini-Live-Agent on GitHub

More on how Rio works is in the Rio case study.

An earlier version of this post appeared on DEV