Ask HN: How do you manage your AI agents' context across clients and projects?
103 pointsHi Guys,
like many of you I work with AI agents every day and across several clients.
The major time cost for me is to re-explaining context and past decisions, client rules, that we already do. To finish every tools as its own memory.
So I’m curious how you actually handle this:
1. When you start a new session, how do you give context to the agent (context came from chat, mail, ticket ...) ?
2. Do you use more than one agent type (claude, codex ...) ? And if yes, how do you carry context between agents ?
3. If you work for several clients, how do you keep their context separate ?
4. The last time something went wrong ( an agent used a rejected approach, forgot a decision ...), what happened, and how much time did it cost to you ?
5. Did you paid or built a tool that helped you with these problems ? Do you still use it ?
I’m exploring whether to build something, so I’m trying to learn how other people really work.
Thanks for your return.
Comments (75) 97 threads
Earlier commentshttps://smatt989.github.io/agentremote-site/
I created skillzmouse to do this:
https://bitbucket.org/workingsoftware/skillzmouse/src/main/
It's a git backed tool with a custom protocol that can be externally accessed over a Cloudflare tunnel.
You an connect your sm client to any endpoint, and each endpoint runs a server inside a git repo, so you can have as many separate instances per client as you like, just switch your ~/.skillzmouse.json file and it will point to a different server.
It also has a script distribution and patching system. Skills and scripts constitute what I would refer to as my "standard operating procedures" which broadly transcend harness (and I have used this with multiple harnesses).
It "plugs in" by including a header at the top of AGENTS.md that tells the agent how to use it, and the first step is for the agent to load the agents skill, which is a bunch of stuff applicable everywhere, and then that also builds the skills header describing the list of skills, and then skills can refer to libs which are not listed and can be loaded on a case by case basis.
I am not using it with multiple harnesses anymore though because I built a harness, which integrates skillzmouse and has "factory workflows" that are loaded as skillzmouse scripts. My harness can be described as "deterministic control of intelligent agents", ie. the agent can't spawn sub agents, the agents can't talk to each other, and the workflow scripts can build and pass context in a deterministic way between sessions that are created during the execution of a given workflow.
But you could use skillzmouse in any harness. I've used it in pi, Junie and Kimi Code. Junie CLI had problems with compliance.
here is how i approach it in practice:
i've seen many try to generalize rules before doing things (design principles, guidelines, architecture,...) but often the best way is to start small, guide the agent step by step and (this is the most important part) at the end ask the agent to summarize what it learned and write it down.
then on the next cycle, ask the agent to read the previous notes and do this again: read, do, write.
i've been doing this for about 14 months now and have ended up with 2 categories of "knowledge": general (runs across multiple projects) and specific (per project).
these are kept in two formats: markdown and "decision records". each decision is a markdown but has meta data around its state: approved, rejected, failed, etc.
this growing body of knowledge works very similar to experience.
one note about agent memory: first i find it opaque, secondly not sharable across team members, and thirdly not very human friendly (basically as the agent does more, you learn less about your own project due to the opacity of the memory).
one thing i haven't been able to do figure out well yet is how to extract this from an existing codebase into this structured library of markdown and decisions. i'm keen to see how others do this.
once you have this library, you can get your agents to respond to inbound signals (slack, sentry, axiom alerts, etc) and work with a high level of quality and confidence, provided that they follow the read, do, write cycle EVERY TIME.
when i started this system, i used a committed markdown in git, then moved it to an obsidian (with MCP), then to Notion (so it's available team-wide) and finally built a product around it (bench47.com, if you care to check it out, disclosures, etc)
- I'm currently using Sentry's dotagents to share skills and pin versions
- I avoid a centralized "single brain" and instead have started a "knowledge" directory in each repo. I copy relevant learnings in so stuff stays isolated
- I use an OSS tool from my company to turn anything that could be enforced by code into something that can be enforced by code (keeps the markdown files leaner)
- My daily driver is cmux with a silly amount of sessions, so I'm constantly throwing away sessions and keeping context small
All comments shown.
Couldn't load more comments. Check your connection and try again.