Skip to content

Commit

Permalink
Merge pull request #1013 from PrefectHQ/update-readme
Browse files Browse the repository at this point in the history
Update readme
  • Loading branch information
jlowin authored Jan 15, 2025
2 parents 07ac24a + 21e60c2 commit f4dd8bd
Show file tree
Hide file tree
Showing 2 changed files with 44 additions and 1 deletion.
43 changes: 43 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,48 @@
![Marvin Banner](docs/assets/img/it_hates_me_hero.png)

## MIGRATION NOTES

> ⚠️ **Important:** Marvin 3.0 is currently in very active development. The API may undergo breaking changes, and documentation is still being updated. Use with caution.

Marvin 3.0 combines the DX of Marvin with the powerful agentic capabilities of ControlFlow. Both Marvin and ControlFlow users will find a familiar interface, but there are some key changes to be aware of, in particular for ControlFlow users:

### Key Changes
- **Pydantic AI**: Marvin 3.0 uses Pydantic AI for LLM interactions, and supports the full range of LLM providers that Pydantic AI supports. ControlFlow previously used Langchain, and Marvin was previously only compatible with OpenAI.
- **Flow → Thread**: The `Flow` concept has been renamed to `Thread`. Update your imports and usage:
```python
import marvin

with marvin.Thread(thread_id="optional-id-for-recovery"):
marvin.run("do something")
marvin.run("do another thing")
```

- **Database Changes**: Thread/message history is now stored in SQLite. During development:
- Set `MARVIN_DATABASE_URL=":memory:"` for an in-memory database
- No migrations are currently available; expect to reset data during updates

### New Features
- **Swarms**: Use `marvin.Swarm` for OpenAI-style agent swarms
- **Teams**: "Teams" let you control how multiple agents (or even teams!) work together. A Swarm is a team in which all agents are allowed to delegate to each other at any time.
- **Marvin Functions**: All your favorite Marvin functions are back:
- `@marvin.fn`
- `marvin.classify`
- `marvin.cast`
- `marvin.extract`
- `marvin.cast`
-
and more!

### Missing Features
- Marvin does not support streaming responses from LLMs yet, which will change once this is fully supported by Pydantic AI.

### Migration Tips
1. Replace `import controlflow` with `import marvin`
2. Update all `Flow` references to `Thread`
3. Review database persistence needs and configure accordingly
4. Test thoroughly as you migrate - APIs may change during the 3.0 development

# Marvin

**✨ A delightful framework for building AI agents ✨**
Expand Down
2 changes: 1 addition & 1 deletion src/marvin/settings.py
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ def validate_home_path(cls, v: Path) -> Path:
)

@model_validator(mode="after")
def validate_database_path(self) -> Self:
def validate_database_url(self) -> Self:
"""Set and validate the database path."""
# Set default if not provided
if self.database_url is None:
Expand Down

0 comments on commit f4dd8bd

Please sign in to comment.