Golem SDK for MoonBit — build durable, fault-tolerant agents on the Golem platform
///|
#deriveagent
struct Counter {
name : String
mut value : UInt64
}
///|
/// Creates a new counter with the given name
fn Counter::new(name : String) -> Counter {
{ name, value: 0 }
}
///|
/// Increments the counter
pub fn Counter::increment(self : Self) -> Unit {
self.value 1
}
///|
/// Returns the current value
pub fn Counter::get_value(self : Self) -> UInt64 {
self.value
}///|
#derivegolem_schema
pub(all) enum Priority {
Low
Medium
High
} derive(Eq)
///|
#derivegolem_schema
pub(all) struct TaskInfo {
title : String
priority : Priority
description : String?
}| Package | Description |
|---|---|
| agents | Agent registry, RawAgent trait, register_agent |
| agents/types | UnstructuredText, UnstructuredBinary, Multimodal[T] types |
| schema | Serialization traits and impls for primitives, Option, Array, Result |
| builder | Fluent API for constructing WitValue and WitType trees |
| extractor | Trait-based API for reading values from WitValue trees |
| logging | Structured logging with named loggers and level filtering |
| context | Span-based tracing and invocation context |
| rpc | Agent-to-agent RPC helpers |
| interface/ | WIT-generated bindings (Golem host APIs, WASI interfaces) |
| gen/ | WIT-generated WASM export glue code |
Install
Download zipGolem SDK for MoonBit — build durable, fault-tolerant agents on the Golem platform