Expand description
Typed Rust SDK for Marbots, the multi-agent
collaboration platform. Synchronous (no async runtime required); from async code, call it inside spawn_blocking.
Kernel packs, permission profiles, task states, event types and model settings are enums/helpers, so typos are
compile errors.
Built by Gravicode Studios, led by Kang Fadhil.
use marbots_sdk::{BotSpec, Client, EventType, KernelPack, ModelRef, PermissionProfile};
let mb = Client::new("http://localhost:5170");
// Every bot can run on its own model; ModelRef::DEFAULT follows the workspace default.
let sari = mb.bots().create(
BotSpec::new("Sari")
.role("UX designer")
.kernel_functions([KernelPack::Files, KernelPack::Web])
.permission_profile(PermissionProfile::WorkspaceWrite)
.model(ModelRef::of("azure", "gpt-5.6-luna")),
)?;
mb.bots().set_model("atlas", ModelRef::DEFAULT)?;
let thread = mb.threads().create(&sari.id, None)?;
let result = mb.threads().send(&thread.id, "Sketch a wireframe", true)?;
println!("{:?}: {}", result.task.model, result.text());
for event in mb.events().stream(Some(&thread.id))? {
let event = event?;
if event.event_type == EventType::ToolCallStarted { println!("tool: {:?}", event.message); }
if event.is_task_finished() { break; }
}Structs§
- Agent
Event - One item on the live event stream.
- Approval
Request - A risky action waiting for (or resolved by) a human.
- Approvals
- Human-in-the-loop approvals.
- Bot
- A durable AI teammate.
- BotModel
Info - A bot’s model setting and the model it actually runs on.
- BotSpec
- Options for creating or updating a bot.
- BotTemplate
- A ready-made bot role from the template gallery.
- Bots
- Bot management.
- Chat
Message - One chat message.
- Chat
Thread - A conversation with one bot.
- Client
- A synchronous client for a Marbots server. Cheap to clone; safe to share between threads.
- Event
Stream - Iterator over live events.
- Events
- Live events (Server-Sent Events).
- Host
Info - A machine that runs bots.
- Mcp
- MCP servers.
- McpServer
- An MCP server from the gallery.
- Memory
- Long-term memory.
- Memory
Record - A long-term memory.
- Model
Catalog - The workspace default model, the choices and the profiles.
- Model
Profile Info - A named model profile.
- Model
Ref - Builds a bot’s model setting.
- Models
- Workspace default model and model choices.
- Schedule
Job - A saved schedule.
- Schedule
Spec - A recurring (
cron) or one-off (run_at, ISO-8601) job. - Schedules
- Cron and one-off jobs.
- Send
Result - Returned by
threads().send(...);replyis set when the call waited for the bot. - Skill
Info - An installed SKILL.md package.
- Skills
- SKILL.md packages.
- System
Info - Server information.
- Task
Record - A durable unit of work.
- Tasks
- Tasks.
- Templates
- Template gallery.
- Threads
- Conversations.
- Tool
Call - A tool invocation requested by a model.
- Workspace
File - A file in a thread’s project workspace.
Enums§
- Approval
Scope - How far an approval reaches.
- Approval
State - State of an approval request.
- Auto
Learn Mode - Optional learning after tasks.
- BotStatus
- A bot’s lifecycle state.
- Error
- Errors returned by the SDK.
- Event
Type - Types of events on the live stream. Types newer than this SDK deserialize as
EventType::Unknown. - Kernel
Pack - Built-in tool packs a bot can enable.
- Memory
Kind - Kind of long-term memory.
- Permission
Profile - What a bot may do without asking.
- Task
State - A task’s lifecycle state.
Constants§
- BOSS_
MAN - Id of the protected manager bot.
Type Aliases§
- Result
- SDK result type.