Releases: PrefectHQ/marvin
v3.2.7
What's Changed
- fix(mcp): merge custom env with
os.environforMCPServerStdio(#1296)- When users set
env={"FOO": "bar"}on anMCPServerStdio, the subprocess was spawned with only those vars — missingPATH,HOME, etc., causing aTimeoutErrorduring MCP server initialization. - Now always merges user-specified env on top of
os.environ.
- When users set
v3.2.6
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
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:
- Start the MCP server subprocess
- Run the agent
- 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
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 🦾
- Add AIML API provider-specific example scripts by @D1m7asis in #1243
- run ruff by @zzstoatzz in #1245
- feat: integrate Claude Agent SDK for code-aware research by @zzstoatzz in #1244
- fix: install claude code CLI in slackbot docker image by @zzstoatzz in #1247
- fix: teach research agent to use docs and verify links by @zzstoatzz in #1248
- feat: integrate learning-sdk into slackbot for persistent memory by @zzstoatzz in #1249
- chore: consolidate slackbot memory on letta learning-sdk by @zzstoatzz in #1250
- fix: use async with for learning context manager by @zzstoatzz in #1252
- revert: remove letta learning-sdk integration by @zzstoatzz in #1253
- remove channel restrictions from slackbot by @zzstoatzz in #1254
New Contributors
Full Changelog: v3.2.3...v3.2.4
known unknowns
What's Changed
Other Changes 🦾
- use claude haiku 4.5 for research agent by @zzstoatzz in #1234
- fix github label validation and error handling by @zzstoatzz in #1235
- update atproto SDK to v0.0.63 and fix timeseries example by @zzstoatzz in #1236
- delete cursor rules by @zzstoatzz in #1238
- fix: handle PartEndEvent from pydantic-ai 1.9.0+ by @zzstoatzz in #1240
Full Changelog: v3.2.2...v3.2.3
failure is not an option
What's Changed
Other Changes 🦾
- fix: allow None results for Optional task types by @zzstoatzz in #1232
Full Changelog: v3.2.1...v3.2.2
splitbrain
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
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 📚
- Deprecate Teams feature due to fundamental issues by @zzstoatzz in #1221
- Modernize codebase for Python 3.10+ by @zzstoatzz in #1223
Full Changelog: v3.1.6...v3.2.0
v3.1.6
What's Changed
New Features 🎉
fixes
- Fix Team.get_agentlet() signature for MCP server compatibility by @zzstoatzz in #1219
docs
- simplify readme by @zzstoatzz in #1215
New Contributors
Full Changelog: v3.1.5...v3.1.6
v3.1.5
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