I’m Denis Shokhirev, an Agentic AI Systems Architect based in Freiburg im Breisgau, Germany, and at DennisCraft AI Studio I ship production AI systems on Claude, Supabase, n8n, Doppler, and self-hosted Postgres. The moment a team outgrows “just add another AI bot” is usually painfully obvious: decisions start living in private chats, two operators ask the same question in parallel, and nobody can reconstruct why an agent was allowed to touch a live record.
A chatbot is fine for isolated requests. It breaks when work becomes shared, stateful, and auditable. If your team runs support, logistics exceptions, internal approvals, or incident response with AI in the loop, the real need is not another chat surface. It’s a shared workspace with channels, memory, role boundaries, approvals, and an action log that survives staff rotation and postmortems.
Why standalone bots fail in team operations
The issue is not model quality. The issue is fragmented context. A private AI chat sees one user’s prompt history, not the team state around a customer, an incident, or a document flow. That means duplicated work, conflicting outputs, and weak accountability the moment an agent moves from answering questions to calling tools.
Signals that you need a workspace model
| Signal | What it looks like | Operational cost |
|---|---|---|
| Repeated questions | Different people ask different bots the same thing | Token waste and inconsistent answers |
| No shared memory | Context is trapped in DMs or personal sessions | Bad handoffs and slow escalation |
| No action trace | An agent updates a record without visible rationale | Audit pain and incident confusion |
| Role collapse | The same bot suggests, approves, and executes | Poor control points |
What teams actually need is closer to a self-hosted Slack pattern than to a “smart assistant” pattern. A channel becomes a process boundary. An agent subscribes to events in that boundary, reads the current state, proposes an action, waits for approval if needed, and writes every step to a database-backed audit trail.
The architecture I see working in production
You do not need exotic infrastructure. A stable first version is usually built from parts your team already understands. Self-hosted Postgres stores messages, task state, policy tables, approvals, and immutable logs. Supabase handles auth, realtime subscriptions, and an API layer. n8n routes events across workflows. Claude, called through the Anthropic SDK, gets scoped channel context instead of broad account-wide memory. Doppler keeps secrets out of loose environment files and ad hoc workflow notes.
Core entities
- channels for customer threads, incidents, or ops queues
- messages from humans and agents
- agent_runs with prompt, output, token usage, and latency
- tool_calls for every action against an internal function or API
- approvals for actions that must pause for a human
- audit_log for immutable event history
from anthropic import Anthropic
import os
client = Anthropic(api_key=os.environ["ANTHROPIC_API_KEY"])
def classify_message(channel_state: str, incoming_text: str) -> str:
response = client.messages.create(
model="claude-sonnet-4-5",
max_tokens=300,
system="Classify the next action for the team workspace.",
messages=[{
"role": "user",
"content": f"STATE:\n{channel_state}\n\nMESSAGE:\n{incoming_text}"
}]
)
return response.content[0].textThis is the key shift: the model is not the product surface. The workspace is. The model becomes one component inside a controlled execution layer. If an agent opens a ticket, changes a shipment status, or drafts a compliance response, it does so through explicit tool calls with logging, not through prompt-only hidden behavior.
What should be self-hosted and what can stay managed
“Self-hosted” should not become ideology. It should map to data sensitivity, retention requirements, and customer contract boundaries. In most B2B environments, that means hosting your state and logs where you control them, while using managed inference where acceptable.
| Component | Self-hosted is a strong fit | Managed is often acceptable |
|---|---|---|
| Postgres | Yes, for control, residency, and backups | Yes, early via Supabase if contracts allow |
| Attachments | Yes, for PII, contracts, internal reports | Sometimes, with clear DPA and retention |
| Model inference | Not always required | Usually yes with policy guardrails |
| Workflow engine | Yes, n8n is worth controlling directly | Sometimes for low-risk flows |
The value of the shared workspace is not only data location. It is policy centralization. Access rules, approvals, message retention, and action replay live at the platform level instead of being reimplemented inside each bot prompt.
Security and audit are the point, not an add-on
OWASP’s LLM Top 10 2025 calls out prompt injection, excessive agency, and sensitive information disclosure as practical risks in systems with tools and connected data sources: https://genai.owasp.org/. Anthropic’s tool use guidance also pushes developers toward constrained tool schemas and clear permission boundaries: https://docs.anthropic.com/.
In practice, I like four control layers:
- policy checks before any tool call
- separate service roles for read and write paths
- human approval for external side effects
- static analysis on orchestration and integration code
bandit -r app/
semgrep --config=p/owasp-top-ten .
gitleaks detect --source . --verbose
pytest tests/test_tools.py -qThese tools do not solve the full agent problem, but they catch very expensive basics. On several recent agent builds, I found the same issue repeatedly: the model suggested a SQL fragment, and a developer moved too quickly to interpolate it into a database layer before converting it into a parameterized query. That is not an “AI risk” in the abstract. That is a very normal production bug made easier by over-trusting generated code.
How to start without building a giant internal platform
Do not begin with an all-company AI portal. Start with one process where the pain is already visible and where success is measurable. Support triage, incident coordination, and internal operations requests are good candidates because they already have queues, ownership changes, and response deadlines.
A practical rollout in two iterations
- Stand up Postgres with tables for channels, messages, approvals, and audit_log.
- Use Supabase for authentication and realtime listeners.
- Create 2 or 3 n8n workflows for new messages, approval requests, and tool execution.
- Use Claude first for summarization and classification, not autonomous writes.
- Add write actions into CRM or internal systems only after logs, approvals, and rollback exist.
version: "3"
services:
n8n:
image: n8nio/n8n:latest
ports:
- "5678:5678"
environment:
- DB_TYPE=postgresdb
- DB_POSTGRESDB_HOST=postgres
- DB_POSTGRESDB_DATABASE=workspace
- N8N_ENCRYPTION_KEY=${N8N_ENCRYPTION_KEY}The big idea is simple: if AI is supposed to operate inside a team, it needs shared operational memory, shared policies, and shared traceability. Private chatbot sessions do not provide that. They create new silos with nicer UX.
FAQ
Do I need to clone Slack exactly?
No. Most teams need channels, threads, roles, approvals, and event history. The interface can stay simple if the state model underneath is solid.
Can I do this without Supabase?
Yes. If you already have auth and realtime infrastructure, use it. Supabase is mostly a speed advantage for the first production version.
When should an agent get write access?
Only after you have an audit trail, policy checks, and rollback. Before that, let the agent classify, summarize, and draft, but not mutate live state on its own.
Is this pattern only for large enterprises?
No. Mid-market teams hit this problem early if they have cross-functional operations and regulated data. The trigger is process complexity, not company size.
How is this different from a RAG chatbot?
A RAG chatbot answers a user question against documents. A shared workspace listens to team events, stores process state, enforces roles, and triggers actions through controlled tools.
Where does your AI stack lose team context most often today: private chats, workflow automation, or the first write action into a production system? I’d genuinely like to compare that with what I see across DACH B2B teams.
I run a free 30-minute stack audit for DACH founders building AI in regulated markets. DM me on LinkedIn or write to @ger_dennis_ai.
I build agents like this for businesses in Germany and the EU.
Tell me in two sentences what eats your team’s time – reply within 24 hours.
Turn your process into an AI system
Production quality. DACH B2B focus.