marvin  by PrefectHQ

Python framework for agentic AI workflows

Created 2 years ago
5,939 stars

Top 8.7% 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

2 days ago

Responsiveness

1 week

Pull Requests (30d)
22
Issues (30d)
7
Star History
75 stars in the last 30 days

Explore Similar Projects

Starred by Andrew Ng Andrew Ng(Founder of DeepLearning.AI; Cofounder of Coursera; Professor at Stanford), Thomas Wolf Thomas Wolf(Cofounder of Hugging Face), and
4 more.

ag2 by ag2ai

0.9%
4k
AgentOS for building AI agents and facilitating multi-agent cooperation
Created 10 months ago
Updated 2 days ago
Feedback? Help us improve.