Add pi.dev tag to Pi-related engineering posts
This commit is contained in:
parent
54344fc75e
commit
9c769959ad
7
.claude/settings.local.json
Normal file
7
.claude/settings.local.json
Normal file
@ -0,0 +1,7 @@
|
|||||||
|
{
|
||||||
|
"permissions": {
|
||||||
|
"allow": [
|
||||||
|
"Bash(git add:*)"
|
||||||
|
]
|
||||||
|
}
|
||||||
|
}
|
||||||
1
.gitignore
vendored
1
.gitignore
vendored
@ -2,3 +2,4 @@
|
|||||||
dokku-setup.sh
|
dokku-setup.sh
|
||||||
/output/
|
/output/
|
||||||
.claude/worktrees
|
.claude/worktrees
|
||||||
|
app/priv/blog/engineering/2026/04-24-what-it-takes-to-get-started-with-the-pi-coding-agent.md
|
||||||
|
|||||||
10
.pi/llm-metrics.log
Normal file
10
.pi/llm-metrics.log
Normal file
@ -0,0 +1,10 @@
|
|||||||
|
{"timestamp":"2026-04-29T13:29:50.834Z","provider":"llama.cpp","model":"unsloth/Qwen3.6-27B-GGUF:Q4_K_M","turnCount":1,"inputTokens":3898,"outputTokens":60,"totalTokens":3958,"prefillTokensPerSec":162.25,"generationTokensPerSec":61.04,"combinedTokensPerSec":158.27,"totalDurationMs":25008,"timeToFirstTokenMs":24025,"rawTimestamps":{"ttftMs":24025,"allTtftMs":[24025],"generationDurationMs":983,"turns":[{"turnId":"turn-0","durationMs":25008,"ttftMs":24025}]}}
|
||||||
|
{"timestamp":"2026-04-29T13:41:50.149Z","provider":"llama.cpp","model":"unsloth/Qwen3.6-27B-GGUF:Q4_K_M","turnCount":7,"inputTokens":5667,"outputTokens":960,"totalTokens":6627,"prefillTokensPerSec":500.44,"generationTokensPerSec":11.09,"combinedTokensPerSec":67.69,"totalDurationMs":97903,"timeToFirstTokenMs":11324,"rawTimestamps":{"ttftMs":11324,"allTtftMs":[11324],"generationDurationMs":86579,"turns":[{"turnId":"turn-0","durationMs":6146},{"turnId":"turn-1","durationMs":2996},{"turnId":"turn-2","durationMs":4988},{"turnId":"turn-3","durationMs":5554},{"turnId":"turn-4","durationMs":29939},{"turnId":"turn-5","durationMs":3521},{"turnId":"turn-6","durationMs":44759,"ttftMs":11324}]}}
|
||||||
|
{"timestamp":"2026-04-29T15:50:22.720Z","provider":"llama.cpp","model":"unsloth/Qwen3.6-27B-GGUF:Q4_K_M","turnCount":1,"inputTokens":3895,"outputTokens":81,"totalTokens":3976,"prefillTokensPerSec":165.89,"generationTokensPerSec":37.09,"combinedTokensPerSec":154.93,"totalDurationMs":25664,"timeToFirstTokenMs":23480,"rawTimestamps":{"ttftMs":23480,"allTtftMs":[23480],"generationDurationMs":2184,"turns":[{"turnId":"turn-0","durationMs":25664,"ttftMs":23480}]}}
|
||||||
|
{"timestamp":"2026-04-29T15:52:02.780Z","provider":"llama.cpp","model":"unsloth/Qwen3.6-27B-GGUF:Q4_K_M","turnCount":3,"inputTokens":61,"outputTokens":381,"totalTokens":442,"prefillTokensPerSec":8.43,"generationTokensPerSec":21.42,"combinedTokensPerSec":17.66,"totalDurationMs":25023,"timeToFirstTokenMs":7240,"rawTimestamps":{"ttftMs":7240,"allTtftMs":[7240,1429],"generationDurationMs":17783,"turns":[{"turnId":"turn-0","durationMs":15773,"ttftMs":7240},{"turnId":"turn-1","durationMs":7547,"ttftMs":1429},{"turnId":"turn-2","durationMs":1703}]}}
|
||||||
|
{"timestamp":"2026-04-29T15:54:09.944Z","provider":"llama.cpp","model":"unsloth/Qwen3.6-27B-GGUF:Q4_K_M","turnCount":6,"inputTokens":3978,"outputTokens":1388,"totalTokens":5366,"prefillTokensPerSec":924.04,"generationTokensPerSec":12.1,"combinedTokensPerSec":45.09,"totalDurationMs":119004,"timeToFirstTokenMs":4305,"rawTimestamps":{"ttftMs":4305,"allTtftMs":[4305,8638,7219,29433,6874],"generationDurationMs":114699,"turns":[{"turnId":"turn-0","durationMs":12420,"ttftMs":4305},{"turnId":"turn-1","durationMs":12723,"ttftMs":8638},{"turnId":"turn-2","durationMs":23125,"ttftMs":7219},{"turnId":"turn-3","durationMs":50368,"ttftMs":29433},{"turnId":"turn-4","durationMs":5165},{"turnId":"turn-5","durationMs":15203,"ttftMs":6874}]}}
|
||||||
|
{"timestamp":"2026-04-29T15:57:10.210Z","provider":"llama.cpp","model":"unsloth/Qwen3.6-27B-GGUF:Q4_K_M","turnCount":1,"inputTokens":33,"outputTokens":318,"totalTokens":351,"prefillTokensPerSec":2.19,"generationTokensPerSec":28.27,"combinedTokensPerSec":13.35,"totalDurationMs":26294,"timeToFirstTokenMs":15045,"rawTimestamps":{"ttftMs":15045,"allTtftMs":[15045],"generationDurationMs":11249,"turns":[{"turnId":"turn-0","durationMs":26294,"ttftMs":15045}]}}
|
||||||
|
{"timestamp":"2026-04-29T15:58:56.626Z","provider":"llama.cpp","model":"unsloth/Qwen3.6-27B-GGUF:Q4_K_M","turnCount":4,"inputTokens":2132,"outputTokens":1231,"totalTokens":3363,"prefillTokensPerSec":376.28,"generationTokensPerSec":12.52,"combinedTokensPerSec":32.34,"totalDurationMs":103985,"timeToFirstTokenMs":5666,"rawTimestamps":{"ttftMs":5666,"allTtftMs":[5666,39799,19167],"generationDurationMs":98319,"turns":[{"turnId":"turn-0","durationMs":6587},{"turnId":"turn-1","durationMs":11102,"ttftMs":5666},{"turnId":"turn-2","durationMs":54948,"ttftMs":39799},{"turnId":"turn-3","durationMs":31348,"ttftMs":19167}]}}
|
||||||
|
{"timestamp":"2026-04-29T16:05:02.148Z","provider":"llama.cpp","model":"unsloth/Qwen3.6-27B-GGUF:Q4_K_M","turnCount":2,"inputTokens":205,"outputTokens":571,"totalTokens":776,"prefillTokensPerSec":74.49,"generationTokensPerSec":15.29,"combinedTokensPerSec":19.35,"totalDurationMs":40104,"timeToFirstTokenMs":2752,"rawTimestamps":{"ttftMs":2752,"allTtftMs":[2752],"generationDurationMs":37352,"turns":[{"turnId":"turn-0","durationMs":30227},{"turnId":"turn-1","durationMs":9877,"ttftMs":2752}]}}
|
||||||
|
{"timestamp":"2026-04-29T16:07:50.115Z","provider":"llama.cpp","model":"unsloth/Qwen3.6-27B-GGUF:Q4_K_M","turnCount":2,"inputTokens":234,"outputTokens":199,"totalTokens":433,"prefillTokensPerSec":36.8,"generationTokensPerSec":25.9,"combinedTokensPerSec":30.84,"totalDurationMs":14042,"timeToFirstTokenMs":6358,"rawTimestamps":{"ttftMs":6358,"allTtftMs":[6358],"generationDurationMs":7684,"turns":[{"turnId":"turn-0","durationMs":4488},{"turnId":"turn-1","durationMs":9554,"ttftMs":6358}]}}
|
||||||
|
{"timestamp":"2026-04-29T20:33:28.606Z","provider":"llama.cpp","model":"unsloth/Qwen3.6-27B-GGUF:Q4_K_M","turnCount":4,"inputTokens":313,"outputTokens":377,"totalTokens":690,"prefillTokensPerSec":97.48,"generationTokensPerSec":15.28,"combinedTokensPerSec":24.75,"totalDurationMs":27880,"timeToFirstTokenMs":3211,"rawTimestamps":{"ttftMs":3211,"allTtftMs":[3211],"generationDurationMs":24669,"turns":[{"turnId":"turn-0","durationMs":8848},{"turnId":"turn-1","durationMs":9567},{"turnId":"turn-2","durationMs":4669},{"turnId":"turn-3","durationMs":4796,"ttftMs":3211}]}}
|
||||||
@ -1,7 +1,7 @@
|
|||||||
%{
|
%{
|
||||||
title: "Coding agent generates its' own extensions",
|
title: "Coding agent generates its' own extensions",
|
||||||
author: "Willem van den Ende",
|
author: "Willem van den Ende",
|
||||||
tags: ~w(ai loops),
|
tags: ~w(pi.dev ai loops),
|
||||||
description: "Handwritten note about generating extensions for the coding agent you are in a session with on something else. Engineer solutions in the moment.",
|
description: "Handwritten note about generating extensions for the coding agent you are in a session with on something else. Engineer solutions in the moment.",
|
||||||
published: true
|
published: true
|
||||||
}
|
}
|
||||||
|
|||||||
@ -1,7 +1,7 @@
|
|||||||
%{
|
%{
|
||||||
title: "A pair pomodoro with Pi",
|
title: "A pair pomodoro with Pi",
|
||||||
author: "Willem van den Ende",
|
author: "Willem van den Ende",
|
||||||
tags: ~w(ai kata),
|
tags: ~w(pi.dev ai kata),
|
||||||
description: "A brief experiment in working in short cycles with a coding agent. Human very much in the loop.",
|
description: "A brief experiment in working in short cycles with a coding agent. Human very much in the loop.",
|
||||||
published: true
|
published: true
|
||||||
}
|
}
|
||||||
|
|||||||
@ -1,7 +1,7 @@
|
|||||||
%{
|
%{
|
||||||
title: "How to get started with the Pi coding agent (on a VPS)",
|
title: "How to get started with the Pi coding agent (on a VPS)",
|
||||||
author: "Willem",
|
author: "Willem",
|
||||||
tags: ~w(agentic-engeeringing getting-started how-to),
|
tags: ~w(pi.dev agentic-engeeringing getting-started how-to),
|
||||||
description: "Setting up Pi on a VPS is easier than I thought. Open source with a great unboxing experience. Follow along and enjoy!",
|
description: "Setting up Pi on a VPS is easier than I thought. Open source with a great unboxing experience. Follow along and enjoy!",
|
||||||
published: true
|
published: true
|
||||||
}
|
}
|
||||||
|
|||||||
@ -16,21 +16,76 @@ You may note the absence of an IDE in the above. I was an early adopter of eXtre
|
|||||||
|
|
||||||
# Inference: LLamaCPP
|
# Inference: LLamaCPP
|
||||||
|
|
||||||
blog/engineering/how-to-get-started-with-the-pi-coding-agent-on-a-vps
|
I got started with `ollama` and it looks like Hugging Face has a strong 'easy entry' as well. I run llama.cpp because it is quite fast, and more importantly, stable on MacOs. Model makers often support llamacpp in getting changes in to get their models out - the way inference works is still evolving, quite rapidly.
|
||||||
|
|
||||||
|
I try `mlx` - mac native inference, occasionally, because sometimes it is faster than llamacpp. Often works for chat, but less so for agentic coding.
|
||||||
|
|
||||||
|
|
||||||
# Models : Qwen3.6 , 35B-A3B and 27B
|
# Models : Qwen3.6 , 35B-A3B and 27B
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
These came out last week. I ran the 3.5 models before, and they were good enough to tinker with over the easter holiday. 35B is a Mixture of Experts (MoE) model. While these cost more memory, they run much faster - for each token only 3B parameters are active, against 27B parameters for the 'dense' model. The dense model can be more cohesive. In 3.5 the difference was notable in planning and summarisation, 27B is more detailed. But here too, "good enough" counts - the 35B model is often good enough for what I do, and runs much faster. Between 30 and 80 tokens per second as far as I can tell, 27B peaks out at 19 tokens per second at the moment. This makes a big difference when I'm having a chat, less so when I run it in the background while doing something else.
|
These came out last week. I ran the 3.5 models before, and they were good enough to tinker with over the easter holiday. 35B is a Mixture of Experts (MoE) model. While these cost more memory, they run much faster - for each token only 3B parameters are active, against 27B parameters for the 'dense' model. The dense model can be more cohesive. In 3.5 the difference was notable in planning and summarisation, 27B is more detailed. But here too, "good enough" counts - the 35B model is often good enough for what I do, and runs much faster. Between 30 and 80 tokens per second as far as I can tell, 27B peaks out at 19 tokens per second at the moment. This makes a big difference when I'm having a chat, less so when I run it in the background while doing something else.
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
# Sandbox: Nono
|
# Sandbox: Nono
|
||||||
|
|
||||||
|
Never run a coding agent outside a sandbox. That goes for claude code, that has some blocks, but is open to interpretation, and even more for Pi (see below), that runs in You Only Live Once Mode by design. Unless you want your home directory to be deleted for instance.
|
||||||
|
|
||||||
|
I use Nono on my mac instead of Docker or devcontainers (also Docker). On Mac Docker needs to run in a VM, that costs me about 9GB of RAM that I needed for LLMs. I also can reuse installed packages over projects, and since I do many experiments, that makes it more fluid.
|
||||||
|
|
||||||
|
The sandbox has access to a number of directories on the host, and the current working directory. Nono prompts for permission, you can override that with the `--allow-cwd` flag.
|
||||||
|
|
||||||
|
Invocation:
|
||||||
|
|
||||||
|
```
|
||||||
|
nono run --profile pi -- pi
|
||||||
|
```
|
||||||
|
|
||||||
|
Configuration in `$HOME/.config/nono/profiles/pi.json`
|
||||||
|
```json
|
||||||
|
{
|
||||||
|
"meta": {
|
||||||
|
"name": "pi",
|
||||||
|
"version": "1.0.0",
|
||||||
|
"description": "Auto-generated profile for pi"
|
||||||
|
},
|
||||||
|
"filesystem": {
|
||||||
|
"allow": [
|
||||||
|
"$HOME/Library/caches/elixir_make",
|
||||||
|
"$HOME/.hex",
|
||||||
|
"$HOME/.local/share/mise/",
|
||||||
|
"$HOME/.local/state/mise/",
|
||||||
|
"$HOME/Library/Caches/mise/",
|
||||||
|
"$HOME/Library/Caches/deno",
|
||||||
|
"$HOME/.pi/agent/",
|
||||||
|
"$HOME/dev/spikes/llm/monotonic-pi-extensions/packages/",
|
||||||
|
"$HOME/Users/willem/.config/git/"
|
||||||
|
],
|
||||||
|
"read": [
|
||||||
|
],
|
||||||
|
"read_file": [
|
||||||
|
"$HOME/.gitconfig"
|
||||||
|
],
|
||||||
|
"write": []
|
||||||
|
},
|
||||||
|
"network": {
|
||||||
|
"block": false
|
||||||
|
},
|
||||||
|
"workdir": {
|
||||||
|
"access": "readwrite"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
```
|
||||||
|
|
||||||
# Coding agent: Pi.dev
|
# Coding agent: Pi.dev
|
||||||
|
|
||||||
I covered the general setup with a hosted model in [how to get started with the pi coding agent on a vps](/blog/engineering/how-to-get-started-with-the-pi-coding-agent-on-a-vps) the other day. Pi will point you to the installation documentation as soon as you start it.
|
I covered the general setup with a hosted model in [how to get started with the pi coding agent on a vps](/blog/engineering/how-to-get-started-with-the-pi-coding-agent-on-a-vps) the other day. Pi will point you to the installation documentation as soon as you start it.
|
||||||
|
|
||||||
|
|
||||||
|
Configuration in `~/.pi/agent/models.json`:
|
||||||
`~/.pi/agent/models.json`
|
|
||||||
|
|
||||||
```json
|
```json
|
||||||
{
|
{
|
||||||
|
|||||||
BIN
app/priv/static/images/blog/.DS_Store
vendored
Normal file
BIN
app/priv/static/images/blog/.DS_Store
vendored
Normal file
Binary file not shown.
@ -0,0 +1,60 @@
|
|||||||
|
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 400 280" width="100%" height="100%">
|
||||||
|
<style>
|
||||||
|
.tire { fill: #1a1a1a; }
|
||||||
|
.rim { fill: #444; stroke: #666; stroke-width: 2; }
|
||||||
|
.frame { stroke: #2c3e50; stroke-width: 6; fill: none; stroke-linecap: round; stroke-linejoin: round; }
|
||||||
|
.fork { stroke: #5d6d7e; stroke-width: 5; fill: none; stroke-linecap: round; }
|
||||||
|
.fender { fill: #ecf0f1; stroke: #bdc3c7; stroke-width: 2; }
|
||||||
|
.seat { fill: #34495e; stroke: #2c3e50; stroke-width: 1; }
|
||||||
|
.tank { fill: #5d6d7e; stroke: #2c3e50; stroke-width: 1; }
|
||||||
|
.controls { stroke: #2c3e50; stroke-width: 4; fill: none; stroke-linecap: round; }
|
||||||
|
.headlight { fill: #f1c40f; stroke: #2c3e50; stroke-width: 2; }
|
||||||
|
.taillight { fill: #e74c3c; stroke: #2c3e50; stroke-width: 2; }
|
||||||
|
.shock { stroke: #7f8c8d; stroke-width: 5; fill: none; stroke-linecap: round; }
|
||||||
|
.ground { stroke: #ccc; stroke-width: 2; }
|
||||||
|
.shadow { fill: rgba(0,0,0,0.1); }
|
||||||
|
</style>
|
||||||
|
|
||||||
|
<!-- Ground & Shadow -->
|
||||||
|
<line x1="20" y1="242" x2="380" y2="242" class="ground"/>
|
||||||
|
<ellipse cx="100" cy="242" rx="28" ry="4" class="shadow"/>
|
||||||
|
<ellipse cx="300" cy="242" rx="28" ry="4" class="shadow"/>
|
||||||
|
|
||||||
|
<!-- Fenders -->
|
||||||
|
<path d="M 272 206 Q 300 176 328 206" class="fender" stroke-width="8" fill="none"/>
|
||||||
|
<path d="M 72 206 Q 100 176 128 206" class="fender" stroke-width="8" fill="none"/>
|
||||||
|
|
||||||
|
<!-- Wheels -->
|
||||||
|
<circle cx="300" cy="210" r="32" class="tire"/>
|
||||||
|
<circle cx="300" cy="210" r="24" class="rim"/>
|
||||||
|
<circle cx="100" cy="210" r="32" class="tire"/>
|
||||||
|
<circle cx="100" cy="210" r="24" class="rim"/>
|
||||||
|
|
||||||
|
<!-- Frame (Engine area intentionally empty) -->
|
||||||
|
<path d="M 100 165 L 180 200 L 240 150 Z" class="frame"/>
|
||||||
|
<path d="M 180 200 L 300 210" class="frame"/>
|
||||||
|
<path d="M 240 150 L 300 210" class="frame"/>
|
||||||
|
<path d="M 100 165 L 240 150" class="frame"/>
|
||||||
|
|
||||||
|
<!-- Fork -->
|
||||||
|
<path d="M 94 158 L 100 210 M 106 158 L 100 210" class="fork"/>
|
||||||
|
|
||||||
|
<!-- Rear Shock -->
|
||||||
|
<line x1="215" y1="192" x2="248" y2="202" class="shock"/>
|
||||||
|
|
||||||
|
<!-- Seat -->
|
||||||
|
<path d="M 188 146 Q 230 136 272 146 L 267 156 Q 230 151 193 156 Z" class="seat"/>
|
||||||
|
|
||||||
|
<!-- Tank -->
|
||||||
|
<path d="M 148 152 Q 180 138 212 152 L 204 162 Q 180 158 156 162 Z" class="tank"/>
|
||||||
|
|
||||||
|
<!-- Handlebars -->
|
||||||
|
<path d="M 78 142 L 122 142" class="controls"/>
|
||||||
|
<path d="M 78 142 L 72 132" class="controls"/>
|
||||||
|
<path d="M 122 142 L 128 132" class="controls"/>
|
||||||
|
|
||||||
|
<!-- Lights -->
|
||||||
|
<circle cx="88" cy="142" r="7" class="headlight"/>
|
||||||
|
<rect x="306" y="190" width="10" height="14" rx="2" class="taillight"/>
|
||||||
|
</svg>
|
||||||
|
|
||||||
|
After Width: | Height: | Size: 2.5 KiB |
Loading…
x
Reference in New Issue
Block a user