agent-block 0.38.0

Lua-first Agent Runtime built on AgentMesh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
-- embedded_agent_override.lua — `require("agent")` under a project that
-- shadows the embedded `agent` and delegates to it through `embedded.agent`.
--
-- The override module itself is written into the project root by the test
-- (a checked-in `blocks/` directory here would be a second override for every
-- other fixture). What this script proves is only the caller's side: the name
-- `agent` resolves to the project's module, and that module reached the one it
-- replaced.
local agent = require("agent")

local res = agent.run({ prompt = "not sent anywhere" })

print("RESULT_FROM=" .. tostring(res.from))
print("RESULT_PROMPT=" .. tostring(res.prompt))