Skip to content
oprayingPublic

About

Yielded Agent for MoonBit, typed with Effect. Storage, platform hosts, and testing are included.

Topics

Resources

Stars

0 stars

Watchers

0 watching

Forks

Latest commit

 

History

27 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

opraying/agent

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

./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.

Design

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.

Example

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.

What is bound

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.

Hand-written sources

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:

License

Apache-2.0. Copyright the opraying contributors.

The upstream agent packages are MIT.

About

Yielded Agent for MoonBit, typed with Effect. Storage, platform hosts, and testing are included.

Topics

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages