Skip to main content
Glama
Super Tower
by VitaCrew
README.md
<div align="center">

<img src="docs/assets/super-tower-logo.png" width="120" height="120" alt="Super Tower logo">

# Super Tower

### A self-hosted data tracker for AI agents, apps, and devices

Connect AI agents over MCP and send data from your own apps and devices over HTTP. Keep records, plans, and goals on a server you control.

**Made with โค by [VitaCrew](https://github.com/VitaCrew)**

[![GitHub Pages](https://github.com/VitaCrew/Super-Tower/actions/workflows/pages/pages-build-deployment/badge.svg?branch=gh-pages)](https://github.com/VitaCrew/Super-Tower/actions/workflows/pages/pages-build-deployment)
[![License: GPLv3](https://img.shields.io/badge/license-GPLv3-blue.svg)](LICENSE)

๐Ÿš€ [Quick Start](#quick-start)&ensp;โ€ข&ensp;๐ŸŒ [Interactive Data Flow](https://vitacrew.github.io/Super-Tower/#demo)&ensp;โ€ข&ensp;๐Ÿ“š [Docs](https://vitacrew.github.io/Super-Tower/docs/)&ensp;โ€ข&ensp;๐Ÿค [Contributing](#contributing)

</div>

<a name="run-locally"></a>

<a name="quick-start"></a>

## ๐Ÿš€ Quick Start

Run Super Tower locally with Docker Compose. The default stack starts the NGINX gateway, the Super Tower API, NATS JetStream, and PostgreSQL with TimescaleDB.

```sh
git clone https://github.com/VitaCrew/Super-Tower.git
cd Super-Tower
cp .env.example .env
```

Replace the database password and the two service bearers in `.env` with distinct secrets, then start the stack. See [Installation](#installation) for MCP authentication and remote access.

```sh
docker compose up --build --wait
curl --fail http://127.0.0.1:17842/healthz
```

<a name="connect-an-ai-agent"></a>

## ๐Ÿ’ก Getting Started

Try the [first MCP record walkthrough](docs/first-record.md). It covers authorizing a client, writing a synthetic reading session, and checking that the same record comes back.

The health check confirms that the gateway is running. To work with personal records over MCP, first [configure identity, domain access, and client consent](services/watch-tower-api/openfga/README.md).

- [Connect an AI agent over MCP](docs/generic-event-ingestion.md#connect-an-ai-agent) and discover the registered data types it can use.
- [Register or claim a source](docs/generic-event-ingestion.md#connect-a-device-or-gateway), then send events or samples over HTTP. For another protocol or broker, [connect an external adapter](docs/generic-event-ingestion.md#connect-an-external-adapter).
- [Import a normalized file export](docs/generic-event-ingestion.md#submit-agent-normalized-source-records) or [set up a background collector](docs/generic-event-ingestion.md#connect-a-background-runtime).
- [Use Timetable](GLOSSARY.md#timetable) to connect plans with actual records and track recurring goals.
- [Define follow-up rules](docs/generic-state-machines.md) that react to new records and events.

## ๐ŸŒ Introduction

Super Tower is an open-source, self-hosted tracker for the data you log with AI and the data that comes from devices, apps, and files. It gives your AI clients access to a shared timeline of records, plans, and goals through MCP.

See how an agent can [link a completed workout to its plan](example/workout-plan-and-actual.md) or [track study time against a weekly goal](example/study-timetable.md). The [example library](example/README.md) uses fictional scenarios to show what an agent can read or write with the appropriate permissions.

---

## ๐Ÿš€ Key Benefits

- **One timeline across your tools.** Read what you planned and what happened in the same view, even when different apps recorded them.
- **Collection between conversations.** Devices and authorized collectors can keep sending data after an AI session closes.
- **Progress you can act on.** Measure what counts toward a goal and queue a follow-up when a rule calls for one.
- **Control over access and retention.** Choose which clients can use each domain and how long its data is kept.

---

## โœจ Features

### ๐Ÿ” Identity & Access

- MCP access uses a linked OIDC identity, active client consent, and domain-level reader or writer relationships in OpenFGA.
- Source credentials bind a source to a subject, domain, and permitted event, record, and sample types. A short-lived, single-use claim code lets a device or collector obtain its token. Revoke the connection to block subsequent source requests.

### ๐Ÿ”Œ Connectivity

- **MCP and HTTP uploads.** The Compose gateway forwards `/mcp` and source-authenticated uploads at `/ingest/v1/events` and `/ingest/v1/series` directly to the API.
- **Streams, queues, and device protocols.** External adapters map incoming messages to registered events or samples and send them over HTTP with the source credentials. [Connect an external adapter](docs/generic-event-ingestion.md#connect-an-external-adapter)
- **External collection.** External clients normalize provider data and submit it through the shared API. A managed source can write and reconcile its own records. [Source connections](docs/generic-event-ingestion.md#connect-a-background-runtime)
- **File imports.** Convert supported activity exports and reference catalogs into the shared record and sample formats, then submit them with their source identity and retry keys. [Import workflow](docs/generic-event-ingestion.md#submit-agent-normalized-source-records)

### ๐Ÿ“ฆ Records & Data Types

- Domain-scoped JSON Schemas for events, revisioned records and their items, plans, and time-series samples. Preserve upstream identity and revisions when reconciling imported records.
- Query records by ID or payload fields and samples by time range and source. Reuse stable request keys to retry event and sample batches.
- Apply per-type retention, erase records or subjects, and reapply an erasure manifest after restoring a backup. [Data and permissions](docs/data-and-permissions.md) ยท [Erasure and backup restore](docs/privacy-erasure-and-backup-restore.md)

### ๐Ÿ—“๏ธ Plans & Goals

- One-off plans and occurrences generated from recurring actions, with actual records and events linked to their plans.
- Optional response windows and per-type plan requirements for linked records and events.
- Daily or weekly goals measured by counts, totals, check-ins, or plan completion.
- Record summaries with CEL filters, daily grouping, sums, and maxima.

### โš™๏ธ Processing & Automation

- CEL state machines evaluate events and record revisions. The journal supports replay and excludes expired or erased inputs along with state that depends on them.
- The record-rule queue retries transient database failures up to eight total attempts. Operators can inspect exhausted retries in processing alerts. [CEL state machines](docs/generic-state-machines.md#input-processing)
- Matching rules and unmet closed-period goals can queue follow-ups for registered roles. External Workflow workers claim and execute them, renew their leases, and acknowledge cancellation when needed. [Workflow delivery](docs/runtime.md#workflow-delivery)

### ๐Ÿš€ Deployment & Operations

- The default Compose gateway listens on loopback port `17842`. Change it with `WATCH_TOWER_HOST_PORT` or put an HTTPS reverse proxy in front of it for remote access.
- JetStream durably queues validated events. The writer acknowledges delivery after the PostgreSQL transaction commits. Series batches commit in PostgreSQL during the request. [Runtime and test commands](docs/runtime.md)

---

## Installation

Use the [local startup guide](docs/runtime.md#local-startup) to configure `.env` before running Compose. Personal-record access also requires OIDC, OpenFGA, and an HTTPS endpoint for remote MCP clients. [Runtime configuration](docs/runtime.md) ยท [Authorization setup](services/watch-tower-api/openfga/README.md)

## Documentation

[Super Tower Docs](https://vitacrew.github.io/Super-Tower/docs/)

## Contributing

Report bugs and propose changes in [GitHub Issues](https://github.com/VitaCrew/Super-Tower/issues). Include reproduction steps and the intake path when a report concerns ingestion. If you tried the Quick Start, share your result using the [first setup feedback form](https://github.com/VitaCrew/Super-Tower/issues/new?template=first-setup.yml).

## License

Super Tower is licensed under the [GNU General Public License v3.0](LICENSE).