AG-UI protocol SDK for MoonBit agents
Dependencies
moon test
moon run src/cmd/democurl -N http://127.0.0.1:8087/agent \
-H "Content-Type: application/json" \
-H "Accept: text/event-stream" \
-d '{"threadId":"thread-1","runId":"run-1","messages":[{"id":"m1","role":"user","content":"Hello"}],"tools":[],"context":[]}'impl @server.AgUiAgent for MyAgent with fn run(self, input, emit) {
emit(@core.AgUiEvent::run_started(
thread_id=input.thread_id(),
run_id=input.run_id(),
))
// emit text/tool/state events here
}Install
Download zipAG-UI protocol SDK for MoonBit agents
Dependencies