Marvin is a lightweight AI engineering toolkit for building natural language interfaces that are reliable, scalable, and easy to trust.
- use the repros folder to reproduce the results (e.g.
uv run repros/1234.py) - this folder is not checked into git
- Aggressively minimal and elegant: Keep implementations simple and focused
- Functional first: Prefer functional approaches, use classes where justified
- Type-safe: Full type annotations, modern Python syntax (3.10+)
- Private internals: Keep implementation details "private" (e.g.
def _impl)
- Engine: Core AI interaction layer
- Tasks: Structured AI task definitions and execution
- Tools: Extensible function calling capabilities
- Agents: AI agents with tool access and memory
- Memory: Persistent conversation and context storage
- Handlers: Event processing and routing
- CLI: Command-line interface for common operations
- Use
X | Yinstead ofUnion[X, Y] - Use builtins like
list,dictinstead oftyping.List,typing.Dict - Use
T | Noneinstead ofOptional
- Use
uvfor dependency management and script execution - Install deps:
uv syncoruv sync --extra foo - Run scripts:
uv run some/script.pyoruv run --with pandas script.py - Testing:
uv run pytestoruv run pytest -n3for parallel
- Use
rgfor searching, not grep - Use
lsandtreefor navigation - Check git context with using the GitHub MCP server
- Think like a hacker with good intentions - search in site-packages when needed
- Empirically understand by running code
- Linter tells basic truths but may be orthogonal to goals
- Don't obsess over upstream linter errors, use as clues when relevant