Skip to content

Commit 694d2bf

Browse files
authored
Readme and docs (#1155)
* update readme and doc * one more
1 parent c612821 commit 694d2bf

3 files changed

Lines changed: 12 additions & 19 deletions

File tree

README.md

Lines changed: 4 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -2,29 +2,21 @@
22

33
# Marvin
44

5-
Marvin is a Python framework for building agentic AI workflows.
5+
Marvin is a Python framework for producing structured outputs and building agentic AI workflows.
66

7-
Marvin provides a structured, developer-focused framework for defining workflows and delegating work to LLMs, without sacrificing control or transparency:
7+
Marvin provides an intuitive API for defining workflows and delegating work to LLMs:
88

9+
- Cast, classify, extract, and generate structured data from any inputs.
910
- Create discrete, observable **tasks** that describe your objectives.
1011
- Assign one or more specialized AI **agents** to each task.
1112
- Combine tasks into a **thread** to orchestrate more complex behaviors.
1213

13-
14-
> [!WARNING]
15-
>
16-
> 🚧🚨 Marvin 3.x is under active development, reflected on the `main` branch of this repo. The API may undergo breaking changes, and documentation is still being updated (can be found at [marvin.mintlify.app](https://marvin.mintlify.app)).
17-
1814
## Installation
1915

2016
Install `marvin`:
2117

2218
```bash
23-
# with pip
24-
pip install marvin
25-
26-
# with uv
27-
uv add marvin
19+
uv pip install marvin
2820
```
2921

3022
Configure your LLM provider (Marvin uses OpenAI by default but natively supports [all Pydantic AI models](https://ai.pydantic.dev/models/)):

docs/functions/cast.mdx

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -117,16 +117,18 @@ print(f"{address.street}, {address.city}, {address.country}")
117117
Use instructions to control how text is interpreted and formatted:
118118

119119
```python
120+
from typing import Annotated
120121
import marvin
122+
from pydantic import Field
121123

122124
phone = marvin.cast(
123-
"call me at 1-800-555-0123",
124-
str,
125-
instructions="Extract just the phone number in XXX-XXXX format"
125+
"call me at 800-555-0123",
126+
Annotated[str, Field(pattern=r"\d{1}-\d{3}-\d{3}-\d{4}")],
127+
instructions="extract the phone number and assume the country code is 1"
126128
)
127129
print(phone)
128130
```
129131

130132
```python
131-
"555-0123"
133+
"1-800-555-0123"
132134
```

docs/functions/generate.mdx

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -127,14 +127,13 @@ Generate lists and dictionaries:
127127

128128
```python
129129
import marvin
130-
from typing import List, Dict
131130

132131
# Generate a list of strings
133-
ingredients = marvin.generate(List[str], instructions="Generate recipe ingredients")
132+
ingredients = marvin.generate(list[str], instructions="Generate recipe ingredients")
134133
print(ingredients)
135134

136135
# Generate a dictionary
137-
menu = marvin.generate(Dict[str, float], instructions="Generate menu items with prices")
136+
menu = marvin.generate(dict[str, float], instructions="Generate menu items with prices")
138137
print(menu)
139138
```
140139

0 commit comments

Comments
 (0)