Agent groups a model, instructions, tools, and optional memory. Calling agent.run creates and runs a task with that agent.
Assign an agent to a task
agents=[editor] with marvin.run or Task, and agent=editor with helpers such as cast and extract.
Models and tools
Setmodel="provider:model-name" or pass a Pydantic AI model instance. Pass ordinary Python functions in tools=[...]. See model configuration and tools and context.
An agent does not store conversation history itself. Reuse a thread to retain messages across calls, or attach memory for searchable facts.
For multiple agents, coordinate their calls explicitly in Python. The team classes are deprecated.