跳到正文
Hacker News:AI 熱帖·· 15 天前AI 評分52

Hacker News 討論如何管理 AI 智能體跨客戶與項目的上下文

Ask HN: How do you manage your AI agents' context across clients and projects?

AI 導讀

Hacker News 的 Ask HN 貼文詢問如何管理 AI 智能體在不同客戶及項目間的上下文,回覆者分享了多種做法。做法包括以 Markdown 文件、知識庫及 Issue tracker 保存決策和工作進度,亦有人按客戶和項目分層隔離記憶。另有工具集中儲存或搜尋 Claude、Codex 等智能體的工作階段和歷史對話。

正文

Image 1Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

Ask HN: How do you manage your AI agents' context across clients and projects? 16 points by Michel_Aventin2 hours ago | hide | past | favorite | 17 comments Hi 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. help Image 2synapsomorphy21 minutes ago | next[–] It seems many have built similar tools for solving this. Mine lets me run Claude and Codex (and pi but then you have to pay API rates) from the same localhosted webserver, and also schedule feature implementations to always hit the weekly usage cap. chats logs in jsonl (used by both) are saved per project in a never-pushed git branch. All agents run in Podman containers. I am just starting to play with a higher-level agent that just pushes the repo in a direction based on the human answering a thorough list of clarification questions. These have been really useful - Encourage short, commit-linked chats, to avoid the expensive cache writes. - Plot of LOC over time. Use better models until this starts not spiking a ton with every new feature. - Terminals kinda suck for agentic stuff IMO and we should stop cramming agent loops into them. Minimalism doesn't really help here, it's really nice to have built-in STT, real buttons, easy scrolling, etc etc etc. - The minimal delta is a commit. Every implementation turn must end with one or multiple, and a clean worktree. - Crystal clear, extremely granular usage data. This is something Claude Code and Codex will never give you, instead you get dark patterns nudging you to forget about the spend, while changing plan quotas every couple weeks. reply Image 3akst28 minutes ago | prev | next[–] When I start a new project, I point to other ones where I'm happy with the quality as exemplars. I think its probably simpler to copy relevant stuff allow older projects go out of date until I start working on them again, then I tell the agent to look at the newer project to update its style. I have 2-4 on going projects I tend to a bit of that, normally 2 at a time, when I pick up one of the others, I really just do that; point to the older one. But within projects I don't really try to manage context, more so I just have an issue tracker which I add to keep track of stuff. In 2 of my long running projects I have some bootleg issue tracker built in (along with a screenshot QA tool which sends issues to the tracker) into the UI of the tool. I guess to extent I can, I try to avoid keeping some preferences in the context like formatting and linting (including directory structure and white listing imports in certain parts). I've been trying to find more ways to automate that way, so I keep my prompts and skills and goals limited to objectives where possible, so preferences like styles and structure are automatically enforced. When I have multiple agents, I just tell them to maintain write only ledgers to coordinate to avoid overlapping work, but it's easier when your project is broken up into self contained components with communication boundaries (defined in protobuf) like a FE/BE split or seperate service codebases (I reassemble it as a google style modular monolith to avoid running too many processes) reply Image 4anyonecancode42 minutes ago | prev | next[–] I built a tool for myself for this. It runs on localhost and uses sqlite as a storage engine for metadata, and the XDG paradigm for content (eg ~/.local/share, ~/.local/state) I create topics, eg localhost:8080/topic/1. Each topic can have tickets, artifacts and sessions. Tickets are linked task tracking tickets (eg Jira, though not actually Jira in my case), artifacts are documents etc produced during sessions, and sessions are Claude Code sessions (though it wouldn't have to be Claude, that's just what I use). Sessions run in a terminal emulator in the browser. What makes this work is that I have some general purpose directions/context each topic gets, but there's also a running topic.md that gets updated at the end of each session. This way my context builds up and persists specific to that topic. Artifacts the agent produces (eg specs, plans) open up in a sidebar and render as HTML even though they're stored as markdown, and its easy to go back and find them from previous sessions. Session transcripts also are accessible from the Topic page. I do regularly run compaction on the topic.md, moving the full content to an archive and keeping the working context smaller. reply Image 5jen729w48 minutes ago | prev | next[–] Use my Johnny.Decimal system. [0] (Disclosure: I'm Johnny.) Every part of my life and business has a well-defined ID. This ID has: - A defining entry in my index [1], which is an Obsidian vault. - Therefore, also a Markdown note(s). - A folder on disk. I have a CLI [2] and agent skills [3] that help your LLM understand these relationships. Then you just: jd 21.15 // or search by title claude and now Claude has access to: - All of your notes from your index. This is your shared memory: it's designed to be human-readable. - All of its memory and transcripts from the fact that you launch it in the same folder whenever you do this piece of work. This is its internal memory. - With this comes the ability to easily --resume past conversations and so on. That's … it. Carefully-named Markdown files and folders. My numbers aren't a prerequisite – there's nothing magical about them – but they sure help. You can do this all for free. It takes about half an hour to set up. My MCP server [4] adds some quality-of-life but is paid (and means I can buy lunch :). > I’m exploring whether to build something I really wouldn't. I get 10 emails a week from people who already are and I don't see the point. It's a solved problem. [0]: https://johnnydecimal.com/ [1]: https://johnnydecimal.com/documentation/the-jdex [2]: https://johnnydecimal.com/documentation/jd-cli [3]: https://johnnydecimal.com/documentation/agent-skills [4]: https://johnnydecimal.com/software/mcp-server reply Image 6raleighm38 minutes ago | parent | next[–] I recently experimented with breaking my life into segments (like the reporting segments of a company) and organizing Dropbox, text journals, and Claude chats in accordance with those segments. What you are describing is far more advanced and I'm intrigued. Checking out the site now. reply Image 7hyldmo33 minutes ago | prev | next[–] I built a tool for this: https://farero.ai It stores every single chat regardless of ai provider in an indexed sqllite database on my mac and it injects a couple of extra mcp tools + a tiny prompt into codex/claude/opencode so the agent can search every single decision / chat I've ever had. I've also connected grok bot to this app, and i set up one for each project that can launch coding worktrees, monitor analytics for bugs, etc. Lets me run everything pretty hands off, I mostly jump in to review PRs or make decisions reply Image 8mapontosevenths47 minutes ago | prev | next[–] 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. reply Image 9chrisweekly59 minutes ago | prev | next[–] Matt Pocock's skills library^1 is the basis for my approach. 1. https://github.com/mattpocock/skills/blob/main/README.md reply Image 10edg500051 minutes ago | prev | next[–] I let agents read their own pre-compaction history often, as well as history form other sessions. I use both Codex and Claude Code. The main friction right now is keeping an overview of the sessions. Sessions don't have a max length for me. I run them as long as I want, but I keep session scope somewhat limited, usually to one discipline (e.g. software, CAD, electrical, sales, website). But I'll switch to the GUI apps soon, because they seem to have reached parity over the terrible CLIs that I use. reply Image 11cpinto47 minutes ago | prev | next[–] so i built https://estratos.ai (5.) to ensure context from one client never pollutes a different client (or project, etc.) happy to explain the architecture and save you the sign up. it's set up as a layer-cake, you get layers like root, agent, client, project. 1./2. tell your agent to read/store its context from eg. root.agent_name.client-a.project-a1 2./3. next client is setup as root.agent_name.client-b.special-project-b1 3. when the agent loads the memory from there, it concatenates all the instructions from root, agent, client, project. 3. isolation is enforced by estratos so the llm doesn't get to know that there's a client-a subtree next to the client-b subtree this works better for me instead of the knowledge graphs, etc. because of the enforced isolation and the domain that it targets (accounting firms, where sharing context from one client to the next is deadly). reply Image 12charlesabarnes1 hour ago | prev | next[–] I use a gitignored ADR (Architecture Decision Record) directory in all of my repos right now. I mainly use Claude code, but I am dabbling in self hosted llms with oh my pi. There's no additional tools needed because usually llms "get it" natively. Also I tend to use a gitignored status doc for resuming where I left off. I tend to leave this stuff gitignored since it's all pretty "sloppy" and not really for consumption with others. reply Image 13twodave53 minutes ago | prev | next[–] re: #1 I have a skill that essentially manages a daily board in json format and pulls in active or potential tasks from all my work streams (email, slack, grafana, ado, or even manual input). I have this management plane keep a journal for each day and then spin off sub-sessions to work individual items. I pretty much just run the thing on a loop, and since context is stored with the board itself there’s no issue closing down and restarting the session or clearing context occasionally. reply Image 14murillians1 hour ago | prev | next[–] Spec driven design helps, OpenSpec/Git SDD Kit/ GitShipDone helps with the previous decision problems and design context. Most of these live in the project repos so they won’t pollute each other reply Image 15stikit55 minutes ago | prev | next[–] Skills and good memory management are perfectly fine for cross project and client specific context. How are you currently using them in your workflow? reply Image 16dumbmrblah58 minutes ago | prev | next[–] Self hosted Gitea wiki. Tell it to reference previous projects if applicable, standard setup principals etc. Agent continuously references and updates it. reply Image 17option_greek52 minutes ago | prev | next[–] Context has to come from some project management mcp. Either good old JIRA or recent ones like agentcron.ai reply Image 18m00dy1 hour ago | prev[–] md files ? reply Image 19 Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact Search:

來源:Hacker News:AI 熱帖 · news.ycombinator.com