Experimental
The names in mistralai.agents.experimental, and the warning some features give. A minor release may change them, with a changelog line that starts "Experimental:"; a patch release does not.
| Name | What it is |
|---|---|
ExperimentalWarning | A call was given an experimental keyword: a minor release may change or remove it. |
experimental.JsonFileSessionJournal | The JSON file that saves one local root session. |
ExperimentalWarningExperimentalWarning
class ExperimentalWarning(UserWarning)A call was given an experimental keyword: a minor release may change or remove it.
Each keyword warns once per process. Hide them all with AGENTS_SDK_EXPERIMENTAL_WARNINGS=0,
or in code with warnings.filterwarnings("ignore", category=agents.ExperimentalWarning).
experimental.JsonFileSessionJournalexperimental.JsonFileSessionJournal
class JsonFileSessionJournal(path: str | PathLike[str])The JSON file that saves one local root session. Experimental: a minor release may change it.
Pass JsonFileSessionJournal.in_directory("./sessions") as journal_factory= to
agents.local_runtime(), and each root session of the block is saved in
./sessions/<session id>/. A later process with the same agent and the same directory
continues it with agent.session(session_id). An agent.run() in the block saves its
session too. The factory is fixed when the event loop's runtime starts: entering a block with
another one while the runtime runs raises SdkError.
The uploads that its messages linked are saved next to the file, in <file stem>.files.
| Attribute | Type | Description |
|---|---|---|
path | Path | The JSON file of the session. |
experimental.JsonFileSessionJournal.in_directoryexperimental.JsonFileSessionJournal.in_directory
@classmethod
def in_directory(
directory: str | PathLike[str],
) -> Callable[[str], experimental.JsonFileSessionJournal]Return the journal_factory that saves each session in directory/<session id>/session.json.