Please check the build logs for more information.
See Builds for ideas on how to fix a failed build, or Metadata for how to configure docs.rs builds.
If you believe this is docs.rs' fault, open an issue.
Blink (v2.0)
Blink rents hardware-isolated sandboxes for AI agents — built on BoxLite's libkrun VM core.
Product summary: Ephemeral one-shot runs are for try/debug (free tier). Paid tier covers persistent sessions, snapshots, export/import, and warm sessions. Users bring their own Agent and API keys (BYOK). See docs/PRODUCT.md for the full product definition.
Architecture role: Blink is the execution plane. User login, quotas, and Agent consoles live in the control plane (e.g. XEnsemble). See docs/XENSEMBLE.md for integration.
Architecture
- blink-sdk: Rust library for agent execution via BoxLite
LiteBox+ BLIN V-Hub protocol (crates.io) - blink-cli: Host CLI (
run,session,serve) - blink-server: Sandbox REST API for control-plane consumers (
:8787) - V-Hub: 20-byte BLIN header over vsock port
10000(seedocs/COMMUNICATION_ARCH.md)
Prerequisites
- Rust 1.88+
- macOS:
brew install llvm lld(libkrun cross-compilation); build withPATH="/opt/homebrew/opt/llvm/bin:$PATH"
BoxLite is pulled from crates.io automatically. For local BoxLite development, add a [patch.crates-io] section in Cargo.toml.
Build
Binaries: target/debug/blink-cli, target/debug/blink-server
Usage
# Free tier: one-shot ephemeral run (agent binary or script on host)
# Paid tier: named session with persistent disk + snapshots
# V-Hub (vsock bridge wiring)
Rust SDK
Add to Cargo.toml:
= "0.2"
use ;
async
Sandbox API (for control planes)
PATH="/opt/homebrew/opt/llvm/bin:"
# http://127.0.0.1:8787 — service status page + REST API
XEnsemble integration: docs/XENSEMBLE.md
Blink 不做 API 鉴权。用户身份与配额由控制面(XEnsemble)负责;Blink 默认只监听 127.0.0.1,生产环境通过内网或 sidecar 暴露:
# 默认 localhost:8787
# 内网暴露(需确保网络隔离)
BLINK_BIND=0.0.0.0
REST endpoints
| Method | Path | Description |
|---|---|---|
| GET | /api/health |
Health check |
| GET | /api/product |
Feature flags |
| POST | /api/runs |
Queue ephemeral or session run (script = host path) |
| GET | /api/runs/{id} |
Poll run status |
| GET | /api/sessions |
List sessions |
| POST | /api/sessions |
Open session ({name, warm?}) |
| POST | /api/sessions/{name}/runs |
Run agent binary in session (script = host path) |
| POST | /api/sessions/{name}/checkpoints |
Create snapshot |
| GET | /api/sessions/{name}/checkpoints |
List snapshots |
| POST | /api/sessions/{name}/checkpoints/{snap}/restore |
Restore snapshot |
| POST | /api/sessions/{name}/export |
Export to .boxlite |
| GET | /api/exports/{filename} |
Download export |
| POST | /api/import |
Multipart upload (archive, optional name) |
| POST | /api/sessions/{name}/stop |
Stop VM |
| DELETE | /api/sessions/{name} |
Remove session |
Publishing to crates.io
# Publish shared types first, then the SDK
CI publishes both crates on git tags matching v* (see .github/workflows/publish.yml).