Group meeting · 20 minutes including discussion
Using AI Agents for Research
How language models and agent harnesses work, how to run them on our own hardware, and how I use agents for reproducible research.
Presentation keys: ← / → or Space move one animation step at a time · Home / End first / last · Esc exits fullscreen. Controls keep their normal keys.
- The model
- Context
- The harness
- Tools and apps
- Running it locally
- Several agents
- The repository
- What’s next
Opening · What I’ve been working on1 / 47
Data analysis by voice, 1990
Star Trek: The Next Generation, “Transfigurations”.
- Match: no correlation
- Assume, and derive
- Test a hypothesis
- Project the answer
In the 1990 Star Trek: The Next Generation episode “Transfigurations”, Data and La Forge decode an alien navigational chart by speaking to the ship’s computer. They ask it to match the chart to known stars and get no correlation. They state an assumption and have it derive gravitational values. They state another, test it against a pulsar of a specific period, and then have it project the flight path back to its origin. Running an analysis by describing it, and revising the assumptions when it fails, was science fiction then. It is ordinary now.
Speaker notes · 35 seconds
I want to start with a show I grew up watching. This is Star Trek: The Next Generation, an episode from 1990. Data and Geordi have an alien star chart and no idea where it’s from, and they work it out by talking to the computer. Data asks it to run the calculations and match the chart to known stars. No correlation. So he changes the assumption: suppose these paths are course corrections, and derive the gravity of whatever they bent around. One of those objects looks like a pulsar. So he tests that: is there a pulsar with exactly this period in range? Affirmative. And Geordi has it project the flight path back to where it started. That is a real analysis. A model, a failed fit, a new assumption, a test, a prediction. And nobody writes a line of code. They say what they want and change their minds as they go. When I watched that as a kid it was pure science fiction, and I never thought I’d see it in my lifetime. It is now roughly how I spend my working day. The rest of this talk is about how that became real and how to use it.
- The model
- Context
- The harness
- Tools and apps
- Running it locally
- Several agents
- The repository
- What’s next
Opening · What I’ve been working on2 / 47
Using AI Agents for Research
A lot is happening, and the vocabulary is confusing. This talk is a map.
- A lot of new words
- Know the tools, know the words, use them well
- Seven parts
There are many new tools and many new words: harness, MCP, context window, quantization, subagents. I’m one researcher still working out how to use them. The aim of this talk is that everyone leaves knowing what the tools are, what the terms mean, and how I’ve been using them.
Speaker notes · 36 seconds
I should say where I’m coming from. I’m not an AI researcher. I’m one researcher in this group who has been figuring out how to use these tools for my own work, in a landscape that changes every week. And there’s a lot going on. You’ve probably heard most of these words, and they pile up quickly. So I have three goals. I’d like everyone to leave knowing what the tools are, what the words mean, and how I’ve been using them, including what hasn’t worked. The words sort into seven groups, and those groups are the structure of the talk. Given how quickly my own workflow has changed, there’s a fair chance I’ll recommend a tool I’ve stopped using by next week. I hope the practical lessons last a little longer.
- The model
- Context
- The harness
- Tools and apps
- Running it locally
- Several agents
- The repository
- What’s next
Opening · What I’ve been working on3 / 47
How we got here
Nine years from a research paper to agents that work on their own.
- 2017 to 2021: research
- 2022 to 2023: chat
- 2024 to 2026: tools and agents
- Local AI
The transformer was introduced in 2017 in the paper Attention Is All You Need. GPT-1 followed in 2018 and GPT-3 in 2020, which showed in-context learning, and Anthropic was founded in 2021. Fine-tuning and reinforcement learning produced assistants, and ChatGPT arrived at the end of 2022, followed by GPT-4 and Claude in 2023. Tool calling came in 2023, reasoning models in 2024 and MCP in late 2024, and coding agents such as Claude Code and Codex arrived in 2025, along with GPT-5 and Google Antigravity. In parallel, llama.cpp and Ollama made local models practical in 2023, and by 2026 open-weight models such as Qwen3.8-27B and Inkling 2 Mini, with engines such as Strata, run capable agents on a laptop.
Speaker notes · 40 seconds
A little history, because it explains why this feels sudden. The architecture behind all of these models comes from one 2017 paper, Attention Is All You Need. For five years this was a research topic: the models could complete text, and each GPT was better at it. GPT-3 in 2020 showed in-context learning: give it a few examples in the prompt and it follows the pattern. Anthropic was founded in that period. Then fine-tuning and reinforcement learning turned a text completer into an assistant, and at the end of 2022 ChatGPT put that behind a chat box. The step that matters for us came next. Models learned to call tools in 2023. Reasoning models, which think before they answer, arrived in 2024. MCP gave them a standard way to reach other software, and in 2025 the coding agents arrived: Claude Code, Codex, then agent-first tools like Antigravity. Now a model can work on a task for hours. Underneath runs a second story. In 2023 llama.cpp and Ollama made it practical to run models on your own machine, and this year open-weight models and engines like Strata reached the point where a laptop can run a capable agent. Each step solved a problem: first fluency, then conversation, then acting on the world, then doing it on our own hardware.
- The model
- Context
- The harness
- Tools and apps
- Running it locally
- Several agents
- The repository
- What’s next
Opening · What I’ve been working on4 / 47
Good practice is cheap now
Version control, tests and automatic checks should be standard for research code, even on small projects.
- Good practice takes effort
- Agents take the effort
- Everything goes through GitHub
- Good practice is cheap now
Branches, pull requests, tests and automatic checks are practices we know are good and often skip because they take effort. AI agents take most of that effort away, and the same practices are how I review what agents do. They should now be standard for research code, even on small or one-off projects.
Speaker notes · 31 seconds
So where does that leave someone like me? The biggest change by far has been in writing code. We all know what good practice looks like for research code. Work on a branch. Make each change a pull request. Write tests. Have checks run automatically, which is continuous integration. And most of us skip most of it, because it costs time we don’t have, especially on a small or one-off project. That cost is what changed. Agents take on nearly all of the effort, so these practices are close to free. They’ve also become essential to how I review what agents do. Nearly everything I do now goes through GitHub. So one argument of this talk is simple: version control and continuous integration should now be standard for research code, even on small or one-off projects.
- The model
- Context
- The harness
- Tools and apps
- Running it locally
- Several agents
- The repository
- What’s next
Opening · What I’ve been working on5 / 47
unwrap: where do animals point?
A package for modeling animal headings, shown through bat homing.
- The homing experiment
- The model’s heading densities
- 126 pull requests
- Notebooks to a tested package
unwrap is our package for Bayesian circular regression: models for where animals point and how consistently. The example here is bat homing. Agents organized the analysis notebooks into modules, added tests that run on every change, and rebuilt the publication figures from code.
Speaker notes · 25 seconds
unwrap is a package for circular statistics. Headings are angles, so ordinary regression doesn’t work. This is the example I’ll keep coming back to. Goldshtein and colleagues moved Kuhl’s pipistrelle bats away from their roost with vision, the magnetic sense or smell blocked, and tracked them home. Every step of a flight has a heading relative to the roost. unwrap fits two things: where those headings point, and how consistently. Then you can ask whether a treatment changes either one. I had analyses like this as long exploratory notebooks. Agents organized them into a package with tests and rebuilt the figures from code, one small pull request at a time.
- The model
- Context
- The harness
- Tools and apps
- Running it locally
- Several agents
- The repository
- What’s next
Opening · What I’ve been working on6 / 47
The honeybee nest atlas
Every cell of a nest, mapped through a season.
- The mapped nest
- Cell contents
- Regenerated figures
Our honeybee nest paper maps how a colony organizes brood and food across its combs over a season. The original analysis lived in two large notebooks. Agents turned them into a package that reruns from a fresh checkout, with tests that compare recomputed values with the numbers reported in the paper.
Speaker notes · 20 seconds
The second project is the code for our honeybee nest paper, which came out in Current Biology in November. We recorded what is in every cell of every comb, brood, pollen, nectar or nothing, and followed whole nests through a season. Then we trained a model to predict a hidden cell from the cells around it, which tells us how the colony organizes the nest. The analysis lived in two very large notebooks. Agents turned those into a package that anyone can install and rerun, and the tests check the recomputed statistics against the numbers in the paper. I’ll come back to this one when we get to reproducibility.
- The model
- Context
- The harness
- Tools and apps
- Running it locally
- Several agents
- The repository
- What’s next
Opening · What I’ve been working on7 / 47
Interactive pages
Pages where the model runs in the browser.
- Bat explorer
- Honeybee nest
- Circular statistics
- This talk
The third project is a set of interactive pages on my website: an explorer for the bat flights, the honeybee nest in three dimensions, and a page that fits circular models live. These slides are one of those pages.
Speaker notes · 18 seconds
The third project is communication. These are pages on my website where the model runs in your browser. You can follow an individual bat’s flight, rotate the honeybee nest, or watch a circular model fit. I would not have built these by hand. This talk is one of them: the slides are a web page that agents drew, and automated checks verify it.
- The model
- Context
- The harness
- Tools and apps
- Running it locally
- Several agents
- The repository
- What’s next
Opening · What I’ve been working on8 / 47
More than writing code
Agents are most useful on the work around the code.
- Organize
- Reproduce
- Refactor
- Translate
- Speed up
- Outputs must match
Generating new code is the obvious use. I’ve found agents more useful for organizing exploratory notebooks into modules, reproducing published analyses, refactoring, translating code into the language I read best, and porting slow code to Rust or the GPU. Each of these is only worth having if the outputs still match, and checking that remains the slow part.
Speaker notes · 37 seconds
Generating code is the obvious use, and it’s not where I’ve found the most value. These are the five things I’ve used agents for. Organizing: an exploratory notebook becomes a package. Reproducing: rerunning a published analysis from its data. Refactoring: restructuring code without changing what it computes. Translating: I think reading code will stay important for a while, so being able to move an analysis into whichever language you read best matters, as long as the outputs match. And speeding up: porting slow code to Rust or to the GPU with CUDA can give very large speedups. Every one of these depends on verifying that the result is the same, and verification is still a massive bottleneck. I’ll come back to that.
- The model
- Context
- The harness
- Tools and apps
- Running it locally
- Several agents
- The repository
- What’s next
Part 1 · The model9 / 47
How does a language model work?
Start with the model itself.
- Up nextThe model
- LaterContext
- LaterThe harness
- LaterTools and apps
- LaterRunning it locally
- LaterSeveral agents
- LaterThe repository
- LaterWhat’s next
Speaker notes · 5 seconds
Start with the model itself.
- The model
- Context
- The harness
- Tools and apps
- Running it locally
- Several agents
- The repository
- What’s next
Part 1 · The model10 / 47
The model reads tokens
Text becomes tokens, each token becomes numbers, and each token looks back at the ones before it.
- The request
- Tokens
- Numbers for each token
- Attention
A language model doesn’t read words. The text is split into tokens, and each token is turned into a list of numbers. In every layer, each token then looks back at the earlier tokens and takes in information from the ones that matter to it. That step is called attention.
Speaker notes · 25 seconds
Take a request like the one that started the bat work. The model first splits it into tokens, which are words or pieces of words. Each token is looked up in a table and becomes a list of numbers, shown here as a column of cells. Then comes the step that makes these models work. Each token looks back at the tokens before it and pulls in information from the relevant ones. That is attention, and the next slide shows how it works.
- The model
- Context
- The harness
- Tools and apps
- Running it locally
- Several agents
- The repository
- What’s next
Part 1 · The model11 / 47
Attention: a query against stored keys and values
The current token asks a question, and the conversation so far answers it.
- Q: the current token’s query
- K and V: stored for each earlier token
- Compare the query with each key
- Mix in the matching values
In each layer, the current token produces a query. Every earlier token has a stored key and a stored value. The query is compared with every key, and the values of the best matches are mixed into the current token. The stored keys and values are the cache of the conversation.
Speaker notes · 36 seconds
Here is attention more exactly, because it explains the rest of the talk. Take one token, ‘notebook’. It produces a query, Q: roughly, what am I looking for? Every earlier token already has two things stored: a key, K, which says what it offers, and a value, V, which is what it passes on. The query is compared with every key. Where they match well, that token’s value is mixed into the current token. So ‘notebook’ ends up carrying ‘exploratory’ and ‘bat’ with it. This happens in every layer. The stored keys and values for the whole conversation are the KV cache. The query belongs to the token being processed now, and the keys and values are the stored conversation it is querying. The match strengths here are illustrative.
- The model
- Context
- The harness
- Tools and apps
- Running it locally
- Several agents
- The repository
- What’s next
Part 1 · The model12 / 47
It predicts one token, then repeats
Every reply is built one token at a time.
- Tokens go in
- Scores for the next token
- One token is appended
- Repeat
The model takes all the tokens so far and produces a score for every token it could write next. One is chosen and added to the end. The longer sequence goes back in, and the model predicts again. A whole reply is this step repeated.
Speaker notes · 28 seconds
Now the tokens go through the model, which is a very large set of learned numbers called weights. Out comes a score for every possible next token. One is picked, here ‘Split’, and it is added to the end. Then everything, including that new token, goes back in and the model predicts the next one. That’s all a language model does: predict the next token from what is in front of it. Everything else in this talk is built around that loop. The percentages are from a toy example.
- The model
- Context
- The harness
- Tools and apps
- Running it locally
- Several agents
- The repository
- What’s next
Part 1 · The model13 / 47
How the predictions got good
Pre-training teaches the model language. Post-training makes it useful.
- Pre-training
- Fine-tuning
- Reinforcement learning
- Better predictions
A model is first pre-trained to predict the next token across a very large amount of text. That alone gives a system that continues text. Post-training makes it useful: supervised fine-tuning on examples of good answers, and reinforcement learning, where the model attempts a task, is scored, and is adjusted toward what scored well. All of this changes the same weights.
Speaker notes · 37 seconds
If all it does is predict the next token, why is it useful? Because of how it was trained, in stages. Pre-training comes first: predict the next token over a vast amount of text. That builds in grammar, facts and a lot of structure, but the result just continues whatever you give it. Then comes post-training. With supervised fine-tuning, or SFT, the model is shown examples of good answers and learns to respond like an assistant. With reinforcement learning, or RL, it tries a task, the attempt is scored, and the weights are nudged toward what scored well. That’s where much of the recent progress on coding and tool use has come from. It’s the same weights and the same next-token prediction throughout. The predictions just got much better.
- The model
- Context
- The harness
- Tools and apps
- Running it locally
- Several agents
- The repository
- What’s next
Part 1 · The model14 / 47
What stays fixed and what grows
The weights never change during a chat. The cache grows with every token.
- Weights: fixed
- Prefill: the prompt at once
- Decode: one token at a time
- The cache grows
Two things take memory. The weights are fixed and shared by every conversation. The cache belongs to one chat and holds a key and a value for each token so far, so the model doesn’t reprocess them. The prompt is processed all at once, which is the wait before the first word. The reply is then generated one token at a time, and every token adds to the cache.
Speaker notes · 34 seconds
Two things take memory, and the difference matters for the rest of the talk. The weights are the model itself: fixed, and the same for every chat. The cache belongs to your conversation. It keeps the keys and values for every token so far so they aren’t recomputed. When you press Send, the whole prompt is processed in one go. That’s called prefill, and it’s the pause before the first word. Then the reply is decoded one token at a time, each one reusing the cache and adding to it. So the longer the conversation, the bigger the cache. That matters for what comes next.
- The model
- Context
- The harness
- Tools and apps
- Running it locally
- Several agents
- The repository
- What’s next
Part 1 · The model15 / 47
Getting more from fixed weights
In-context learning, reasoning and test-time compute all happen while the model runs.
- Weights are fixed
- In-context learning
- Reasoning
- Test-time compute
Once training ends, the weights are fixed. Three things still improve the answer while the model runs. In-context learning: the model picks up a pattern from examples and material in its context. Reasoning: it produces intermediate tokens to work a problem out before answering. Test-time compute: letting it think for longer, or make and check several attempts, gives better answers at the cost of time and tokens. All three work through the context.
Speaker notes · 38 seconds
After training the weights are fixed. They don’t change while you use the model. So how does it adapt to your problem? Three related ideas. First, in-context learning. Put a few examples or the relevant files in the context, and the model follows the pattern without any retraining. Second, reasoning. Before answering, the model writes out intermediate steps as tokens, and attends back to them like any other tokens. Third, test-time compute, sometimes called test-time inference. You can let it think for longer, or try several approaches and check them, and the answers improve. That’s what the effort or thinking settings control. Notice that all three work through the context, and none of them changes the weights. That’s why the context matters so much, which is the next part.
- The model
- Context
- The harness
- Tools and apps
- Running it locally
- Several agents
- The repository
- What’s next
Part 2 · Context16 / 47
What does the model see?
The model only predicts from what it can see.
- CoveredThe model
- Up nextContext
- LaterThe harness
- LaterTools and apps
- LaterRunning it locally
- LaterSeveral agents
- LaterThe repository
- LaterWhat’s next
Speaker notes · 5 seconds
The model only predicts from what it can see.
- The model
- Context
- The harness
- Tools and apps
- Running it locally
- Several agents
- The repository
- What’s next
Part 2 · Context17 / 47
Everything the model sees is its context
The model only sees its context, and that window has a fixed size.
- Instructions and request
- The notebook
- Tool output and replies
The context window holds the instructions, my request, every file the model has read, every tool result and its own replies. It has a fixed size, and a working session fills it quickly.
Speaker notes · 25 seconds
We just saw that the model predicts from what is in front of it, and that every token is stored in the cache. Everything in front of the model is called its context. It has no memory of my project. It has one window holding the instructions, my request, the notebook it just read, the output of every command and its own replies. The window has a fixed size, and a working session fills it faster than you’d expect. One long notebook is already a large share.
- The model
- Context
- The harness
- Tools and apps
- Running it locally
- Several agents
- The repository
- What’s next
Part 2 · Context18 / 47
When the context fills
Something has to be dropped, and we don’t always know what.
- A full context
- Compaction
- Pruning
- Undisclosed strategies
When the window is full, the harness or the provider has to remove something. Compaction replaces older turns with a summary. Pruning removes pieces that look stale, such as old tool output. Providers also use other strategies that they don’t disclose. In every case detail is lost, and you may not be told which.
Speaker notes · 28 seconds
So what happens when the window fills? Something has to go. The best-known option is compaction: the older part of the conversation is replaced by a summary. That frees a lot of room and loses detail. Another is pruning, sometimes called dynamic context pruning: pieces that look stale, like the output of an old command, are dropped while the rest stays. And beyond those, the companies use strategies they don’t disclose. The practical lesson is the same in each case. After a long session, the model may no longer have something you told it earlier, and it won’t say so.
- The model
- Context
- The harness
- Tools and apps
- Running it locally
- Several agents
- The repository
- What’s next
Part 2 · Context19 / 47
Give context on purpose
A short, deliberate context works better than a full one.
- Everything at once: 94% full
- On purpose: 18% full
- New task, new session
Because the model only sees its context, what I put there matters more than how I phrase the request. Loading a whole project and a long chat fills the window with material the task doesn’t need. A fresh session with the request, the standing rules, a plan and the relevant files leaves room to work.
Speaker notes · 29 seconds
This is the most practical slide for those of you who already use these tools every day. The model only sees its context, so I choose what goes in. On the left is what happens by default: a long chat, the whole project, and the window is nearly full before the work starts. On the right is what I try to do. A fresh session, my request, the repository’s standing rules, a short plan, and the two files that matter. When the task changes, I start a new session instead of continuing an old one.
- The model
- Context
- The harness
- Tools and apps
- Running it locally
- Several agents
- The repository
- What’s next
Part 2 · Context20 / 47
Why long chats hit limits
A long chat is a large cache on a shared server.
- Chats share GPU memory
- A long chat grows
- Too many requests
- Chat can’t be loaded
Hosted assistants keep each conversation’s cache in memory on shared servers. A long chat takes a large share. When memory is full, new requests wait, which can appear as a rate-limit message. An idle long chat may be dropped to make room and then fail to load. The picture is schematic.
Speaker notes · 25 seconds
This is the same cache, seen from the provider’s side. Every conversation has its cache sitting in memory on a shared server. A long chat is a big block. When the server is full, a new request has to wait, and you may see ‘too many requests’. And an idle long chat is expensive to keep, so it can be dropped, which is one reason an old chat sometimes can’t be loaded. Providers don’t report the exact cause, so these are the likely explanations. The picture is schematic.
- The model
- Context
- The harness
- Tools and apps
- Running it locally
- Several agents
- The repository
- What’s next
Part 3 · The harness21 / 47
What turns a model into an agent?
A model alone only produces text.
- CoveredThe model
- CoveredContext
- Up nextThe harness
- LaterTools and apps
- LaterRunning it locally
- LaterSeveral agents
- LaterThe repository
- LaterWhat’s next
Speaker notes · 5 seconds
A model alone only produces text.
- The model
- Context
- The harness
- Tools and apps
- Running it locally
- Several agents
- The repository
- What’s next
Part 3 · The harness22 / 47
What sits behind a chat box?
An interface, a harness and a model server: three different programs.
- Interface: where I type
- Harness: tools, permissions, context
- Model server: generates tokens
- Any layer can run locally
ChatGPT, Claude Code and Codex each combine three parts. The interface is where I type. The harness runs the agent loop: it assembles the context, offers tools and asks for permission. The model server turns that context into the next tokens. The three parts can come from different providers and run on different machines.
Speaker notes · 25 seconds
Behind any of these products there are three programs. The interface is the chat window, terminal or editor. The harness is the word to remember. It is Claude Code, Codex or OpenCode: the program that decides what the model sees and carries out what the model asks for. The model server turns the context into tokens. Each of the three has hosted and local versions.
- The model
- Context
- The harness
- Tools and apps
- Running it locally
- Several agents
- The repository
- What’s next
Part 3 · The harness23 / 47
The model asks, the harness acts
The model can only request an action. The harness carries it out and returns the result.
- Request and tools
- Tool call: read the notebook
- Permission check
- File contents return
The model never opens the notebook. It replies with a request to read a file. The harness checks permission, reads the file and sends the contents back as more input. Each exchange adds to what the model has received.
Speaker notes · 29 seconds
This loop is the core of every agent. The harness sends my request with a list of tools. The model replies with a tool call, here a request to read the bat notebook. The harness checks whether that’s allowed, reads the file and sends the contents back. The model then decides what to do next. Watch the ring around the model. It shows how much the model has been sent, and the notebook fills a large part of it.
- The model
- Context
- The harness
- Tools and apps
- Running it locally
- Several agents
- The repository
- What’s next
Part 3 · The harness24 / 47
Handing off a longer task
Before an agent works on its own, I settle four things.
- The goal
- Access
- When to check in
- Evidence
For a task an agent will carry out on its own, I settle four things first: the goal, including what must not change; which files and tools it can use; when it should stop and ask; and what evidence it should bring back. For the bat notebook: split it into modules without changing the figure, work in this repository on a branch, stop if a prior or sampler setting would change, and return passing tests and the rebuilt figure.
Speaker notes · 34 seconds
This is how I approach a longer task that an agent carries out on its own. Four things, before it starts. First the goal, and it helps to say what must not change. For the bat notebook: split it into modules, and the figure must come out the same. Second, access: which files and tools it can use. Here that’s one repository, on a branch. Third, when to check in. I don’t want to approve every step, but I do want it to stop at decisions that change the science, like a prior or a sampler setting. Fourth, the evidence I want back, so I can evaluate the result: passing tests and the rebuilt figure to compare. With those settled I can walk away and come back to something I can check.
- The model
- Context
- The harness
- Tools and apps
- Running it locally
- Several agents
- The repository
- What’s next
Part 3 · The harness25 / 47
What can the agent reach?
I set the files, environment, network and credentials before a long run.
- Everything is reachable
- A boundary around the project
- Allowed network hosts
By default an agent can reach everything its user can. For longer runs I limit it to one project folder and a short list of network hosts.
Speaker notes · 18 seconds
An agent can do whatever its harness allows, and by default that’s everything I can do: my keys, my documents, my email, my other projects. Before a long run I draw a boundary. One project folder, and a short list of network hosts. Everything else is out of reach.
- The model
- Context
- The harness
- Tools and apps
- Running it locally
- Several agents
- The repository
- What’s next
Part 3 · The harness26 / 47
How firmly is the boundary held?
From a request the model can ignore to a rule the operating system enforces.
- Instructions
- Harness permissions
- Containers: Docker, Podman
- Kernel sandbox: nono
There are several ways to limit an agent, and they differ in how much they can be trusted. Instructions in a system prompt or AGENTS.md are requests. Harness permissions ask before each action. A container such as Docker or Podman gives the agent a separate filesystem. A kernel sandbox such as nono has the operating system itself refuse anything outside the allowed set.
Speaker notes · 29 seconds
How do you actually hold that boundary? I rank the options by how much control they give. Instructions are the weakest. A system prompt or an AGENTS.md file is a request, and a model can ignore it. Harness permissions are next. Claude Code, Codex and OpenCode ask before acting, which works until you start approving everything. Containers are stronger. Docker or Podman give the agent its own filesystem, so it can’t touch the rest of your machine. A kernel sandbox is the tightest control. nono wraps the agent with Landlock on Linux or Seatbelt on macOS, and the operating system refuses anything outside what you allowed, file by file and host by host. This ranking is my own. A virtual machine isolates more strongly still, at more cost.
- The model
- Context
- The harness
- Tools and apps
- Running it locally
- Several agents
- The repository
- What’s next
Part 4 · Tools and apps27 / 47
What can an agent use?
The harness can reach beyond your files.
- CoveredThe model
- CoveredContext
- CoveredThe harness
- Up nextTools and apps
- LaterRunning it locally
- LaterSeveral agents
- LaterThe repository
- LaterWhat’s next
Speaker notes · 5 seconds
The harness can reach beyond your files.
- The model
- Context
- The harness
- Tools and apps
- Running it locally
- Several agents
- The repository
- What’s next
Part 4 · Tools and apps28 / 47
Reaching other apps with MCP
MCP is a standard plug between a harness and an app.
- MCP: a standard plug
- What GitHub offers
- Open a pull request
- Slack, Notion, Figma
MCP, the Model Context Protocol, is a standard way for a harness to use another app. An app that supports it tells the harness which actions it offers. GitHub offers creating a branch, opening a pull request and reading review comments, among others. The model requests one like any other tool, and the harness makes the call.
Speaker notes · 25 seconds
A harness can also reach other apps, and the word you’ll hear for that is MCP. It stands for Model Context Protocol. Think of it as a standard plug. An app that has the plug can tell any harness what it offers, and the model can then ask for those actions like any other tool. GitHub is the one that matters most here. Through MCP the agent can create a branch, open a pull request and read the review comments. For the bat analysis it opened the pull request I later reviewed, number 161. Slack, Notion and Figma connect the same way.
- The model
- Context
- The harness
- Tools and apps
- Running it locally
- Several agents
- The repository
- What’s next
Part 4 · Tools and apps29 / 47
Which tools?
Tools differ in how long they work alone and how many agents they run.
- Claude Code, Codex, OpenCode
- VS Code, Hermes Agent
- Antigravity, Claude Ship
Claude Code, Codex and OpenCode are coding agents that run in a terminal or an editor. OpenCode is open source and works with local models. VS Code keeps chat and agents beside the diff. Hermes Agent, from Nous Research, is an open-source personal assistant with persistent memory, skills and messaging interfaces. Google Antigravity is a workspace for starting and monitoring several agents in parallel. Claude Ship, released in November 2026, puts three agents on GitHub pull requests to review, fix and approve them.
Speaker notes · 21 seconds
Here is how I place the tools. Left to right is how long they work on their own. VS Code is for fine-grained edits where I watch each change. Claude Code, Codex and OpenCode take on long tasks. Hermes is a personal assistant that keeps working over days and remembers earlier work. Bottom to top is how many agents they run. Antigravity is built around several agents, and Claude Ship puts review, fix and approval agents on pull requests. The placement is my own rough judgment. Given how fast this moves, there’s a fair chance I’ll have stopped using one of these by next week.
- The model
- Context
- The harness
- Tools and apps
- Running it locally
- Several agents
- The repository
- What’s next
Part 5 · Running it locally30 / 47
Can we run it ourselves?
The model can run in the cloud or on our own machines.
- CoveredThe model
- CoveredContext
- CoveredThe harness
- CoveredTools and apps
- Up nextRunning it locally
- LaterSeveral agents
- LaterThe repository
- LaterWhat’s next
Speaker notes · 5 seconds
The model can run in the cloud or on our own machines.
- The model
- Context
- The harness
- Tools and apps
- Running it locally
- Several agents
- The repository
- What’s next
Part 5 · Running it locally31 / 47
What do we gain and give up?
Local models keep data on our machines and trail the frontier by about six months.
- Hosted: data leaves
- Local: data stays
- Local follows the frontier
- About GPT-5.x level
With a local model, data stays on our machines, which matters for unpublished or sensitive work. The models are less capable than the current hosted ones, by roughly six months. We pay with hardware we already own and trade rate limits for our own memory and speed limits. Setup and tuning become our job.
Speaker notes · 22 seconds
The main reason to run locally is control over data. Nothing leaves the machine, which matters for unpublished data, anything with privacy constraints, and work on restricted systems. The cost is capability. Open-weight models trail the hosted frontier by about six months. Small models are getting very capable: Inkling 2 Mini and Qwen3.8-27B are roughly at the level of the GPT-5.x models. And the engines keep getting better at running them on limited hardware. Strata is the example I’ll show. That is enough for a lot of coding and analysis, and I still use hosted models for the hardest tasks. There are no rate limits, but our own memory and speed set the ceiling, and setup takes some work.
- The model
- Context
- The harness
- Tools and apps
- Running it locally
- Several agents
- The repository
- What’s next
Part 5 · Running it locally32 / 47
A local stack that works
OpenCode as the harness, Ollama or Strata as the engine, and two recent models.
- Harness: OpenCode
- Engines: Ollama, Strata
- Models: Qwen3.8-27B, Inkling 2 Mini
- Similar quality
For local work I use OpenCode as the harness. Ollama is the simple engine when a model fits in memory, and Strata is built for mixture-of-experts models. Qwen3.8-27B has been the strongest dense local model. Inkling 2 Mini, released in November, reaches similar quality as a mixture of experts: it stores 26.4 billion parameters and routes each token to 8 of 128 experts per layer.
Speaker notes · 29 seconds
This is the local setup that has worked for me. OpenCode is the harness, and it talks to any model server. Ollama is the easiest engine to start with. Strata is newer and is built for mixture-of-experts models. Engines like it are a big part of why this works now: they keep getting better at running large models on limited hardware. For models, Qwen3.8-27B has been the hottest dense model: every weight is used for every token. A couple of weeks ago Inkling 2 Mini came out. It’s a mixture of experts, so each token uses 8 of 128 experts per layer, and it performs about as well while doing much less work per token.
- The model
- Context
- The harness
- Tools and apps
- Running it locally
- Several agents
- The repository
- What’s next
Part 5 · Running it locally33 / 47
What makes a local model fast?
Decode speed follows how quickly the weights can be read.
- Tokens read the weights
- Discrete GPU
- Unified memory
- Prefill and decode
Prefill processes the whole prompt at once and is limited by compute. Decode produces one token at a time, and each token has to read the active weights once, so it is limited by memory bandwidth. A discrete GPU reads its own memory very quickly but has little of it, and anything left in system memory crosses a slow link. Unified memory, as on Apple silicon, is one large pool at moderate bandwidth. The bandwidth figures are typical approximate values.
Speaker notes · 36 seconds
Why does the same model run fast on one machine and slowly on another? Remember prefill and decode. Prefill handles the whole prompt in parallel, so it depends on raw compute. Decode makes one token at a time, and for each token the processor has to read the active weights once. So decode speed depends on memory bandwidth: how fast you can move the weights past the processor. A discrete GPU has very fast memory, around a thousand gigabytes per second on a high-end card, but only 24 gigabytes or so. If the model doesn’t fit, the rest sits in system memory behind a link that’s about thirty times slower. A Mac has unified memory: one big pool that the GPU reads directly, at a few hundred gigabytes per second. Slower than a GPU’s own memory, but there’s much more of it. This is also why mixture-of-experts models help: each token reads only the active experts.
- The model
- Context
- The harness
- Tools and apps
- Running it locally
- Several agents
- The repository
- What’s next
Part 5 · Running it locally34 / 47
What fits on our hardware?
Weights and cache have to fit in the memory we have.
- 16 GB: Inkling 2 Mini, 2-bit
- 32 GB: Inkling 2 Mini, 4-bit
- Workstation: Flash-Next with Strata
On a 16 GB laptop, Inkling 2 Mini fits with its weights stored at 2 bits. A 32 GB laptop holds the 4-bit version with room to spare. A workstation with a 24 GB GPU and 64 GB of system memory can run the much larger Qwen3.8-Flash-Next with Strata, which keeps the active experts on the GPU and the rest in system memory.
Speaker notes · 18 seconds
These bars are memory, and the blocks are approximate weight sizes: parameters times bits, divided by eight. Inkling 2 Mini is the model I’d start with. It’s a mixture-of-experts model that runs on Strata and has largely replaced Qwen3.8-27B for me. At 2 bits it fits a 16 GB laptop, and at 4 bits a 32 GB laptop with room for the conversation. A GPU workstation can go much larger, because Strata keeps only the active experts in GPU memory. The takeaway for Part 3 is that context is memory, on anyone’s hardware.
- The model
- Context
- The harness
- Tools and apps
- Running it locally
- Several agents
- The repository
- What’s next
Part 5 · Running it locally35 / 47
Fitting a model to your machine
Four settings decide whether a local model fits and stays useful.
- Weight precision
- Cache precision
- Context length
- Multi-token prediction
Quantization stores each weight with fewer bits. Modest quantization costs little, and extreme quantization degrades the model. Dynamic quantization, such as Unsloth Dynamic v3.1, keeps sensitive layers at higher precision. The conversation cache can also be stored at 8 bits, roughly halving its memory, where the engine allows it. The context length usually needs raising for agent work. Multi-token prediction speeds up replies and is often off by default.
Speaker notes · 40 seconds
These are the things to look out for. First, quantization: storing weights with fewer bits. Down to about four bits you lose little. Below that the model gets noticeably worse, a kind of brain rot. Dynamic quants, and Unsloth’s Dynamic v3.1 has been great, spend the bits where they matter. Second, the cache can be quantized too. Eight-bit keys and values take about half the memory, and it isn’t always easy to switch on. Third, the default context length is often too short for an agent, so set it to at least 64K. Fourth, multi-token prediction, a form of speculative decoding, makes replies faster, and it’s often off by default.
- The model
- Context
- The harness
- Tools and apps
- Running it locally
- Several agents
- The repository
- What’s next
Part 5 · Running it locally36 / 47
Try it on one task you know
Use the setup prompt with ChatGPT or Claude—and start with one real task.
- 1Bring your machine’s specs and one task whose result you know how to check.
Start with one task you already understand. Use the setup prompt with ChatGPT or Claude, follow the official documentation, and keep a working configuration you can return to.
Speaker notes · 13 seconds
The site has a prompt you can copy into ChatGPT or Claude. It asks about your machine and your tasks, then walks you through choosing a model, an engine and these settings. Start with one task whose result you know how to check.
Help me set up a useful local AI system for my work. Guide me one step at a time, explain each important setting in a sentence, and use current official documentation rather than guessing commands or model support.
First ask me about:
- My operating system, Apple chip or GPU model, unified memory or GPU VRAM, system RAM, free disk space, and what else needs to run.
- My main tasks: chat, coding, research, long agent tasks, or an assistant with memory; the kinds and sizes of files I use; and whether speed, quality, context length, or keeping data local matters most.
- Any model server or harness I already use. Ask only for information needed for the next decision.
Then help me:
1. Choose a model and exact quantized download that fit my hardware and tasks. Use the Hugging Face model card and file list to verify the artifact, license and runtime compatibility. Consider Qwen3.8-27B, Muse Glimmer, Inkling 2 Mini, or a smaller current alternative, but verify availability and support. Explain dense versus MoE, total versus active parameter count, weight quantization and the memory needed for the weights, KV cache or recurrent state at my intended context and session count, temporary work, and room for other apps. For Inkling 2 Mini, account for the separate cache per loop pass and verify how the runtime allocates its sliding-window layers.
2. Choose a server. Compare ordinary in-memory serving (Ollama, llama.cpp, MLX-LM), RAM/VRAM MoE tiering (Strata), and SSD expert streaming (Strata, InferSSD, Slotstream on supported setups). Start with in-memory serving when the model fits. On Apple silicon compare direct MLX-LM when useful. Explain latency, capacity and model-support tradeoffs. For a compatible MoE model, also consider Strata: verify its supported model pack/backend, expert cache and CPU/GPU split, RAM/SSD budget, KV streaming and expert prefetch support. Explain GGUF as a model-file format and MLX as Apple’s computation framework; MLX-LM supplies model tools and a server. Distinguish those from the harness. Check support for this exact model and hardware.
3. Get a small request working and confirm actual GPU use. Save the model identifier, versions and settings. Do not assume the defaults match my workload.
4. Tune one setting at a time: model size/weight precision (prefer a compatible calibrated dynamic quant; check model-specific IQ1 through Q8 options); context length; KV-cache precision (Q8 as the working assumption where supported, FP16 for higher precision); Flash Attention where supported; prefill batch size; concurrent requests; and multi-token prediction (MTP), a form of speculative decoding, and its draft length if compatible. Check whether it needs explicit enabling. Explain what each changes, its memory/speed/quality tradeoff, and how to undo it. Use the SAME compatible artifact when comparing speculation off and on.
5. Compare a short repeatable task before and after each change. Record memory use, time to the first token, output speed and answer quality; distinguish loading, prefill and decode. Use my actual results to decide what to keep. Do not invent measurements or promise a speedup.
6. Connect a harness suited to the work: OpenCode for long-running larger coding tasks, VS Code for edit-focused or mixed coding work, or an assistant harness such as Hermes/OpenClaw for ongoing tasks and memory. Explain which tools it can run, where files are edited, permissions, what fills context, compaction, and how saved memory differs from the KV cache. For an OpenCode agent, configure at least 64K context in the server and harness. At one session, compare FP16 and Q8_0 KV where supported. Measure peak memory and prompt-processing speed with a representative long input. Use compaction as the history fills.
7. For coding, start with one small task, a branch and a pull request. Add useful tests/CI, then help me review the diff, output and scientific assumptions. If I want another device to access the server, identify the model server, tool host, and client, then connect over a private authenticated link.
Give me one recommended starting configuration and the official links that support it. If I am buying a machine, ask my budget and other research software requirements, then compare GPU VRAM versus unified memory, bandwidth, system RAM, CPU/PCIe needs for offloading, storage, power/cooling and upgradeability. Consider an existing shared workstation before recommending a purchase. Begin with the hardware and task questions, then wait for my answers before giving installation commands. Compare practical minimum and sweet-spot hardware, including Unsloth Dynamic v3.1 2-bit Qwen3.8-27B and Muse Glimmer. Separate weight-file size from total runtime memory, recommend an initial context and cache precision for the exact backend, and reserve OS, prefill and draft-model headroom.
Read the worked example in the full guide
Further reading
- The model
- Context
- The harness
- Tools and apps
- Running it locally
- Several agents
- The repository
- What’s next
Part 6 · Several agents37 / 47
Why use several agents?
One context has limits, so the work is split.
- CoveredThe model
- CoveredContext
- CoveredThe harness
- CoveredTools and apps
- CoveredRunning it locally
- Up nextSeveral agents
- LaterThe repository
- LaterWhat’s next
Speaker notes · 5 seconds
One context has limits, so the work is split.
- The model
- Context
- The harness
- Tools and apps
- Running it locally
- Several agents
- The repository
- What’s next
Part 6 · Several agents38 / 47
What a multi-agent workflow looks like
One full context is the wrong shape for a big job, so the work is split across agents.
- One agent, one context
- Orchestrator and threads
- Worker and reviewer loop
- A pull request reaches me
We saw one context fill up in Part 1. A multi-agent workflow spreads the work over several contexts. In the simplest version an orchestrator hands scoped tasks to separate threads and collects their summaries. A looped workflow adds structure: a worker implements a plan, automated checks run, and a reviewer agent sends the change back until it passes. Only then does a pull request reach me.
Speaker notes · 38 seconds
People say multi-agent to mean different things, so here is the picture. One agent with one context fills up, as we saw. In the first pattern an orchestrator starts threads, each with its own context, and they return summaries. Subagents in Claude Code and Codex work this way: it’s a hierarchy. The second pattern is a loop. A worker implements, checks run, and a reviewer that did not write the code sends it back until it passes. Antigravity is built around that kind of loop, and it’s the pattern I’ve been using for research code, sometimes with a different harness as the reviewer.
- The model
- Context
- The harness
- Tools and apps
- Running it locally
- Several agents
- The repository
- What’s next
Part 7 · The repository39 / 47
Where does the work live?
With many agents and tools, where does the work live?
- CoveredThe model
- CoveredContext
- CoveredThe harness
- CoveredTools and apps
- CoveredRunning it locally
- CoveredSeveral agents
- Up nextThe repository
- LaterWhat’s next
Speaker notes · 5 seconds
With many agents and tools, where does the work live?
- The model
- Context
- The harness
- Tools and apps
- Running it locally
- Several agents
- The repository
- What’s next
Part 7 · The repository40 / 47
The repository is the memory
Context kept in the repository outlives any one chat or tool.
- AGENTS.md
- Guides, pull requests, tests
- Every tool reads the repository
- Switch without starting over
A chat’s context disappears when the session ends. I keep the things an agent needs to know in the repository: standing rules in AGENTS.md, guides that say what each figure must show, the pull-request history, and tests. Any agent in any tool can read them, so I can switch between Claude Code, Codex, OpenCode and VS Code without starting over.
Speaker notes · 32 seconds
Here is the habit that changed the most for me. A chat forgets everything when it ends, and each tool keeps its own history. So I put the context in the repository. AGENTS.md holds standing rules, for example that a change to priors or sampler settings has to be tested and documented. Figure guides say what each figure must show. The pull requests record what changed and why, and the tests record what must stay true. Every agent reads the same files, so I can start a task in one tool and finish it in another.
- The model
- Context
- The harness
- Tools and apps
- Running it locally
- Several agents
- The repository
- What’s next
Part 7 · The repository41 / 47
From a notebook to modules
Settled parts of an analysis move to where an agent can’t quietly change them.
- One exploratory notebook
- Modules with one job each
- Tests on every pull request
- The rebuilt figure
The bat analysis began as one long notebook. Agents organized it into preprocessing, posthoc, plotting and figure modules, with tests that run on every pull request. The publication figure now rebuilds from those modules and cached model fits.
Speaker notes · 20 seconds
This is the bat analysis from the start of the talk, with its real file names. The notebook was split into preprocessing, posthoc summaries, plots and the figure code, with cached model fits so the figure rebuilds without refitting. Exploratory code and settled code need different rules. While exploring I want the agent to move quickly. Once I trust a step, it goes behind tests on the main branch, and later changes have to come through a pull request I can read.
- The model
- Context
- The harness
- Tools and apps
- Running it locally
- Several agents
- The repository
- What’s next
Part 7 · The repository42 / 47
Every change is a small pull request
Checks first, then an agent’s review, then mine.
- 126 merged pull requests
- Checks
- Agent review
- My review
In unwrap, our package for Bayesian circular regression, every change is a scoped pull request: 126 merged so far. Eleven of them built the bat analysis. Tests ran first, a second agent reviewed the change, and I reviewed it last.
Speaker notes · 23 seconds
This is the loop at the scale of a project. Each dot is a real merged pull request in unwrap, 126 of them, grouped by kind. The outlined ones built the bat analysis. Every one passed tests, then a review by a second agent, and then my own review. The repository’s AGENTS.md file holds standing rules. For example, a change to priors or sampler settings has to be tested and documented before it lands.
- The model
- Context
- The harness
- Tools and apps
- Running it locally
- Several agents
- The repository
- What’s next
Part 7 · The repository43 / 47
Could someone else rerun it?
A locked environment and a few commands regenerate the main figures.
- uv sync --locked
- Figures regenerated
- Paper values recomputed
- 5 of 5 exact, gaps recorded
For our honeybee nest atlas paper, agents refactored the analysis notebooks into a package. A fresh checkout installs the locked environment and regenerates the figures from the released data and fitted checkpoints. Tests compare recomputed statistics with the values reported in the paper and run again on every pull request.
Speaker notes · 29 seconds
Back to the honeybee paper, and the real test of all this: can someone else rerun the work? This is our honeybee nest paper. The original analysis lived in two large notebooks. Agents reorganized it into a package with a lock file, the released data, the fitted model checkpoints and checksums for the cached predictions. A fresh checkout runs uv sync and then the figure commands. The tests compare recomputed values with the paper. For example, brood covered 32.7% ± 7.7% of cells at week 10, and the recomputed value matches exactly. The repository also lists the panels that can’t yet be reproduced.
- The model
- Context
- The harness
- Tools and apps
- Running it locally
- Several agents
- The repository
- What’s next
Part 7 · The repository44 / 47
The bottleneck moved
Ideas are cheap to try, so knowing how to check a result matters more than ever.
- Before: think, then write
- Now: prototype in minutes, then check
- Try several ideas
- Checking is the skill that matters
An idea used to need careful thought before it was worth the weeks of implementation. With agents a prototype takes minutes, and verification takes most of the time. Several ideas can be prototyped quickly, checked, and most of them discarded. That makes tests, and the ability to verify that an output is what you wanted, more important than before.
Speaker notes · 36 seconds
People complain that this turns programming into reviewing other people’s code, which is the boring part. I disagree. Building something used to cost weeks, so I had to think an idea through carefully before it was worth starting, and then writing the code took most of the time. Now I can have an idea and prototype it in ten minutes. The time goes into checking, and verification is the real bottleneck. But look at what that buys. If an idea costs minutes instead of a month, I can try five of them, see which ones hold up, and throw the rest away. We’re no longer limited by the cost of implementation, and for science that is incredible. It also means that tests, and verifying that the output is really what you wanted, matter more than they ever did. Getting good at checking results is going to become an increasingly valuable skill.
- The model
- Context
- The harness
- Tools and apps
- Running it locally
- Several agents
- The repository
- What’s next
Part 8 · What’s next45 / 47
Where is this going?
All of it is changing quickly.
- CoveredThe model
- CoveredContext
- CoveredThe harness
- CoveredTools and apps
- CoveredRunning it locally
- CoveredSeveral agents
- CoveredThe repository
- Up nextWhat’s next
Speaker notes · 5 seconds
All of it is changing quickly.
- The model
- Context
- The harness
- Tools and apps
- Running it locally
- Several agents
- The repository
- What’s next
Part 8 · What’s next46 / 47
What I’m trying next
Hosted models that plan, local models that do the bulk, and agents that check each other.
- Hosted plans, local works
- Agents review each other
- VS Code for close edits
I want better ways to combine agents across providers and with local models: a capable hosted model that plans and reviews while local models do the routine work, and agents from different providers reviewing each other. Google Antigravity is built around review loops. VS Code suits close, hands-on edits.
Speaker notes · 29 seconds
A few things I’m experimenting with. First, mixing hosted and local models: a smart model orchestrates and local models do the grunt work, which keeps cost down and keeps data here. Some of this is already built into Claude Code and Codex. Second, agents from different providers checking each other. Antigravity is agent-first and uses a looping review process instead of a hierarchy of threads, and its new Neon model is getting a lot of attention. Third, I’m using VS Code more for fine-grained work on the code, while Claude Code, Codex and OpenCode handle the long tasks and Hermes the even longer ones. All of this is moving fast, and I expect my answers to change within months. I’m one researcher still figuring this out, so treat the specific tools as a snapshot. The habits are what I’d expect to last.
- The model
- Context
- The harness
- Tools and apps
- Running it locally
- Several agents
- The repository
- What’s next
Part 8 · What’s next47 / 47
A regular AI meetup for the group?
What would be worth comparing at a regular meeting?
- The group
- What have you tried?
- What worked or fell short?
- A regular meetup?
This technology is new and changing quickly, and everyone is still figuring out how to use it. I’d like to hear which tasks people in the group have tried, what held up, and whether meeting regularly would help us learn from each other.
Speaker notes · 67 seconds
Give the floor to the group. This technology is new and changes quickly, and everyone is still figuring out how to use it. Invite one experience that worked and one that fell short. Ask whether people would like a regular AI meetup and what they’d bring to the first one. I’d be happy to help organize it.