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.
- Agent
Hosts - Computers that run bots’ tools (see docs/en/computers.md).
- ApiKey
Info - A tenant API key as listed; the key itself is only returned when created.
- Approval
Request - A risky action waiting for (or resolved by) a human.
- Approvals
- Human-in-the-loop approvals.
- Bootstrap
Options - SSH bootstrap of an agent host. The password/key is used for that call only.
- Bootstrap
Result - What an SSH bootstrap did, step by step.
- 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.
- Container
Profile - Runs the bot’s shell commands in a throwaway Docker container with these quotas.
- Enrollment
Token - One-time token for
marbots-host enroll. - Event
Stream - Iterator over live events.
- Events
- Live events (Server-Sent Events).
- Host
Info - A machine that runs bots.
- Host
Metrics - A host’s latest load report.
- HostRef
host_refvalues besides a registered host id.- 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.
- NewApi
Key - A freshly created key;
keyis shown only this once. - 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
Evaluation - Learning evaluation of one skill: outcomes of its current version and a verdict.
- Skill
Info - An installed SKILL.md package.
- Skill
Stats - Outcomes of the tasks that loaded one skill version.
- Skills
- SKILL.md packages.
- System
Info - Server information.
- Task
Record - A durable unit of work.
- Tasks
- Tasks.
- Templates
- Template gallery.
- Tenancy
- Who am I, tenants and this tenant’s keys and members (see docs/en/multi-tenant.md).
- Tenant
- A tenant in multi-tenant mode;
defaultalways exists. - Tenant
Member - An OIDC user’s role in a tenant (matched by e-mail or subject).
- Threads
- Conversations.
- Tool
Call - A tool invocation requested by a model.
- WhoAmI
- Who the caller is.
- 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.
- Skill
Verdict - The learning evaluation’s conclusion about a skill.
- Task
State - A task’s lifecycle state.
- Tenant
Role - A role inside a tenant, weakest first.
Constants§
- BOSS_
MAN - Id of the protected manager bot.
Type Aliases§
- Result
- SDK result type.