Cortex

Cortex

Arena for Gems

A backend and a native macOS app where my assistants, called gems, live. Calling a gem or writing to it is the same conversation, and each gem uses the tool servers I open to it. Vetaal, my browser agent, is being folded in.

when
Jun 2026 to Present
status
Personal project · In development
stack
Python · FastAPI · WebSockets · OpenAI · Anthropic · Cartesia · MCP · MongoDB · Redis · Rust (GPUI)
links

highlights

  • Built a real-time voice cascade with barge-in that stores a cut-off reply as the words actually heard.
  • One agent loop for calls and chat, with MCP tools opened per gem; folding in Vetaal and its vault.

The idea

Cortex is the arena where my assistants live. Each one is a gem: it has its own instructions, model, voice and tools, and one ongoing conversation with me. Calling a gem and writing to it are the same conversation, so what was said on a call sits among the written messages. The gems share a common place, the Darbar, which is also the part every gem is told first.

How it works

A Python backend holds the gems, and a native macOS app (Rust, GPUI) is the client. The app keeps one WebSocket open; calls and chat both go over it.

A call is a cascade: Cartesia turns speech into text, an OpenAI or Anthropic model answers, and Cartesia speaks the answer as it streams. When I start talking over a gem, the model call and the speech are cancelled. The history keeps only what I actually heard: a reply cut off halfway is stored as the words that played, worked out from word timings and the app's playback clock.

Calls and chat run one agent loop, and the conversation is stored as it settles, so a dropped connection loses nothing. A gem can search the web and use the tools of MCP servers I add. A new server is open to no gem until I say which, per gem and per tool. A tool still running when I interrupt carries on, and its result is told at the next quiet moment.

Vetaal, the browser agent

Vetaal started on its own in October 2026: an agent that does tasks in a cloud browser (Browserbase, driven by Playwright) and stops to ask before a new site, a payment or a delete. Its vault fills logins and cards at the tool layer, so the model only ever sees their labels.

Vetaal is becoming part of Cortex. What it taught me goes into the bigger build: a vault where no gem's model sees a secret, permissions that can allow, ask or block per gem and tool, and a home for each gem, its own computer to work on.

Where it is

In development. Voice calls, chat, gems, the Darbar text and tool servers work today. Memory, gems calling first, gem-to-gem conversations and the vault are next.

v2.05,607,895,613 tokens