Ask HN: Multi-tenancy for Markdown-based agentic systems
2 points
2 hours ago
| 1 comment
| HN
So I've been looking at how companies are building their agentic setups - OpenClaw, Claude Code type systems. And one thing I keep seeing is everyone is storing memory/config/state as markdown files on disk instead of a proper database. OpenClaw literally keeps conversations, memory, skills all as .md and YAML files. Claude Code has this whole CLAUDE.md hierarchy thing where it reads markdown at the start of every session.

For single user this makes total sense - you can git track it, grep it, read it in any editor. Super clean.

But what happens when you're doing this for multiple clients? Like if you're running an agency or building a SaaS on top of this pattern?

Should we be doing one folder per client and calling it a day? What about when memory files keep growing and your context window is getting stuffed? How do you make sure Client A's stuff doesn't accidentally leak into Client B's session?

For anyone who's actually doing this in production — what's working? Separate workspaces? Containers? Some hybrid thing? Or did you just give up on markdown and go back to a database?

Genuinely curious, not finding much real-world experience on this.

ahmed-fathi
1 hour ago
[-]
Markdown works because one person owns the whole picture. The moment you add a second client, that assumption collapses. You're not choosing between markdown and a database. You're discovering that markdown was always a database just one held together by a single person's understanding. The moment no single person owns the full picture, markdown stops being a feature and starts being a liability. The answer to your questions database for isolation and access control, markdown for the human-readable layer that people actually need to read and edit. Keep the legibility. Drop the illusion that legibility scales.
reply
paragarora
1 hour ago
[-]
so db for multi-tenant? The moment we do that, we have to rely 100% on RAG and no agentic search, grep, find etc works..
reply
vova_hn2
1 hour ago
[-]
> no agentic search, grep, find etc works..

What do you mean? Why wouldn't it work?

reply