Vibe SDK
Project description
Vibe SDK
High-level agent interface for the Vibe protocol.
Quick Start
from mistralai.vibe.protocol.patterns.completion.adapters.mistral import MistralCompletion
from mistralai.vibe.sdk import Agent, AgentConfig
completion = MistralCompletion.from_env(model="mistral-large-latest")
agent = Agent(
config=AgentConfig(model="mistral-large-latest"),
completion=completion,
)
# Async
async with agent.session() as session:
async for state in session.run("Hello"):
print(state)
# Sync
with agent.session_sync() as session:
for state in session.run("Hello"):
print(state)
Custom Local Tasks
To customize the underlying task implementation, pass an
agent_task_factory. The factory receives the compiled AgentTaskConfig
and the runtime completion, then returns any Task implementation.
completion is still passed to Agent; the factory just receives it
explicitly instead of capturing it through a partial.
from mistralai.vibe.protocol import AgentTask
from mistralai.vibe.protocol.patterns.completion.adapters.mistral import MistralCompletion
completion = MistralCompletion.from_env(model="mistral-large-latest")
def build_task(task_config, completion):
return AgentTask(
completion=completion,
tasks={"my_tool": MyTask()},
model_name=task_config.model,
name=task_config.name,
system_prompt=task_config.system_prompt,
max_iterations=task_config.max_iterations,
)
agent = Agent(
config=AgentConfig(model="mistral-large-latest"),
completion=completion,
agent_task_factory=build_task,
)
Durable Tasks
Use the durable helper when you want Agent sessions to start
workflow-backed tasks instead of local AgentTask instances. Install the
workflow extra and import the helper from the workflow namespace.
from mistralai.client import Mistral
from mistralai.vibe.sdk.workflow import create_durable_agent_task_factory
client = Mistral(api_key="...").workflows
agent = Agent(
config=AgentConfig(model="mistral-large-latest"),
completion=completion,
agent_task_factory=create_durable_agent_task_factory(
client=client,
task_queue="agents",
),
)
Project details
Release history Release notifications | RSS feed
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.2.0.tar.gz.
File metadata
- Download URL: mistralai_vibe_sdk-0.2.0.tar.gz
- Upload date:
- Size: 14.8 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
1112840e62cf60d4fac5bc4febe034b02446e6c233242c59c6efdfd5824315e1
|
|
| MD5 |
82cb1be60ded747d5c4d106224197c23
|
|
| BLAKE2b-256 |
5d46ad6da6e4fcfc980a8a819ddbdd26329c2b1f35bfd8e06718cfb503318998
|
Provenance
The following attestation bundles were made for mistralai_vibe_sdk-0.2.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.2.0.tar.gz -
Subject digest:
1112840e62cf60d4fac5bc4febe034b02446e6c233242c59c6efdfd5824315e1 - Sigstore transparency entry: 1409568288
- Sigstore integration time:
-
Permalink:
mistralai/vibe-sdk@272017a0f16d6183ee91067bb683e68786c3db6f -
Branch / Tag:
refs/heads/main - Owner: https://github.com/mistralai
-
Access:
internal
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yml@272017a0f16d6183ee91067bb683e68786c3db6f -
Trigger Event:
workflow_dispatch
-
Statement type:
File details
Details for the file mistralai_vibe_sdk-0.2.0-py3-none-any.whl.
File metadata
- Download URL: mistralai_vibe_sdk-0.2.0-py3-none-any.whl
- Upload date:
- Size: 23.8 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 |
b47e63437033c08fadad937bb25c157ef179a5f2c1740c1765508622b9f3582c
|
|
| MD5 |
9947d4e343e4394ec9bb006573086fd8
|
|
| BLAKE2b-256 |
9a258c8bb5fa68b570505f2c01def496ef12acd46424679b467622a53f97a485
|
Provenance
The following attestation bundles were made for mistralai_vibe_sdk-0.2.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.2.0-py3-none-any.whl -
Subject digest:
b47e63437033c08fadad937bb25c157ef179a5f2c1740c1765508622b9f3582c - Sigstore transparency entry: 1409568312
- Sigstore integration time:
-
Permalink:
mistralai/vibe-sdk@272017a0f16d6183ee91067bb683e68786c3db6f -
Branch / Tag:
refs/heads/main - Owner: https://github.com/mistralai
-
Access:
internal
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yml@272017a0f16d6183ee91067bb683e68786c3db6f -
Trigger Event:
workflow_dispatch
-
Statement type: