Skip to content

Releases: PrefectHQ/marvin

v3.2.7

04 Mar 05:43
3e4d380

Choose a tag to compare

What's Changed

  • fix(mcp): merge custom env with os.environ for MCPServerStdio (#1296)
    • When users set env={"FOO": "bar"} on an MCPServerStdio, the subprocess was spawned with only those vars — missing PATH, HOME, etc., causing a TimeoutError during MCP server initialization.
    • Now always merges user-specified env on top of os.environ.

v3.2.6

22 Jan 18:01
377d08d

Choose a tag to compare

What's New

OpenAI Observability Integration (Beta)

Added marvin.beta.observability.openai module that enables tracing Marvin agent calls to OpenAI's observability dashboard. When running inside Prefect flows/tasks, it automatically captures runtime context (flow_run_id, task_run_id, deployment info) and sends it as request metadata.

Usage:

from prefect import flow, task
import marvin
from marvin.beta.observability.openai import observable

agent = marvin.Agent(name="analyst", model="openai:gpt-4o")

@task
async def summarize(text: str) -> str:
    return await observable(agent).run_async(f"Summarize: {text}")

@flow
async def my_pipeline(document: str):
    return await summarize(document)

View requests at https://platform.openai.com/logs and filter by prefect.flow_run.id to see all AI calls from one flow run.

Installation:

uv add "marvin[prefect]"

Full Changelog

v3.2.5...v3.2.6

v3.2.5

06 Jan 07:05
f280a8b

Choose a tag to compare

MCP Server Lifecycle Fix

This patch release fixes a critical issue where MCP servers were being restarted for each agent.run() call instead of staying alive for the session.

What was happening

When using MCP servers with agents, each agent.run() call would:

  1. Start the MCP server subprocess
  2. Run the agent
  3. Stop the MCP server subprocess

This caused unnecessary overhead and defeated the purpose of having persistent MCP connections.

What this release fixes

#1260: MCP servers now persist across multiple agent.run() calls within the same Thread context:

import marvin
from pydantic_ai.mcp import MCPServerStdio

hub_mcp = MCPServerStdio(command="uvx", args=["some-mcp-server"])
agent = marvin.Agent(mcp_servers=[hub_mcp])

with marvin.Thread():
    agent.run("first query")   # starts MCP server
    agent.run("second query")  # reuses running server ✓
    agent.run("third query")   # reuses running server ✓
# Thread exits → MCP server cleaned up

#1261: Fixed a follow-up issue where MCP cleanup could fail when Thread.__exit__ was called from an async context (the orchestrator). The cleanup now happens properly in the orchestrator's async finally block.

Full Changelog

v3.2.4...v3.2.5

v3.2.4

22 Dec 04:33
ddb6822

Choose a tag to compare

What's Changed

Docs 📚

  • fix: remove stale delegates parameter from Agent documentation by @zzstoatzz in #1241
  • docs: replace all uv pip commands with uv add by @zzstoatzz in #1242
  • fix: dispose engine after import-time table creation by @zzstoatzz in #1256

Other Changes 🦾

New Contributors

Full Changelog: v3.2.3...v3.2.4

known unknowns

03 Nov 03:28
fa70cc9

Choose a tag to compare

What's Changed

Other Changes 🦾

Full Changelog: v3.2.2...v3.2.3

failure is not an option

30 Sep 16:57
91b5581

Choose a tag to compare

What's Changed

Other Changes 🦾

Full Changelog: v3.2.1...v3.2.2

splitbrain

16 Sep 19:35
0f8e957

Choose a tag to compare

What's Changed

fix

  • feat: enable true concurrent execution for independent tasks by @zzstoatzz in #1229

Other Changes 🦾

  • Slackbot: ignore edits while initial response is in progress by @zzstoatzz in #1224
  • Slackbot: dedupe only the root message; process replies normally by @zzstoatzz in #1225
  • Slackbot: per-message dedupe; ignore only edits while in-progress by @zzstoatzz in #1226

Full Changelog: v3.2.0...v3.2.1

so long 3.9, no one will miss you

29 Aug 18:32
8dc1e91

Choose a tag to compare

This release deprecates Team and all its subclasses because they don't work as well as something in the public API should

What's Changed

Docs 📚

Full Changelog: v3.1.6...v3.2.0

v3.1.6

27 Aug 16:01
69b6374

Choose a tag to compare

What's Changed

New Features 🎉

fixes

  • Fix Team.get_agentlet() signature for MCP server compatibility by @zzstoatzz in #1219

docs

New Contributors

Full Changelog: v3.1.5...v3.1.6

v3.1.5

20 Aug 17:06
b8c12d7

Choose a tag to compare

What's Changed

Other Changes 🦾

  • Update Slackbot documentation to reflect current implementation by @zzstoatzz in #1204
  • Fix pydantic-ai deprecation warning: mcp_servers -> toolsets by @zzstoatzz in #1206
  • Fix IndexError in streaming when ToolCallPartDelta is present by @zzstoatzz in #1208

Full Changelog: v3.1.4...v3.1.5