---
title: "AI agent architecture and development consulting"
url: "https://bosnadev.com/services/agent-architecture"
price: "Projects from €7,500"
provider: "Bosnadev (Mirza Pašić)"
location: "Bosnia & Herzegovina, remote, CET"
summary: "AI agent consultant for production systems: tenant isolation, tool contracts, persistent memory and cost limits. Development projects from €7,500."
---

# AI agent architecture and development consulting

Agent systems become different systems in production. They need tenant isolation, persistent state, bounded tool access, failure handling, evaluation and predictable costs. I design and build that layer around the model.

Price: Projects from €7,500.

## 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

### Architecture design

Price: quoted per case. Quoted per case.

- Tenant, session and tool boundaries
- Memory and state model
- Cost model: when agents run, and on which models
- Stack recommendation
- A written architecture your team can build from

### Architecture and implementation

Price: Projects from €7,500. Built with your team, in your repository, through to production.

- Orchestration and tool contracts
- Tenant isolation and persistent memory
- Lazy spawning, idle suspension and model routing
- Tests for tool permissions and tenant boundaries
- Documentation and handover

## 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

### Multi-tenant AI relationship management platform

*Client project at Bosnadev · architecture end to end*

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

- [GPT-6 Astra can move a block almost perfectly. Precision is another matter](https://bosnadev.com/2026/09/06/gpt-6-astra-robot-precision.md): GPT-6 Astra completed 19 of 20 block-placement trials but only 2 of 20 precision insertions. Robot performance fell sharply as tolerances narrowed.
- [Spotify’s Portal cut Claude Code token use by about 90% by routing work to a cheaper model](https://bosnadev.com/2026/09/05/the-smartest-model-should-not-do-all-the-work.md): Spotify cut Claude Code token use on bulk reads by about 90% with a cheaper worker model. Most agent work needs no frontier model; its attention is scarce.
- [AI agents with read-only web access used a nearly abandoned wiki as a message board](https://bosnadev.com/2026/09/04/ai-agents-will-find-their-own-communication-channels.md): Researchers found 18,000 posts by AI agents using a nearly dead German wiki as shared memory. Their web access was meant to be read-only, and the wiki accepted edits through GET requests.

## Contact

Discuss a project: write to mirza@bosnadev.com, or use the form at https://bosnadev.com/services/agent-architecture#start. I answer within a couple of days.

## Other services

- [WebMCP and MCP server development consulting](https://bosnadev.com/services/mcp-webmcp.md): Implementations from €4,000
- [AI visibility audit: AEO and GEO implementation](https://bosnadev.com/services/ai-visibility.md): Audits from €1,500
- [Software architecture consulting and review](https://bosnadev.com/services/architecture-review.md): From €2,500
- [Turborepo monorepos, AWS and CI/CD consulting](https://bosnadev.com/services/platform-engineering.md): Projects from €5,000
- [Fractional software architect, part-time](https://bosnadev.com/services/fractional-architect.md): From €3,000/month
- [All services](https://bosnadev.com/consulting.md)
