- se·rang·kai
- Ind. n. a set of things joined together
- rang·ka
- n. a frame; the structure that holds something
A home for the work your agents make.
Serangkai is a self-hosted workspace where you and your AI agents publish reports, dashboards, diagrams, charts, and small HTML apps. Agents write over MCP with scoped, revocable access. You browse, organize, version, and share from the web. Everything starts private.
Demo login: serangkai / serangkai
- MIT licensed
- One container
- SQLite + local files
- MCP + REST
- OAuth 2.1 + PKCE
01 How it comes together
From a tool call to a page you keep.
An agent publishes over MCP
It calls create_rangka at /api/mcp with a token you approved. Reports, charts, and diagrams arrive as Markdown; a custom tool arrives as HTML.
Each piece settles into its own frame
Every rangka gets a page, a folder, a version history, and the renderer that suits it. All of it starts private.
You organize and share
Edit, move, or restore an older version from the web. When someone else should see it, make a signed unlisted link or publish it.
02 What a rangka can be
Whatever the agent makes, it gets a frame.
Markdown looks finished without any styling. When a piece needs its own code, HTML and static web apps run in a sandbox. Each one is a rangka with its own page, folder, and history.
Fig. 1
Reports and documents
Headings, tables, callouts, cards, tabs, and timelines render finished, with no CSS from the author.
type: markdown
Fig. 2
Declarative charts
Bar, line, and area charts from a small JSON block inside Markdown. No chart code to ship.
tanstack chart JSON
Fig. 3
Diagrams
Flowcharts, sequence, architecture, and state diagrams, written as Mermaid text.
```mermaid
Fig. 4
Your own HTML and JavaScript
Custom dashboards and small tools run in a sandboxed iframe with a restrictive CSP. The Selaras document theme is there if you want it.
type: html
Fig. 5
A built frontend, as it is
Upload an existing Vue, React, or plain static build as a bundle. It is served in the same sandbox.
type: bundle · REST upload
Fig. 6
PDFs and images
Keep the source documents next to the work that explains them, in the same folders.
type: pdf · image
03 Agents, with permission
Agents work with keys you can take back.
Serangkai is its own OAuth server. An agent asks, you approve exactly what it may do, and you can withdraw that at any time. A browser session never authorizes MCP.
- OAuth 2.1 with PKCE
- Clients find Serangkai from a 401 and send you to a consent screen. Nothing secret is pasted into the client.
- Device codes for headless clients
- From SSH, a container, or CI, approve a short code at /oauth/device in any browser.
- Scoped and revocable
- OAuth grants are capped at read and write. Tokens are hashed at rest, can expire, and can be revoked at any time.
- Private by default
- Only the owner sees a rangka until it is shared. Unlisted links are signed, and read-only tokens cannot create them.
- Sandboxed code
- HTML and JavaScript run in a sandboxed iframe with an opaque origin and a restrictive CSP.
- One owner, no sign-up
- The account comes from environment variables. There is no public registration.
No silent overwrites.
A content change carries the version the agent read. If you edited in the meantime, the write is refused with the current version, and the agent re-reads and merges.
- v1research-agentcreate_rangkaFirst draft
- v2Youweb editorRewrote the summary
- 409research-agentupdate_rangka · baseVersion 1Refused: the current version is 2
- v3research-agentupdate_rangka · baseVersion 2Re-read v2 and merged onto your edit
04 On your own server
One container. Your disk.
The default install is a single Docker container with SQLite and local files. No external services to run. Mount a volume, set four variables, and sign in.
docker run -d -p 3000:3000 \
-v serangkai-data:/data \
-e ADMIN_USERNAME=admin \
-e ADMIN_PASSWORD='choose-a-strong-password' \
-e JWT_SECRET=$(openssl rand -base64 32) \
-e SHARE_SECRET=$(openssl rand -base64 32) \
ghcr.io/sewadahapp/serangkai:latestOne volume
The SQLite database and every uploaded file live under /data. It is the only persistence the container needs.
One owner
The username and password create the single owner account. There is no sign-up flow.
Two stable secrets
JWT_SECRET seals browser sessions and SHARE_SECRET signs unlisted links. Keep both across redeploys.
Where it runs
Docker
Default- Rows
- SQLite on /data
- Files
- Local disk on /data
One container on the Bun runtime, with a healthcheck at /api/health.
Deployment guide for DockerCloudflare Workers
- Rows
- D1 or Turso
- Files
- R2 or Backblaze B2
Deploy your own fork in any of four combinations, and update it with Sync fork.
Deployment guide for Cloudflare WorkersVercel
- Rows
- Turso
- Files
- S3-compatible storage
Node runtime. Its filesystem is temporary, so data lives in Turso and object storage.
Deployment guide for Vercel
Turso and S3-compatible storage, including Backblaze B2, can be chosen on any runtime.
05 Try it
Bring the pieces together.
Open the demo workspace and look around, or read the getting-started guide and have your own instance running in a few minutes.
Demo loginserangkai.onrender.com
- Username
- serangkai
- Password
- serangkai
A shared, disposable sandbox that anyone can sign into, so don't store anything sensitive. The first load can take a moment.
Open source under the MIT license.