Ask HN: How Do You Manage Your AI Agents' Context Across Clients and Projects?
I work with AI agents every day—coding agents and chat assistants—across several client projects. What costs me the most isn't the work itself but the context: re-explaining past decisions, rules that apply to one client but not another, and remembering what an agent did last week and why. Switching tools makes it worse since each one keeps its own memory. I'm curious how others handle this: how agents get context at session start, how people carry context between multiple agents, how they keep client contexts separate, and whether anyone has paid for or built a tool for this.
- mapontosevenths
Karpathys LLM wiki with QMD.
I have a small gatekeeper.py script the agent has to run to complete a round or begin a new one. One of the things it does (in addition to record keeping, linting, etc) is validate that the wiki has been updated with all the findings, lessons learned, and documentation for the round. The agent can't proceed until it's done.
Then in the AGENTS.md they're told they can use QMD to perform semantic search of the wiki , and should before starting any significant work.
It's expensive, in terms of tokens, but well worth it. I could reproduce any stage of my project if I wanted. I always know why they did what they did (if they do), and the agent's can't really forget anything important.
- biggestriverman
I had a similar issue with having to juggle multiple different projects. I found the key thing is to manage your time better and have an agent per project or sub-project with a manager agent you talk to. I wrote my own system to manage this https://github.com/mhalstrom/maximizepm feel free to try it, take the good parts for your own system or whatever
- rcarmo
I have a thing called Memento (https://rcarmo.github.io/projects/memento) that all my agents use to share skills and some cross-project notes, but in general most project-related context lives on SQLite someplace with some FTS. I built a little CRM skill that handles most project interactions just fine, and you can go a long way with well organized Markdown (or a shared Obsidian vault) before you start over-complicating things.
- nilleb
Hi!
5) To solve this problem I wrote Varda (https://github.com/nillebco/varda). I use it all the time.
1) the context is supplied per policy - a certain directory tree or folder has a certain context
2) yes. But I use a certain agent for a certain customer - their rules. It's interesting as a use case, but requires some work because the agents don't have the same formats. If I had to do this I would leverage omnisess - https://GitHub.com/psacc/omnisess
3) each customer has different policies right? So this is a policy in Varda : a certain directory tree is allowed to use only a certain agent.
4) the last time something went wrong it costed me a container with a sample database. Since last Friday we have firecracker escape vulnerabilities so this might be way worse
(Varda was born to track work across projects and enforce agents selection and orchestrate tasks then evolved to include sandboxing leveraging msb and docker)
I hope this helps! And any feedback or pull request about Varda IS very welcome!
- encruxx
I’m using obsidian vaults.
Currently I’m not collaborating with people a lot, so I use helpful plugins like Kanban to organize tasks.
This helps me stay in the loop about projects and tasks, since Claude can create requirements.
A friend of mine recently built campus [1] and while I personally haven’t gotten to use it, I’m currently trying to rebuild it as an obsidian plugin, which I hope will further help me stay organized.