# Septena’s architecture

> Native apps, one server and one private task store for each account. How the parts fit, and where sync and agents meet.

Septena has native apps, one server and one private task store for each account. This page shows each part and what it does.

## Overview

| Part | What it does |
| --- | --- |
| Apps | A native app for each device, and Septena in the browser at `web.septena.app`. Each keeps a copy of your tasks on the device. |
| Shared core | `septena-core`, written in Rust: the task rules and the sync decisions, in one place for the native apps. |
| Server | One Cloudflare Worker at `api.septena.app`: the sync API, the MCP server for agents and sign-in for agents. |
| Task store | One Cloudflare Durable Object for each account, with its own SQLite database. A shared project has a store of its own. |
| Files | Attachments are kept in Cloudflare R2. |
| Site | Static pages on `septena.app`, each with a Markdown twin. |

## The apps

Each app is built with its own platform’s tools. It keeps a copy of your tasks in a store on the device and writes every change there first, so the change shows at once. Then it sends the change to the server. Every app signs in to the same account.

The apps and the server are open source under the MIT License, in one repository: [github.com/septena/septena](https://github.com/septena/septena).

## The shared core

The task rules live once, in a Rust library called `septena-core`. It decides which list a task belongs in, when a task fades, how a repeat makes its next task, and when a reminder fires. It also makes the sync decisions: how a page of changes from the server merges with changes still waiting on the device, and what happens when the server refuses one change.

The core does no input or output. It has no network, no storage, no clock and no secrets. The app passes in the time and the rows, and applies what the core returns. The native apps link a released build of the core, so every app follows the same rules.

## The server

`api.septena.app` is one Cloudflare Worker. It serves the API the apps sync with (`/v1`), the MCP server for agents (`/mcp`), sign-in for agents (`/oauth` and `/.well-known`), and two guides for agents (`/skill.md` and `/onboard.md`). The [domains page](https://septena.app/developers/domains) lists every address.

The MCP server speaks both the stateless MCP revision `2026-07-28` and the older `initialize` handshake. It decides which one for each request, so older clients keep working.

## One task store for each account

Each account has its own task store: a Cloudflare Durable Object with its own SQLite database. Every write for that account goes through this one store, one write at a time, whether it comes from an app or from an agent. The store also keeps a log of changes, with who made each one and why.

## How sync works

An app sends its changes to the server (`POST /v1/sync/push`) and asks for the changes made since its last cursor (`GET /v1/sync/pull`). When the server refuses one change, it says why, and the app sends the rest. An open app can also hold a live connection (a WebSocket), so it hears about a change at once and pulls it.

## Where sync and agents meet

An agent works in the same task store as the apps. It connects to `/mcp` with OAuth after the person approves the connection, or it uses an agent key that the person makes in the app. An agent’s writes go through the same store as a tap in the app, so they reach every device through the same sync, within seconds.

The rules for agents are kept in the store, so they hold for every caller:

- An agent claims a task before it works on it. The claim has a time limit, and the agent renews it while it works.
- A question from the agent to the person ends its claim. The person answers in the task’s conversation.
- The person can stop agents on one task or pause all agents. Only the person can undo that.
- When the agent is done, the task goes to the person’s Review list. Only the person accepts it or sends it back.

An agent finds new work through an event list with a cursor (`tasks_agent_events`), a live stream or a webhook. The [agent guide](https://septena.app/agents) has the whole loop.
