lightspeed README

The project's README from github.com/smartcomputer-ai/lightspeed. As one markdown file: README.md.

Lightspeed logo

Lightspeed

Run thousands of agents. Efficient, durable, auditable.

Lightspeed is open-source infrastructure for running managed agent fleets as durable workflows.

"Managed agents" is an emerging pattern that separates the core agent loops from the VM or sandbox they use. Agents survive restarts, can run for months, and stay cheap when idle. When they need an operating system, they borrow a real machine for as long as the task requires.

Lightspeed software factory with a fleet of specialized bots and an implementer supervising a sub-agent

Lightspeed's Rust core runs on Temporal today and stores production data in Postgres with optional S3. The frontend is TypeScript and React.

Why Lightspeed?

Lightspeed aims for the capability of Claude Code, Codex, and OpenClaw without requiring one operating system per agent.

Most frontier harnesses live inside a guest OS, which makes them difficult to scale and secure. Hence the emerging pattern to "separate the harness from compute" or the brain and hands split. This is especially useful in enterprises with more stringent supervision and scaling requirements.

So, in Lightspeed, the harness (the agent loop, context, and session state) runs as a lightweight durable workflow. Shells, code execution, and full filesystems run on machines attached only when needed. One worker can therefore manage hundreds of agents.

Comparison: traditional infrastructure runs one agent per full VM, while Lightspeed packs many durable agents into one worker and attaches VMs or sandboxes only when needed

What you can build with Lightspeed:

Quick start

You need Rust with edition 2024 support, Node.js 24 or newer, and Docker with Compose. Then start the complete local product:

./dev.sh

You can set the LLM API keys directly in the UI. But you can also set them via environment variable:

cp .env.example .env
# Set OPENAI_API_KEY or ANTHROPIC_API_KEY in .env
# Then restart ./dev.sh

When the readiness checks pass in the CLI, open http://localhost:5173/app/ and sign in with the development account printed by the launcher. The defaults are [email protected] and lightspeed-dev-password.

The launcher installs dependencies, starts local infrastructure and application processes, applies migrations, and waits until the product is ready.

For other development profiles, service addresses, resets, and live tests, see the local development guide. See Environment variables for environment variables.

Features

Lightspeed covers the table stakes of a modern agent harness. Everything below works today.

Models & providers

Agent capabilities

Bots & channels

Durability & scale

Borrowed compute

Security & auth

Design

In Lightspeed, every agent is driven by an event-sourced, deterministic core. The runtime replays the session log, decides the next step, and emits effect intents that adapters execute against LLM providers and tools. The core itself performs no I/O, which makes it a natural fit for durable workflow engines.

Two more decisions make this practical inside a workflow engine:

  1. Minimal provider abstraction. The core extracts only the facts needed to make decisions; provider-native data stays opaque and blob-backed.
  2. Offloading to CAS. Large payloads live in content-addressed storage, keeping workflow histories small. Blobs nothing reaches any more are collected after a grace period, so deleting sessions frees their storage.

The architecture walkthrough introduces the system. Continue with the agent loop and durability, context and storage, and tools and controller workflows to understand better how everything works and fits together.

Lightspeed architecture: clients reach a session workflow holding the deterministic core inside Temporal; thin effect intents and result refs cross to activities that talk to LLM providers and borrowed compute; both sides share a session log and CAS

Development checks

cargo test
npm run check

See Testing and evaluation for focused checks, replay coverage, live-test prerequisites, and model evaluations.

Documentation

Preview the Starlight manual with npm run dev:docs.

Contributing

See CONTRIBUTING.md

License

Apache 2.0

lightspeed (smartcomputer-ai/lightspeed)

Searching Database…

这是什么?Lightspeed 是一套开源基础设施,用于把成群的 AI 代理当作持久化工作流来运行:代理会话在重启后依然存活,可以连续运行数周到数月,空闲时几乎不花钱,只有任务真正需要时才借用一台真实的机器。
它是嵌入到我应用里的库,还是一个我部署后使用的服务?是一个完整的可自托管产品,不是库:Rust 核心跑在 Temporal 上,生产数据存在 Postgres(可选 S3)里,还带一个 TypeScript 和 React 的前端,你可以通过 UI 或 JSON-RPC API 来操作它。
我怎么在本地把它跑起来?安装支持 edition 2024 的 Rust、Node.js 24+ 以及带 Compose 的 Docker,然后运行启动器:它会安装依赖、启动本地基础设施和应用进程、执行数据库迁移,并打印一个开发用登录账号([email protected])。在 UI 里或通过环境变量设置你的 LLM API 密钥。
我需要哪些 LLM 提供商和密钥?OpenAI 和 Anthropic 开箱即用——在 UI 里或通过环境变量设置密钥即可。也支持 OpenAI 兼容的服务器,比如 OpenRouter、DeepSeek、vLLM 和 Ollama,每个都可以单独配置端点和凭据,还带自动提示词缓存。
代理开箱就有真实的 shell 和文件系统吗?没有——在没有挂载机器的情况下,代理只能通过虚拟文件系统和提供商托管的网络访问来工作。Shell、代码执行和完整文件系统只存在于挂载的环境中:一台现有机器、一台由 Incus 开通的虚拟机,或任何运行 lightspeed-envd 守护进程的主机。
人们用它实际做出什么东西?长期运行的代理集群:为成千上万的用户提供私人助理而无需给每个人配一台闲置虚拟机、连续数周构建并评审功能的全自动软件工厂、排查告警的值班运维代理,以及监督长时间实验的研究代理。
我能把它作为一套自托管部署给很多用户共用吗?可以——它就是为此设计的:可以在一套部署上用 universe 隔离多个租户,也可以给每个租户跑独立的部署;同一个后端二进制文件既可以在单个进程里承担所有角色,也可以把各个角色拆开在多个 Temporal worker 上独立扩展。
我的 API 密钥和机密信息是怎么处理的?凭据静态加密存储,OAuth 令牌自动刷新;环境和任务通过凭据注入拿到机密,不会暴露给模型。部署默认就是多租户的,在 universe 中相互隔离。
会话真的能连续运行几个月、重启也不丢吗?能——会话可以持续数周到数月,重启后照样存活。运行期间你可以取消、调整方向或排队下一条消息,会话还可以分叉或克隆,从已保存的历史里开出新分支。
它支持 MCP 服务器和子代理吗?都支持。MCP 可以连接本地或远程服务器,用 API 密钥或 OAuth 认证,工具调用既可以由模型提供商处理,也可以由 Lightspeed 自己处理,还包括通过工具搜索做的渐进式发现。子代理则让一个代理可以把工作委派给受监督的子代理,配置文件和限额都可以自定义。
机器人能在没人提示的情况下自己行动吗?可以——机器人是全天候在线的代理,会因定时任务、收到的 webhook、数据变化或聊天消息而醒来。它们能管理自己的日程、webhook 和轮询器,还能和其他机器人协作,你可以通过 Telegram 和 WhatsApp 和它们聊天。
为什么确定性的事件溯源核心这么重要?核心通过重放会话日志来决定每一步该做什么,自身不做任何 I/O,这正是它能配合 Temporal 这类持久化工作流引擎的原因。大体积的负载数据放进内容寻址存储,让工作流历史保持得很小。
What are similar projects?evenfire, hermes-agent, hive, ruflo, brigade, DeskcommCRM, openfang, ARTEX
Size
16.4 MB
Stars
262
Age
8mo
Commits · 90 Days