English | 中文 | Español | 日本語 | Deutsch | Русский | Português | Français | 한국어
Orbit is a ~160-line minimalist LLM framework for Lua.
-
Lightweight: Just ~160 lines. Zero bloat, zero dependencies, zero vendor lock-in.
-
Expressive: Everything you love—(Multi-)Agents, Workflow, RAG, and more.
-
Agentic Coding: Let AI Agents (e.g., Cursor AI) build Agents—10x productivity boost!
Get started with Orbit:
- To install, just copy orbit.lua or main.lua into your project.
- To learn more, check out the documentation and cookbook
- Examples: To run examples, first install LDE:
luarocks install lde(or local dependency manager). Then navigate to the example directory and runlua main.lua. - 🎉 Join our Discord to connect with other developers building with Orbit!
Note: This is the Lua port of the original Orbit. The core logic is contained in a single file orbit.lua (also available as main.lua).
local pf = require("orbit")
local fetch = pf.node(function(shared)
shared.value = 42
return "ok"
end)
local process = pf.node(function(shared)
if shared.value > 40 then return "large" end
return "small"
end)
fetch >> process
pf.run(fetch, {})Current LLM frameworks are bloated... You only need 160 lines for LLM Framework!
| Abstraction | App-Specific Wrappers | Vendor-Specific Wrappers | Lines | Size | |
|---|---|---|---|---|---|
| LangChain | Agent, Chain | Many (e.g., QA, Summarization) |
Many (e.g., OpenAI, Pinecone, etc.) |
405K | +166MB |
| CrewAI | Agent, Chain | Many (e.g., FileReadTool, SerperDevTool) |
Many (e.g., OpenAI, Anthropic, Pinecone, etc.) |
18K | +173MB |
| SmolAgent | Agent | Some (e.g., CodeAgent, VisitWebTool) |
Some (e.g., DuckDuckGo, Hugging Face, etc.) |
8K | +198MB |
| LangGraph | Agent, Graph | Some (e.g., Semantic Search) |
Some (e.g., PostgresStore, SqliteSaver, etc.) |
37K | +51MB |
| AutoGen | Agent | Some (e.g., Tool Agent, Chat Agent) |
Many [Optional] (e.g., OpenAI, Pinecone, etc.) |
7K (core-only) |
+26MB (core-only) |
| Orbit | Graph | None | None | ~160 | +10KB |
The ~160 lines capture the core abstraction of LLM frameworks: Graph!
From there, it's easy to implement popular design patterns like (Multi-)Agents, Workflow, RAG, etc.
✨ Below are basic tutorials (more coming soon!):
| Name | Difficulty | Description |
|---|---|---|
| Hello World | ☆☆☆ Dummy | A simple hello world flow |
| Chat | ☆☆☆ Dummy | A basic chat bot with conversation history |
| Batch | ☆☆☆ Dummy | A batch processor that translates markdown into multiple languages |
👀 Want to see other tutorials ported to Lua? Create an issue!
🚀 Through Agentic Coding—the fastest LLM App development paradigm-where humans design and agents code!
✨ Check out the documentation for more advanced patterns:
| Topic | Description |
|---|---|
| Agent | Autonomous agents that use tools |
| Workflow | Structured multi-step processes |
| RAG | Retrieval-augmented generation |
| Map-Reduce | Parallel processing of large datasets |
| Multi-Agent | Collaborative agent systems |
-
Want to learn Agentic Coding?
-
Check out my YouTube for video tutorial on how some apps above are made!
-
Want to build your own LLM App? Read this post! Start with this template!
-
To run examples or manage dependencies, ensure you have LDE installed:
powershell -c "irm https://lde.sh/install.ps1 | iex"Navigate to any cookbook example directory and execute:
lua main.luaOrbit uses a simple unified test runner. To run all tests:
lua tests/run_all.luaTo check test coverage, you'll need luacov:
luarocks install luacov
lua -lluacov tests/run_all.lua
luacovCheck luacov.report.out for the results.
Documentation is generated using LDoc:
luarocks install ldoc
ldoc .The output will be in docs/api.


