light-agent is a local-first, model-agnostic agent runtime. Use it as a desktop assistant, a CLI, or an HTTP service. Connect a model, give it tools, and follow tasks through model requests, commands, file changes, and final results.
The core is written in C11 and embeds its web console. Prebuilt packages do not require a Node.js or Python application stack; extensions such as browser automation and Python skills bring their own runtimes.
What can you build with it?
| Use case |
Workflow |
| Understand a codebase |
Search and read source, run commands, and produce explanations grounded in tool results. |
| Create documents and visual reports |
Combine reasoning with installed document, Python, or shell tools; inspect the resulting files. |
| Coordinate specialist agents |
Chain review → implementation → testing in a Flow DAG, or let role-based agents discuss a topic. |
| Produce an animated comic |
Import fiction or a storyboard, generate shots and voice tracks with a Flow, and export an MP4. |
| Automate recurring work |
Schedule jobs and inspect their recorded outcomes in the console. |
| Embed an agent in your application |
Submit tasks over HTTP and read their status, tool steps, output, and metrics. |
Document generation, browser access, and multimodal tasks depend on the selected model and installed tools.
First-task guide · Contributing · Share the project
Quick start
1. Install or build
Download a Windows installer, Linux x64 / ARM64 (AArch64) portable archive, or macOS package from Releases. Open the desktop app, or run the server in the extracted Linux package:
./light-agent serve 18300
To build from source:
git clone https://github.com/LeonQin-ai/light-agent.git
cd light-agent/backend
| Platform |
Build command |
Prerequisites |
| Linux |
make |
C compiler and Make |
| macOS |
make |
Xcode Command Line Tools |
| Windows / Git Bash |
bash build.sh cli |
Git Bash; script locates or bootstraps pinned Zig |
| Windows / PowerShell |
.\build.ps1 -Target cli |
PowerShell; script locates or bootstraps pinned Zig |
From backend, run ./build/light-agent serve 18300 (Windows: ./build/light-agent.exe serve 18300).
2. Connect a model
Open http://localhost:18300/ and configure a route on the Models page: provider, base URL, model, and API key. OpenAI-compatible endpoints, Anthropic, and local model services are supported. Use the mock provider for offline development.
The desktop app also uses port 18300; close it before starting another server on that port. Keep API keys in local configuration, outside version control.
3. Start with a task you can verify
Try: “Read this repository and write a source overview to overview.md. Cite the files you inspected.” Follow the tool trace, then open the result.
Choose execution and state directories explicitly for CLI deployments:
./build/light-agent --workspace /path/to/project --state /path/to/state serve 18300
Workspace support: The main branch includes saved workspace folders, per-chat workspace selection, and task-local execution directories. These changes are now integrated into main. Workspace selection chooses the execution root; it is not a security sandbox.
Authorize credentials in strict mode
In the chat composer, select 严格 → 凭据授权 (Strict → Credential authorization). Choose an operation and destination, enter the password or API key in the password field, then insert the generated cred_… reference into your request. For example, choose Git HTTPS clone and ask the agent to clone the repository using that reference. Only strict-mode tasks in the issuing chat can use it. To revoke access, reopen the dialog in that chat and select 撤销授权 with the reference.
| Credential |
Operation authorized by one grant |
| Git HTTPS |
List remote refs or clone the specified repository into a new workspace subdirectory |
| PostgreSQL |
Verify the TLS certificate and hostname, then run the read-only SELECT specified in the grant; an empty query returns the database name |
| API key |
Send a Bearer GET to one HTTPS URL without following redirects |
The adapter requires Python 3 and keyring. Cloning also requires Git, and PostgreSQL queries require psycopg. Windows end-to-end tests cloned a repository over local HTTPS and verified its file contents, then queried a temporary PostgreSQL instance using TLS and SCRAM password authentication. Setup and dependencies · End-to-end test
See the work as it happens
Terminal client: run light-agent chat to connect to the
desktop/server Runtime, continue durable conversations, inspect tool execution,
and cancel with Ctrl+C. Interactive terminals use a full-screen layout; native
OpenAI-compatible answers arrive incrementally as provisional previews.
Use chat -p "your task" for scripts. See the
terminal client guide.
Persistent conversations, image attachments, model selection, task steering, and execution history share one console. Tool details expose commands, results, status, and duration so you can investigate the run.

Flow DAGs express task dependencies. Group discussions let registered roles respond to other members across configurable rounds. Skills, MCP connections, and plugins extend available tools.
Explore Skills and Plugins


Screenshots use a local demonstration configuration and mock execution; they do not establish real-model task quality.
Architecture
flowchart TD
UI[Desktop / Web / CLI / HTTP] --> R[Task lifecycle and scheduler]
R --> C[Native tool loop and completion decisions]
C <--> L[LLM providers]
C <--> M[Memory and Context MMU]
C --> P[Policy checks and execution]
P --> T[Files / Shell / MCP / Skills / Plugins]
T --> E[Tool evidence and verification]
E --> C
R --> J[Task journal / Traces / Metrics]
| Runtime service |
What it provides |
| Task lifecycle |
Scheduling, cancellation, durable state, and explicit recovery. |
| Native tool loop |
Structured tool_calls / tool_use and completion declarations rather than answer-keyword matching. |
| Memory and context |
Memory lifecycle services, budgeted hot/warm/cold context tiers, and viewable memory summaries generated on demand. |
| Execution and policy |
Action checks, file snapshots, verification, and rollback for supported operations. |
| Coordination |
Role registration, dependency-based Flows, and group discussions. |
| Observability |
Model/tool milestones, token accounting where available, task records, and metrics. |
File rollback does not undo arbitrary network or shell side effects. Workspace selection is not process isolation; recovery does not guarantee exactly-once execution. Distributed scheduling and enterprise multi-tenancy remain roadmap work. See the implementation status.
Evidence, not just feature claims
These are historical project-reported runs, not a fresh evaluation of every release. Models, tools, sample size, and run variance affect results.
| Evaluation |
Recorded result |
Scope |
| GAIA 2023 validation |
78.79% |
165 tasks; GLM-5.3-flash; 2026-09-11 |
| SWE-bench Verified mini |
8/11 |
11-task sample; GLM-5.3-flash; 2026-09-12 |
| BFCL-style function calling |
20–22/22 |
Project-built cases; deepseek-chat |
| WebArena-style browser tasks |
6/6 |
Small project-built suite; GLM-5.3-flash |
The SWE-bench report also records a Docker-isolated rerun at 5/11. Mini and “style” suites are not full official benchmark results. Read the scorecard and methodology before comparing systems.
On the documented Windows machine, a deterministic workload completed 1,000,000 tasks in 65.972 seconds, with 100 registered roles, 8 workers, and 78.65 MiB sampled peak RSS (three-run median duration). This measures scheduling and context probes, not one million LLM requests. Registered roles are not concurrent processes.

Setup and limits · Raw million-task data · Memory and queue samples
Real-model regressions, including failures and API costs, remain in the historical report. They are targeted checks, not universal completion or token-efficiency guarantees.
Build on the HTTP API
# Submit a task; the response contains its ID.
curl -X POST http://localhost:18300/v1/chat \
-H 'Content-Type: application/json' \
-d '{"message":"Create note.txt containing hello"}'
# Replace 0 with the returned task ID.
curl http://localhost:18300/v1/tasks/0
curl http://localhost:18300/v1/tasks/journal
curl http://localhost:18300/metrics
Authentication, model configuration, local Skills, MCP, and API details: developer guide.
Test and contribute
CI covers Windows, Linux, Linux AddressSanitizer, macOS Apple Silicon, and macOS Intel. Check the workflow for a commit’s actual status.
cd backend
COA_TOOL_PROTOCOL=legacy make test
COA_TOOL_PROTOCOL=legacy make scenario
On Windows, run bash build.sh test, then ./build/light-agent-test.exe. Offline fixtures validate runtime behavior without paid model calls. Live-model evaluations require credentials; browser tests need Playwright. Exact commands and environment settings are in CI and the developer guide.
We welcome reproducible task failures, provider compatibility fixes, tool recovery, context efficiency, UI accessibility, and documentation. Include version/commit, OS, model/provider, expected behavior, and a redacted trace in bug reports. Never attach API keys or unauthorized private source.
Report a bug · Find an issue to work on
Go deeper
License
Apache License 2.0. Attribution and retained notices: NOTICE. Third-party components keep their licenses. Earlier MIT-licensed releases remain available under their original terms.
Desktop demos
1. Desktop chat and task progress

The Windows desktop recording shows a live DeepSeek chat, token counts, task progress, Flow, scheduled tasks, and a model test. It also shows the configuration screens for MCP, Skills, plugins, policies, chat credentials, IM, memory, snapshots, monitoring, cluster nodes, and metrics. Full feature tour · 57 seconds
2. Workspaces and conversation history

3. Model routing and capabilities

4. Themes and backgrounds

Animated comics with HappyHorse 1.1
The desktop comic workshop uses one Flow for the storyboard, visuals, voice tracks, and final edit. In 按镜头选视频模型 (Choose video models per shot), assign one model to each kind of input.
| Model |
Input |
Typical shot |
happyhorse-1.1-t2v |
Text prompt |
Establishing shots, landscapes, and effects that need no character reference |
happyhorse-1.1-i2v |
One first-frame image and a prompt |
Preserve the opening composition or start from a supplied continuity frame |
happyhorse-1.1-r2v |
One to nine reference images and a prompt |
Reuse visual references for a recurring character, costume, or prop across shots |
The selected image route can draw a first frame and front, side, and back character views. Reference images help preserve a character’s visual identity. Review the rendered clips for continuity before reusing them. Alibaba Cloud Token Plan video generation · First-frame API · Reference-to-video API
- Open 更多 → Models (More → Models) and add the three HappyHorse Token Plan route presets. Add an image route such as
qwen-image-3.0-pro to generate first frames and character references. Use the Test button on each route to check its setup.
- Open 多 Agent & Flow → 漫剧工房 (Multi-Agent & Flow → Comic Workshop). Import a
.txt or .md chapter, import a storyboard .json, or select 加载三镜宣传样片 (Load three-shot promo). The built-in storyboard establishes a lighthouse with T2V and follows the same original lighthouse keeper, A-Cheng, in its I2V and R2V shots.
- To reuse existing character art, open 导入参考人物图 (Import character references), enter the character’s name as it appears in the script, and add PNG, JPEG, or WebP images. In 按镜头选视频模型 (Choose video models per shot), reference-to-video shots use the matching images for each named character in the shot.
- To produce several episodes in one run, select multiple chapter files, a single
.txt or .md with 第…集 or 第…章 headings, multiple storyboard .json files, or a single JSON array of storyboards. Set 制作范围 (Production scope) to 全部章节 (All chapters) or 指定范围 (Episode range), then select 导入并组队制作 (Import and produce). The batch shares character references across episodes, while automatic storyboarding carries forward the previous episode’s ending.
- Use 查看制作进度 (View production progress) to follow each episode, then open
manju/epNN/videos/epNN-motion.mp4 in the workspace. Completed clips are reused when a run resumes. Audio and assembly require local Python and the comic pipeline dependencies. Custom storyboards support text, first_frame, and reference in video_mode. Each clip can run for three or four seconds.
The 文生视频 (Text-to-video) option also supports single-route production with Alibaba Cloud Kling or Volcano Engine Seedance.
Novel imports default to 角色对白 (Character dialogue). Storyboards specify spoken lines, on-screen action, and scene backgrounds. Shots without lines can use ambience and cues such as wind, fire, footsteps, or a bell. When dubbing separately, the video flow checks that the voice recording fits its three- or four-second shot before requesting video. Imported storyboards default to their authored audio mode.
For a storyboard dialogue shot with an on-screen speaker, set dialogue_audio to native and use a HappyHorse 1.1 video route. The editor keeps the audio that the model generated with the picture. Review each line before publishing, since the video model also generates the speech.
For dialogue novels, the production team processes story structure, shot design, art direction, and sound in order. The controller compiles a nine-part director brief in shots.json, and the workshop shows the current stage. Authored storyboards can go straight to production, with text cards rendered by the editor. Copyable prompts and an API example
Use 角色档案 → 批量导入角色 (Character profiles → Batch import) to select one or more UTF-8 JSON files. One import can save multiple characters and their voice settings in the current workspace. Download the example JSON from the import form. If a character ID already exists, the import leaves the roster unchanged unless you select 更新同 ID 角色 (Update matching IDs). Subsequent episodes can reuse the same profiles and voices. Attach reference images by character ID in 参考人物图 (Character references).
The Windows desktop app completed the first Lighthouse Keeper run in 4 min 45 s with all three configured HappyHorse models. The sample uses a prepared storyboard and a character reference sheet generated by qwen-image-3.0-pro. The continuity rerun started from a selected first frame and made one new generation request. After a download interruption, the app resumed using the existing provider task ID. The final video is 720 × 1280. Finished comic and recordings
Comic production and resume
From storyboard import to final edit

Uncut recording of the first run · 7 min 06 s
Match the character and resume the download

Uncut recording of the continuity rerun · 5 min 57 s
Import three characters in one batch
The recording shows two JSON files imported together, the saved profiles and voices after reloading, and three reference images attached by character ID. Download the walkthrough · 19 seconds · Example cast JSON
https://github.com/user-attachments/assets/49945f05-7dfe-434c-8591-669aecdd2482
Animated comic showcase
These demos were produced with the light-agent comic workflow and include Chinese audio and subtitles.
Tidal Beacon · Three characters, one scene
When fog blocks the channel, a navigator, an engineer, and a keeper relight the beacon to guide a fishing boat home. All four shots use HappyHorse R2V with the same three reference portraits. Each character has a different voice. Download MP4 · 16 seconds · Storyboard, profiles, and reference portraits
https://github.com/user-attachments/assets/c0e9fb7d-0b85-4fae-804b-07d754cbb60a
The Bell Beyond the Mountain · Dragon-Slayer · Continuity cut
A-Ling fears thunder and retreats from his first encounter with the dragon. After spotting a gap in its scales, he uses the mountain wind and his grandmother’s cracked bell to turn the dragon’s fire. His mother’s voice at the bridge brings the story back to its opening.
The revised storyboard uses four seconds per shot. The cut combines 29 original HappyHorse clips with ten new clips produced using Qwen first frames and HappyHorse. A-Ling speaks first and his mother answers off screen. The film includes 19 lines of dialogue and two locally rendered closing cards. Download 720p MP4 · 2:44 · Revised continuity storyboard
https://github.com/user-attachments/assets/e9a5582a-8e31-45a2-bcf2-90a7ad7e91be
The Lighthouse Keeper
A-Cheng lights the lighthouse on a sea cliff. The three shots use text-to-video, first-frame animation, and reference-to-video. Download MP4 · 20.4 seconds
https://github.com/user-attachments/assets/5600a05c-49d3-4cf0-95be-8f0e179a9b14
Starlight Greenhouse
Yaya, a greenhouse robot, plants a glowing seed. The establishing shot uses text-to-video. The planting and sprouting shots share a single character turnaround sheet. Download MP4 · 20.6 seconds
https://github.com/user-attachments/assets/8a635a60-4224-406e-9ab2-674dcd1a0ed4
评论