Vibe SDK
High-level Python interface for running Vibe agents.
The SDK gives you:
Agentand stateful async/sync sessions- Pydantic-based tool authoring
- Built-in filesystem tools
- Client-handled tools for UI- or host-dependent actions, such as asking the user a question
- Skills: reusable instruction sets advertised in the prompt and loaded on demand
For architecture and design references, see ARCHITECTURE.md and documentation/INDEX.md.
Advanced raw task-protocol examples live in examples/advanced_task_protocol_examples. They are not the primary public SDK API, but they are useful end-to-end probes for local, HTTP, and workflow execution.
Tool annotations
Use ToolResult to return metadata to non-model consumers while keeping the
model-visible result compact:
from pydantic import BaseModel
from mistralai.vibe.sdk.capabilities import ToolResult, tool
class EditFileArgs(BaseModel):
path: str
previous_content: str
class EditFileResult(BaseModel):
lines_changed: int
@tool(name="edit_file", description="Edit a file", input_schema=EditFileArgs)
def edit_file(args: EditFileArgs) -> ToolResult[EditFileResult]:
return ToolResult(
value=EditFileResult(lines_changed=2),
annotations={"example.file_before": args.previous_content},
)
Annotations are stored on the corresponding task-result history entry and are not included in the tool result sent to the model.
Quick Start
from mistralai.vibe.sdk import Agent, AgentConfig
from mistralai.vibe.sdk.execution_record.patching.json_patch import apply_patches
from mistralai.vibe.sdk.execution_record.state import TaskState
from mistralai.vibe.sdk.providers.completion import MistralCompletionConfig
from mistralai.vibe.sdk.transports.events import TaskResultEvent, TaskStateUpdateEvent
agent = Agent(
config=AgentConfig(
completion=MistralCompletionConfig(model="mistral-large-latest"),
system_prompt="You are a concise assistant.",
)
)
async with agent.session() as session:
state = TaskState(input="Hello")
async for event in session.run("Hello"):
if isinstance(event, TaskStateUpdateEvent):
state = apply_patches(state, event.payload.patches)
elif isinstance(event, TaskResultEvent):
state = event.payload.result
print(state.output)
Skills
Skills let an agent discover short task-specific summaries up front and load the
full instructions only when needed through the builtin skill tool.
from mistralai.vibe.sdk import Agent, AgentConfig, SkillDefinition
from mistralai.vibe.sdk.providers.completion import MistralCompletionConfig
agent = Agent(
config=AgentConfig(
completion=MistralCompletionConfig(model="mistral-large-latest"),
skills=[
SkillDefinition(
name="interview",
description="Use when running a structured user interview.",
content="Ask one question at a time and summarize decisions at the end.",
)
],
)
)
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file mistralai_vibe_sdk-0.9.0.tar.gz.
File metadata
- Download URL: mistralai_vibe_sdk-0.9.0.tar.gz
- Upload date:
- Size: 147.6 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via:
twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
3d224adcdfb1207e9fba867c0a4d6688c84049226b0b19cc64d65690a0b4107c
|
|
| MD5 |
4e3ab2a82eb3acdea882d484a0fa6e0d
|
|
| BLAKE2b-256 |
8df0d6ab5a31ad8ca5e9975a307a57922949b63a22cd165d929a41c92c986fbe
|
Provenance
The following attestation bundles were made for mistralai_vibe_sdk-0.9.0.tar.gz:
Publisher:
release.yml on mistralai/vibe-sdk
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
mistralai_vibe_sdk-0.9.0.tar.gz -
Subject digest:
3d224adcdfb1207e9fba867c0a4d6688c84049226b0b19cc64d65690a0b4107c - Sigstore transparency entry: 2206323270
- Sigstore integration time:
-
Permalink:
mistralai/vibe-sdk@acce7c6dd419edfa006644af62709fbc979d760f -
Branch / Tag:
refs/tags/v0.9.0 - Owner: https://github.com/mistralai
-
Access:
private
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yml@acce7c6dd419edfa006644af62709fbc979d760f -
Trigger Event:
release
-
Statement type:
File details
Details for the file mistralai_vibe_sdk-0.9.0-py3-none-any.whl.
File metadata
- Download URL: mistralai_vibe_sdk-0.9.0-py3-none-any.whl
- Upload date:
- Size: 210.1 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via:
twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
e4d41ab0b37a6e67ad34ffc9cf8ee16de1940092ec766fcc8d49d8c91ffea1e8
|
|
| MD5 |
8ac9bbf4bd983c185b33df376e77b04a
|
|
| BLAKE2b-256 |
2bfd2ef52cecafd569c95553e1266d0f2c7ce7afa9ad537f2899dc155fa70910
|
Provenance
The following attestation bundles were made for mistralai_vibe_sdk-0.9.0-py3-none-any.whl:
Publisher:
release.yml on mistralai/vibe-sdk
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
mistralai_vibe_sdk-0.9.0-py3-none-any.whl -
Subject digest:
e4d41ab0b37a6e67ad34ffc9cf8ee16de1940092ec766fcc8d49d8c91ffea1e8 - Sigstore transparency entry: 2206323283
- Sigstore integration time:
-
Permalink:
mistralai/vibe-sdk@acce7c6dd419edfa006644af62709fbc979d760f -
Branch / Tag:
refs/tags/v0.9.0 - Owner: https://github.com/mistralai
-
Access:
private
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yml@acce7c6dd419edfa006644af62709fbc979d760f -
Trigger Event:
release
-
Statement type: