marvin  by PrefectHQ

Python framework for agentic AI workflows

created 2 years ago
5,832 stars

Top 9.0% on sourcepulse

GitHubView on GitHub
Project Summary

Marvin is a Python framework for building agentic AI workflows, designed for developers who need structured, observable, and controllable LLM-powered applications. It allows users to define discrete tasks, assign specialized AI agents, and orchestrate complex behaviors with transparency and flexibility.

How It Works

Marvin leverages a task-centric architecture, breaking down complex objectives into manageable units. It supports specialized AI agents that can be configured with specific instructions and models, enabling efficient problem-solving. The framework emphasizes type-safe results, bridging the gap between AI outputs and traditional software through Pydantic integration. It also facilitates multi-agent orchestration and thread management for coordinating agentic loops and sharing context.

Quick Start & Requirements

  • Install with pip: pip install marvin or uv add marvin
  • Configure LLM provider: export OPENAI_API_KEY=your-api-key (OpenAI is default, Pydantic AI supported)
  • See examples and documentation: https://github.com/PrefectHQ/marvin

Highlighted Details

  • Agentic Control Flow: Integrates ControlFlow concepts for advanced agent orchestration, planning, and multi-agent coordination.
  • Structured Output Utilities: Provides marvin.extract, marvin.cast, marvin.classify, and marvin.generate for robust data handling with LLMs.
  • Tool Integration: Tasks can utilize custom tools to interact with external code and data.
  • Pydantic AI Backend: Supports a wide range of LLM providers through Pydantic AI, offering flexibility beyond OpenAI.

Maintenance & Community

Marvin 3.0 is under active development. The project is associated with PrefectHQ. Links to community channels are not explicitly provided in the README.

Licensing & Compatibility

The project is licensed under the MIT License, permitting commercial use and closed-source linking.

Limitations & Caveats

Marvin 3.0 is in active development with potential for breaking API changes. Streaming responses from LLMs are not yet supported. Database migrations for thread/message history are not available, requiring data resets during updates.

Health Check
Last commit

1 week ago

Responsiveness

1 week

Pull Requests (30d)
6
Issues (30d)
2
Star History
193 stars in the last 90 days

Explore Similar Projects

Feedback? Help us improve.