Skip to main content

Documentation Index

Fetch the complete documentation index at: https://docs.tesslate.com/llms.txt

Use this file to discover all available pages before exploring further.

Tesslate OpenSail

Overview

OpenSail is an AI-powered platform for building, running, and sharing agents, full-stack apps, scheduled jobs, webhook handlers, and MCP tools. The system is modular: the same orchestrator drives desktop, Docker, and Kubernetes modes by swapping task queue, pub/sub, database, and container backends behind protocols. This page explains how the components fit together, how data flows at runtime, and how the security model is enforced.

High-level diagram

Component layers

ModuleSourceNotes
App shellapp/src/App.tsxReact 19 router
API clientapp/src/lib/api.tsSSE + fetch wrapper
EditorMonacocode + diff view
Chatapp/src/components/chat/agent message stream
Architecture PanelReact Flowauthors .tesslate/config.json
Kanbandrag-and-drop board

Deployment modes

ModeDatabaseQueuePub/subContainersBest for
DesktopSQLite (aiosqlite)asyncio + apschedulerin-processsubprocess / docker / remote k8sSingle user
DockerPostgresARQ on RedisRedis StreamsDocker ComposeDev, small teams
KubernetesPostgres (cloud: RDS)ARQ on RedisRedis Streamsper-project namespacesMulti-tenant prod
All three are selected by DEPLOYMENT_MODE and wired via factories in orchestrator/app/services/.

Three-tier compute model

The AI agent does not need a full Kubernetes pod every time it reads a file. OpenSail separates operations by cost:
TierWhat runs hereBackendWake time
Tier 0File ops, web calls, agent reasoningIn-process in the worker (FileOps gRPC to CSI)Near zero
Tier 1Shell commandsWarm ephemeral containers from a poolSub-second
Tier 2Full dev environment: multi-container project, live preview, deploysK8s namespace with multiple DeploymentsOn demand, hibernates when idle
About 99% of agent operations run on Tier 0 or Tier 1. Tier 2 is only needed when the user is actively working in the workspace or the agent needs to run the full stack. Hibernation is volume-level: a project snapshot captures the entire btrfs subvolume, then the namespace is torn down. Restore re-hydrates from CAS and brings all containers back together.

Storage: btrfs CSI and Volume Hub

User project data lives on btrfs subvolumes managed by a two-layer system.
Location: services/btrfs-csi/.Runs as a DaemonSet. Responsibilities:
  • Create btrfs subvolumes (instant snapshot-clone from templates)
  • FileOps gRPC for agent Tier 0 file operations
  • NodeOps gRPC for template builds
  • S3 sync via CAS (content-addressed storage)
  • Per-node garbage collection

Agent runner integration

The orchestrator enqueues an AgentTaskPayload built from project state, chat history, git status, and TESSLATE.md. The ARQ worker picks up the task and runs the tesslate-agent loop.
1

Acquire lock

Redis-based distributed lock prevents concurrent runs on the same project.
2

Loop

Each iteration: run the agent, persist AgentStep rows, publish events to the Redis Stream, check for a cancellation signal.
3

Stream to client

The API router subscribes to the stream and forwards events over SSE or WebSocket. The client renders steps in real time.
4

Finalize

On completion: write the final Message, release the lock, optionally fire a webhook for external agent callers.
Progressive persistence means pods can die, browsers can close, and the session is resumable.

Apps subsystem

An app on OpenSail is a versioned, immutable, manifest-described bundle produced from a workspace. Models:
ModelRole
MarketplaceAppIdentity anchor (slug, creator, category, state)
AppVersionImmutable version with manifest, CAS bundle address, approval state
AppInstancePer-user install with wallet mix and update policy
AppSubmissionStaged approval pipeline row (stage0 → stage3 → approved)
YankRequestUnpublish flow; critical severity requires two admins
AppBundleCurated pack of AppVersions
Services: installer.py, publisher.py, submissions.py, yanks.py, runtime.py, stage1_scanner.py, stage2_sandbox.py. See the Publishing Apps guide.

Channels and gateway

Messaging integrations live under orchestrator/app/services/channels/ with the Gateway v2 runner at services/gateway/runner.py. Platforms: Telegram, Slack, Discord, WhatsApp, Signal, CLI. Identity pairing links platform accounts to OpenSail users. Schedules (cron + timezone) deliver agent output to any configured channel. See Communication gateways.

Security model

LayerEnforcement
TransportHTTPS in production; Traefik or NGINX Ingress
SessionJWT with short-lived access + refresh rotation
CSRFDouble-submit cookie with X-CSRF-Token header
Passwordsbcrypt
Secrets at restFernet encryption via SECRET_KEY-derived key (CHANNEL_ENCRYPTION_KEY, DEPLOYMENT_ENCRYPTION_KEY)
RBACTeam, TeamMembership (admin/editor/viewer), ProjectMembership override, AuditLog
Network isolation (K8s)NamespacePerProject + NetworkPolicy enforcing zero cross-project traffic
Agent capabilities.tesslate/permissions.json gates shell, network, git push, file writes; approval prompts for ask policies
Every significant action writes to the append-only AuditLog, keyed by team and project.

Next steps

Configuration

All environment variables with defaults.

Deployment

Path-by-path production guides.

Data flow

Request lifecycle, agent execution, container lifecycle.

Container orchestration

Three-tier compute, PVC lifecycle, snapshots.