Marvin uses language models to turn unstructured input into Python values and to run tasks with tools. Pydantic AI handles model access and validates outputs.
import marvinamount = marvin.cast("three dollars and fifty cents", float)labels = marvin.classify("The service was excellent", ["positive", "negative"])
Start with a function when you need one result. Use an agent to reuse instructions and tools, a task to track an objective, and a thread to share conversation history.Model outputs vary. Validating a result’s type does not establish that its content is correct.Install Marvin, follow the quickstart, or browse the examples.
⌘I
Assistant
Responses are generated using AI and may contain mistakes.