Cattt
An iOS companion app
Tuanzi lives in a 3D felt yard, where it can chat, sit with the user and remember earlier conversations. Requests to work through ideas continue in the background, with results brought back into the conversation.
GitHub repository (opens in a new tab)On this page
- Built
- iOS app · 3D world · Agent backend
- Stack
- SwiftUI Three.js Hono PostgreSQL Redis
Product film
Read the video description
The film opens in Tuanzi’s 3D yard. In chat, the user asks Tuanzi to plan a relaxed half day with a walk and some time to draw. Tuanzi acknowledges the request. A worker drafts the plan, saves three checkpoints, and submits a report. The router checks consent and conversation context, then sends a chat message letting the user know a letter is ready. The user returns to the yard and opens the letter to read the plan and its rainy-day alternative.
More demos
Walk to the pond
Ask Tuanzi to wait by the pond. Tuanzi walks there through the yard, and the app reports its arrival to the backend.
Sit with me
An invitation starts a sit-together action. The yard chooses a seat, and the app confirms that Tuanzi has settled beside the pond.
Remember a preference
Ask Tuanzi to remember that turquoise is your favorite color. Open Long-term Memory to see the saved preference and its original message.
The yard, chat and diary
Tuanzi follows its own routines in the yard. The yard is the home screen, chat opens over the scene, and the mailbox leads to the diary. The project includes SwiftUI screens, Three.js scenes and character actions, and a backend for chat, memories, agreements and delegated requests.
Keeping chat and background work separate
The user can keep chatting after asking Tuanzi to work through an idea. A separate Worker process handles that work. The Router stays in the API process with chat, receives the report and decides when and how to respond.
- Router · Responses
- Uses recent chat, background reports and current permissions to compose and publish replies. The Router also handles follow-ups when agreements become due.
- Worker · Execution
- Receives memory extraction, diary and delegated tasks through pg-boss. It saves a checkpoint after each tool step and submits a structured report for the Router to respond to.
- iOS client
- SwiftUI hosts chat, diary and memory controls, with replies received over SSE. The yard and chat share a single 3D world embedded in a WKWebView.
- 3D world
- Three.js handles pathfinding, poses and scene interactions. A two-way bridge carries state, commands and action results.
PostgreSQL stores conversations, memories, agreements and execution records, with Drizzle for data access. Redis Streams temporarily stores response events; conversation locks coordinate concurrent work.
In development. Images are from recorded iPhone checks; the architecture description is based on the current code.

