SDK Guides
Build and orchestrate agents with the core mAIvn SDK.
Overview
What the mAIvn SDK is, the one mental model behind it, and where to start.
Getting Started
Install the SDK and run your first agent invocation.
Core Concepts
Agents, swarms, tools, dependency-aware execution, and sessions in one place.
Tools
Define function tools and model tools with the right execution boundaries.
Dependencies
Model tool and agent dependencies for reliable execution graphs.
Structured Output
Guarantee typed responses with schema-driven output patterns.
Multi-Agent
Coordinate specialized agents using Swarm workflows.
Sessions, Streaming & ModelConfig
How invoke and stream relate, sync versus async, ModelConfig, live available models, and what a session response carries.
System Tools
Understand built-in web search, code execution, and reasoning tools.
Private Data and PII
Keep secrets and PII out of the model: schema-only planning, execution-time injection, and RedactedMessage for automatic detection and redaction.
Interrupts & Human-in-the-Loop
Pause an agent for human input mid-run and resume the session safely.
Frontend Events
Stream live execution events from your mAIvn backend to any frontend with a one-line FastAPI mount and a browser EventSource example.
Connecting MCP Servers
Connect external Model Context Protocol tool servers to your agents.
Memory and Recall
Configure summarize, retrieval, and async indexing for long-running threads.
Scheduled Invocation
Run agents and swarms on cron, interval, or one-shot schedules with built-in retries, jitter, and lifecycle controls.
Timeouts, Retries & Reliability
Bound calls with timeouts and retry transient failures gracefully.
Authentication & API Keys
How the SDK authenticates, key scopes from the consumer's point of view, and rotating keys without downtime.
SDK Resource Management
Manage project resources and organization memory settings programmatically.
Testing & Local Development
Test agents and tools without hitting the live orchestrator.