Build on Aipokit
A REST API and a Workspace MCP surface over one governed core — the same operations behind Studios and Ask (the in-product AI assistant). Point a REST integration or an external agent at a workspace and it can author files, run processes, manage media, and publish — under the same risk tiers and approvals. WebDAV authoring mounts workspace folders for local tools; reindex so graph and search stay current. Self-hosted multi-user software, per-account isolation, no private back door for agents.
Surfaces for integration
One action = one service function — exposed identically to the UI, the REST API, and agents over MCP.
Architecture
A lean file-and-media kernel, a memory graph, an agent runtime, and a process engine.
Quickstart
Get a workspace, author or import files, and point an agent at it — three steps.
API & MCP
REST is the stable contract; Workspace MCP is a thin agent adapter over the same ops as Ask (in-product AI).
Agent integration
Bring your own agent — Claude, Hermes, OpenClaw, or a custom loop — over MCP. Same policy as Ask (in-product AI).
Self-hosting
Docker image, one private authoring node plus N public delivery nodes, DB-per-account.
Parity model
No fake success and no private back doors — every surface calls the same shared service.
A lean core, rich surfaces.
At the centre is a file-and-media kernel with a memory graph, an agent runtime, and a process engine. Studios are SPA authoring surfaces layered over the same service contracts — a clear shell over a truthful core. End-user output is published as static, SEO-safe pages that never depend on an authoring bundle to render.
Architecture
The Stack
| Layer | Technology |
|---|---|
| Language | Rust (stable) |
| Web Framework | Axum 0.8 |
| Templates | Askama 0.13 (SSR, type-safe) |
| Database | SQLite via sqlx (compile-time checked) |
| Sessions | tower-sessions 0.14 + SQLite store |
| Auth | OIDC (Casdoor recommended) |
| CSS | TailwindCSS v4 + DaisyUI |
| Video | FFmpeg (HLS) + MediaMTX (RTMP) |
| Observability | OpenTelemetry 0.31 + OTLP/gRPC |
Workspace Crate Architecture
Aipokit is a Cargo workspace with 34 crates organized by domain:
crates/
common/ # Shared types, storage, database
media-core/ # Media detection, EXIF extraction
media-manager/ # Upload, serve, search, CRUD
video-manager/ # HLS transcoding (8-stage pipeline)
access-control/ # 4-layer permission model
access-codes/ # Shareable access links
access-groups/ # Team roles and invitations
user-auth/ # OIDC + session management
workspace-manager/ # Workspace browser and folder types
vault-manager/ # Storage vault isolation
site-generator/ # Astro site generation
course/ # Course viewer + presentations
...and 22 more
The Dual-Use Pattern
Every app crate implements the FolderTypeRenderer trait for embedded mode (inside workspace browser) and exports a Router for standalone mode (own URL). Same logic, same templates, two deployment modes.
Storage Layout
storage/
workspaces/{workspace_id}/ # File browser content
folder-a/ # Regular folder
media-gallery/ # Typed folder (media-server)
vaults/{vault_id}/ # Media pipeline storage
media/
images/{slug}.webp
videos/{slug}/index.m3u8
documents/{filename}
thumbnails/
images/{slug}_thumb.webp
videos/{slug}_thumb.webp
Rate Limiting
Three tiers based on resource intensity:
| Tier | Limit | Endpoints |
|---|---|---|
| Default | 60 RPM | Most API endpoints |
| Upload | 15 RPM | File upload, transcoding |
| Serving | 300 RPM | Media delivery, thumbnails |
REST is the contract surface
The REST API is the stable, versioned way to drive the platform from any language or integration. The Workspace MCP server is a thin agent adapter that maps directly onto the same operations — no parallel implementation, no drift. Whatever a Studio can do, the API can do; whatever the API can do, an agent can do over MCP.
Bring your own agent
External agents — Claude Desktop, a custom loop, or anything that speaks MCP — connect to a workspace and operate it directly: read and write files, run and supervise processes, manage media, and publish output. The agent works against the same governed operations people use, scoped to an account and its files, with the memory graph as context.
Three steps to your first workspace.
Runs on your infrastructure
Ship it as a single Docker image. Run one private authoring node plus any number of public delivery nodes, federated over a single code path and kept in sync. Every account is a database-per-account isolation boundary — data residency and sovereignty are the default, not an add-on.
Start building.
Explore the architecture, connect an agent over MCP, and run a workspace on infrastructure you control.