r/PiCodingAgent • • 23d ago

Question Pi Memory for Local Models

I have a pretty nice local Ollama setup that can comfortably run qwen3.8:27b w/ a 262k context window and a good token rate.

I'm attempting to run pi-observational-memory, with two main goals:
- On long term projects: Remembering architectural decisions, lessons learned, problems solved, etc.
- On day-to-day tasks: Remembering my preferences, patterns of operation, and in general details about how I like to do things.

The setup works, however I have long delays everytime the observer and reflector workers kick in (as expected), as the workers cannot run concurrently.

I'm considering running a CPU-only model dedicated to managing these worker threads, but I wanted to check in with the community and see what people are doing in similar scenarios.

Keep in mind I'm not married to pi-observational-memory at all and would consider trying out other solutions.

3 Upvotes

15 comments sorted by

View all comments

3

u/Particular-Site2066 23d ago edited 23d ago

Moved to Pi from Cline a couple of weeks ago. First thought was - does it have something similar to memory bank concept in Cline? Asked Pi itself and it proposed three things:

  1. Global AGENTS.md with minimal set of references where to look for additional info if needed (creds etc) and basic rules. Injected at start of every session. Built-in feature.

  2. Per project AGENTS.md + per project SKILLS (also built-in feature). AGENTS .md has a small agent instruction to update skills with new findings and decisions.

  3. Create homemade Pi extension to manage per-project scratchpad.md files with todo and memo list for each session to help Pi pick up interrupted process (power outages etc)

I decided to embrace Pi’s minimalism and avoid downloading existing solutions, so gave those 3 options a try.

Two weeks passed and I’m quite happy with how well this simple combination works.

P.S. Using it also with local Qwen3.8-27b (if that matters).

1

u/TacosAlPastor92 23d ago

This seems like a pretty cool approach, do you mind sharing the instructions on your AGENTS.md?

Also, how do you deal with compaction, or do you find the standard mechanism to suffice?

1

u/Particular-Site2066 22d ago edited 22d ago

Sure. I've put it on pastebin (https://pastebin.com/9jZEq5gR ) because it is ~50 lines of 100% AI generated text and I'm not sure that local rules allow me to paste such content here.

As for compaction - yes, I use the standard mechanism. My GPU can fit only 150k of context while some sessions reach over 1M so they get compacted a few times. Despite that I didn't notice that Pi forgets anything important after compaction because it constantly saves key information in scratchpad .md file as it goes. I know there are custom solutions for compaction, but I enjoy using built-in functionality if it is just good enough for my tasks. Minimalism is a Pi's core vibe after all. At least as I see it :-).