Yielded Agent for MoonBit. MoonBit compiles to JavaScript, and an agent service is the @yielded/agent object, typed with Effect from opraying/effect. There is no second agent runtime.
@yielded/ui is not bound. puppeteer-core stays inside the Cloudflare browser host. Deploys stay on opraying/alchemy.
./scripts/agent-build.sh is the entry point: setup, generate, check, and test. ./scripts/ci.sh is the full gate. ./scripts/new-app.sh scaffolds an example. Commands and invariants are in AGENTS.md.
The binding follows yielded-dev/agent: the agent core and its storage, platform, review, and testing packages. Generated code covers the exported services and layers. Hand-written overlays give an agent a MoonBit schema for its input and output, and pair each tool with a MoonBit handler. The upstream pin lives in the repository package.json.
examples/greeter defines an agent and runs it against a scripted model, so the example does not call a network:
fn greeter() -> @Agent.Agent[String, String] {
@Agent.Agent::new(
"greeter",
input=@Schema.string(),
output=@Schema.string(),
instructions="Greet the user by name in one short sentence.",
)
}The same example adds a tool with AgentTool, whose handler is an Effect. examples/app only builds the in-memory layer. examples/travel-planner is the larger durable agent.
Agent is the core. Storage packages cover memory, SQL, SQLite, and Postgres. Platform packages cover Node and Cloudflare. AgentTesting supplies the scripted model used by the examples.
Package *.generated.mbt files are generated bindings linked from the generated/ submodule (opraying/mbt-generated, branch agent). Focus edits on the hand-written overlays and generator:
- Primary hand-written overlays (non-
*.generated.mbtfiles): Agent/, AgentPlatformCloudflare/, AgentTesting/. - Generator & ABI scripts:
scripts/gen-agent.mjs,scripts/agent-manifest.mjs,scripts/abi.mjs,scripts/tsrs-ir.mjs,scripts/gen-dts.mjs,scripts/TRANSLATOR.md. - Build/CI scripts:
scripts/agent-build.sh,scripts/ci.sh,package.json.
Apache-2.0. Copyright the opraying contributors.
The upstream agent packages are MIT.