category
The host is a game engine, a network appliance, an IoT control plane, or an application with a Lua plugin system.
This is not a toy workload. It sits in embedded hosts, games, appliances, and IoT control planes, where the system is old enough to have change control and important enough that nobody wants to rediscover its edge cases. The host may not allow a new process. A Python sidecar may not exist, may not be permitted, or may be too heavy. The extension already owns the state and the business hooks.
Default answer one: migrate
The first default answer is to add a Python sidecar, or move the host to a new runtime.
Migration can be correct. But for a system that already owns transactions, operational knowledge, and audit history, migration is a revalidation program, not a syntax cleanup.
Default answer two: bridge
The second default answer is a sidecar. The Lua 5.4 program exposes a tool or API, and a new service owns the agent loop.
This is often the right engineering choice. It isolates the new runtime and avoids touching fragile code. But the governance boundary moves with the agent. Policy, approvals, credentials, checkpoints, and audit events now cross a process or network boundary.
The third path: keep the runtime
PRAXO-CORE puts the loop where the work already lives.
The application calls agent.run_agent with options, a session, and a prompt. Model callbacks, tools, policy, and events remain in the same process or runtime. The loop is a library; the application still owns the provider, tools, policy content, and deployment.
What native Lua means
The implementation is Lua 5.4. Distribution: LuaRocks praxo-core 0.8.0-1; source tag lua/v0.8.0.
The Core is not a hosted service. It does not own credentials or tenant data. It provides a governed execution boundary, and the application provides the business controls around it.
Architecture highlights
- Native Lua 5.4.
- Standard library only.
- OpenAI, Anthropic, Gemini, SSE, OTel, retriever, delegation.
The important design choice is not the number of modules. It is that the final tool arguments are reauthorized after edits, denials leave zero effects, and events can be audited.
The limits are the design
- Lua 5.4 only; LuaJIT, 5.1, 5.3, OpenResty, and Redis are not claimed.
- Event sink, stream part, and JSON Schema remain partial.
- No plugin host; manifest parsing only.
- No persistent session store.
These limits make failure modes reviewable. A bridge or sidecar may still be better when isolation, deployment ownership, or team boundaries matter more than an in-process loop.
Governance
For embedded hosts, games, appliances, and IoT control planes, the question is not “Can Lua call a model?” It is whether an agent can participate in a regulated or operational process without bypassing the controls around it.
The Core handles execution. The application still owns identity, policy decisions, approvals, effect records, isolation, shutdown, and the meaning of the tool call.
What we did not do
- We did not claim full Go parity.
- We did not claim a hosted agent platform.
- We did not claim production readiness or a security certification.
- We did not claim that migration or a bridge is obsolete.
Invitation
If you run embedded hosts, games, appliances, and IoT control planes, I would value the hard questions. What would you test first? Which boundary should stay native, and which should remain behind a bridge or sidecar? What evidence would you need before letting an agent touch a production tool?
A useful answer can be “a sidecar is the right fit.” The goal is an honest integration boundary, not one architecture for every system.
Repo: https://github.com/axisvela/praxo-core
Language docs: https://axisvela.github.io/praxo-core/languages/lua/
Canonical: https://architect.pub/lua-embedded-host-agent-deep-dive
- 登录 发表评论