Where prototypes break
Most agent prototypes run as one process, for one user, with the conversation held in memory. When the same system serves many customers, keeps state between sessions and runs all day, context from one session shows up in another, memory grows until every request carries all of it, a tool does something the user was never allowed to do because the model asked for it, and agents keep running with nobody talking to them.
Typical scope
- Tenant and session isolation
- Tool contracts, with permission checks outside the model
- Memory with a defined scope, size and lifetime
- Persistent state in PostgreSQL, so an agent can stop and resume
- Queues, retries and long-running work
- Lazy spawning and idle suspension
- Model routing and cost control
- Evaluation and observability
- Deployment architecture
- Choosing and integrating the agent stack: Hermes, Vercel AI SDK, Parlant
Engagements
Not included
- Training or fine-tuning models
- An MCP server or WebMCP interface over your product (a separate service)
- Hosting: the system runs in your infrastructure, and you pay model providers directly
Selected work
Client project at Bosnadev · architecture end to end
Multi-tenant AI relationship management platform
A relationship management product with NestJS services, PostgreSQL and Neo4j data models, a React Native client and a conversational AI layer. I designed the multi-tenant agent architecture: per-tenant isolation, custom tool surfaces, persistent memory and state sync backed by PostgreSQL, with lazy spawning and idle suspension to bound what each agent costs. I selected and integrated the agent stack (Hermes, Vercel AI SDK, Parlant) and defined the tool contracts and session context boundaries for CRM operations.
Questions
How much does it cost to build and run an AI agent?
An implementation project starts at €7,500. A design engagement on its own is quoted per case. Running cost depends on how many users you have, how long agents stay active and which models handle which steps; the design includes a cost model for your product. You pay model providers directly.
What does an AI agent consultant do?
In my case: design the system around the model and build it with your team. That covers tenant and session boundaries, tool contracts, memory and state, and cost limits, and the code ends up in your repository. I don’t train or fine-tune models.
Do we need one agent or several?
One agent with a well-defined set of tools covers many products. Several agents make sense when steps need different permissions, models or lifetimes, for example routine steps on a cheaper model and harder ones on a stronger model.
How do you stop an agent from taking actions it should not take?
The checks sit outside the model. Each tool has a contract that says what it may do, and before anything runs the system checks the user, the tenant and the arguments, whatever the model asked for. Actions that are hard to undo can require a confirmation. Tests cover tool permissions and tenant boundaries, so a change that breaks them fails before it ships.
How do you know whether an agent works in production?
Tests cover tool permissions and tenant boundaries, and the cost model says what each agent should cost to run, so drift is visible. After launch, the agent reliability retainer (from €750/month) adds monitoring, agent evals and regression tests as models, providers and your API change.
When should we not use an agent at all?
When the steps are known in advance and the same every time. A workflow or a plain rule is cheaper, easier to test and does not need a model to decide anything. If that is your case, I say so in the first conversation.
Writing
- 2026-09-06 · agentsGPT-6 Astra can move a block almost perfectly. Precision is another matter
- 2026-09-05 · agentsSpotify’s Portal cut Claude Code token use by about 90% by routing work to a cheaper model
- 2026-09-04 · agentsAI agents with read-only web access used a nearly abandoned wiki as a message board
AI agent architecture
Discuss a project
What you are building, what is going wrong, and roughly when. I answer within a couple of days.