# Local AI agent with Ollama and PydanticAI

> Deploy local LLMs using Ollama and build tool-calling Python agents with PydanticAI.

Page: https://videotomd.com/b/ByWCsa8DbF8/
Tool: Ollama · Tags: ollama, python, agent, local-models · 175 words, about 228 tokens
Pills: free · Python · checked 2026-10-09 · Ollama · Any AI · file tools · shell · on demand · frontier · coding

## Recipe

- Kind: workflow
- Stage: not set
- Loads: on demand
- Works in: Ollama, Any AI
- Needs: file tools, shell
- Bring: Python
- Cost: free
- Model: frontier
- Tested in: not yet
- Checked: 2026-10-09
- For: coding

## Put it here

Loads on demand: paste or attach it when the task comes up. To have it every session, put it where your tool reads instructions:

- Ollama: Put the text in a Modelfile as SYSTEM """...""" with FROM <model> and PARAMETER num_ctx <n>, then `ollama create <name> -f Modelfile` and run <name>. Chat-only: paste it as the first message instead. Reload: ollama create again. Check it loaded: `ollama show --modelfile <name>` prints the SYSTEM; `ollama ps` shows the loaded context size. Source: https://docs.ollama.com/modelfile (checked 2026-10-12).
- Any AI: Coding agent: save as AGENTS.md in the project root (read natively by Codex, Cursor, Copilot, Gemini CLI, Kiro, Devin, Cline, Roo, OpenHands, OpenCode, Goose, Amp, Zed, Warp, Junie, Factory and Jules; Claude Code when no CLAUDE.md exists; Aider with --read). Chat: paste it first. Reload: new session. Check it loaded: ask it to repeat one rule from the file. Source: https://agents.md/ (checked 2026-10-12).

## Access

Membership: plans at https://videotomd.com/pricing/, or email then a plan at https://videotomd.com/b/ByWCsa8DbF8/. A member's browser downloads the file there; an AI without that session needs the member to attach it.
