Architecture Patterns for Production AI Systems: Lessons from Building and Failing with Generative AI Products

outropy · Tech · 2024 · source Agentic: yes · promotional bias: low · source-backed · extracted with prompt 0.5.4 (schema v2)

Generated from extraction.json — do not edit by hand. Every claim cites verbatim source evidence; stated means the quote directly asserts the claim, implied means it supports it indirectly.

Problem

Domain: Production AI productivity systems

Outropy tried to build a production AI productivity tool for managers and engineers, but discovered that agentic AI systems need software-engineering architecture, domain models, memory, eventing, and resilience rather than demo-grade RAG or lab-style model experimentation.

Constraints:

Architecture

Outropy evolved from a Slack chatbot into a Chrome extension built around AI pipelines and agents. The architecture treats workflows as data pipelines that transform Slack/calendar/productivity data into domain objects and treats agents like coarse-grained stateful objects. Rather than direct agent-to-agent calls, the system uses semantic events on a bus; memory is built from event-sourced facts and a probabilistic Neo4j graph; workflows are broken into smaller semantic stages with published interfaces; and durable workflow patterns such as Temporal-style checkpointing separate orchestration from side effects and protect the system around model API failures.

Diagram confidence: reconstructed (reconstructed from prose).

flowchart LR
  slack-productivity-inputs["slack-productivity-inputs"] --> workflow-pipeline-layer["workflow-pipeline-layer"]
  calendar-context-inputs["calendar-context-inputs"] --> workflow-pipeline-layer["workflow-pipeline-layer"]
  workflow-pipeline-layer["workflow-pipeline-layer"] --> semantic-domain-model["semantic-domain-model"]
  workflow-pipeline-layer["workflow-pipeline-layer"] --> durable-workflow-runtime["durable-workflow-runtime"]
  semantic-domain-model["semantic-domain-model"] --> agent-object-layer["agent-object-layer"]
  semantic-domain-model["semantic-domain-model"] --> memory-graph["memory-graph"]
  agent-object-layer["agent-object-layer"] --> semantic-event-bus["semantic-event-bus"]
  semantic-event-bus["semantic-event-bus"] --> memory-event-sourcing["memory-event-sourcing"]
  memory-event-sourcing["memory-event-sourcing"] --> memory-graph["memory-graph"]
  memory-graph["memory-graph"] --> agent-object-layer["agent-object-layer"]
  agent-object-layer["agent-object-layer"] --> model-api-bulkheads["model-api-bulkheads"]
  durable-workflow-runtime["durable-workflow-runtime"] --> model-api-bulkheads["model-api-bulkheads"]
  human-users["human-users"] --> workflow-pipeline-layer["workflow-pipeline-layer"]
Drag to pan · scroll or use +/− to zoom · reconstructed from the source's described component topology

Components

Component Role Interacts with
slack-productivity-inputs Slack messages, threads, conversations, and productivity signals used by Outropy’s early workflows. workflow-pipeline-layer
calendar-context-inputs Calendar context used to personalize daily briefings and decide which topics matter. workflow-pipeline-layer
workflow-pipeline-layer Composable AI workflow steps that transform raw productivity data into semantic domain objects and summaries. slack-productivity-inputs, calendar-context-inputs, semantic-domain-model, durable-workflow-runtime
semantic-domain-model Structured object model of conversations, topics, summaries, and user-relevant facts produced by the pipelines. workflow-pipeline-layer, agent-object-layer, memory-graph
agent-object-layer Stateful, goal-oriented agents modeled as coarse-grained objects with memory, tool use, and collaboration through events. semantic-domain-model, semantic-event-bus, memory-graph, model-api-bulkheads
semantic-event-bus Well-defined domain event stream used to decouple agents and workflows. agent-object-layer, memory-event-sourcing
memory-event-sourcing Event-sourcing layer that compacts user event streams into memory representations. semantic-event-bus, memory-graph
memory-graph Probabilistic Neo4j graph storing facts, user memory, uncertainty, and relationships. memory-event-sourcing, semantic-domain-model, agent-object-layer
durable-workflow-runtime Durable workflow/checkpointing layer for retries, timeouts, orchestration, and side-effect separation. workflow-pipeline-layer, model-api-bulkheads
model-api-bulkheads Resilience boundaries around ChatGPT or other model APIs. agent-object-layer, durable-workflow-runtime
human-users Managers and engineers using the Slack/Chrome productivity assistant and giving product feedback. workflow-pipeline-layer

Data flow

Slack messages, calendar context, and other productivity data are ingested into workflow steps that break raw messages into conversations, deduplicate topics, rank discussions, and build a semantic domain model for personalized summaries. Agents subscribe to semantic events rather than calling each other point-to-point. User facts and event streams are compacted into memory representations and graph storage. Durable workflow orchestration handles retries, timeouts, checkpointing, and side-effect separation around AI model calls and downstream pipeline steps.

"We started as a Slack chatbot.

Eventually, we became like a Google Chrome extension. This is a screenshot from our pitch deck that shows the Chrome extension."

3 supporting quotes
“Eventually, we became like a Google Chrome extension. This is a screenshot from our pitch deck that shows the Chrome extension. One of the interesting things about Outropy itself, it's a very garden-variety AI startup.”article, stated
“break this down into discrete conversations and tell me what are the topics of these conversations”article, stated
“we started thinking of workflows as basically data pipelines, and agents are a lot like objects”article, stated

Why this architecture

Outropy’s lesson is that production AI systems need domain modeling and software architecture. One-step RAG demos failed because LLMs needed structured intermediate objects. Microservices were a poor conceptual fit because agents are stateful, non-deterministic, and data-intensive. Semantic events reduced agent coupling, graph/event-sourced memory handled uncertain user facts, and durable workflows provided the resilience that teams otherwise rebuild ad hoc around model APIs and long-running AI pipelines.

4 supporting quotes
“What we've learned is that this almost never works. This is great for demos that you show your boss”article, stated
“this was an exercise in actually building a domain model. That's what we were doing. We're building multiple different slices, bounded context, whatever you want to call, using the LLM to do the transformation.”article, stated
“Agents are actually a very bad fit for a traditional microservice architecture.”article, stated
“A durable workflow is basically a way to do all that pipeline in a way that the framework or the runtime takes care of retries”article, stated

Models used: ChatGPT 2.5 · GPT-4 · Llama models · Neo4j · Redis · Kafka · Temporal-style durable workflows

Scale

Alternatives considered (roads not taken)

Twitter-driven development

Rejected because: Building for promised future model capabilities ignores current production limitations.

“they're always building for the new version of the models that are going to come next year”article, stated

Slow data-science project mode

Rejected because: Waterfall-style lab work takes too long and may deliver weak product value after large staffing investments.

“They have 10 people in a lab fiddling with models, trying different things”article, stated
“Very waterfall. I don't think that this approach works well for products”article, stated

One-step RAG from raw data into the model

Rejected because: The team found raw context injection worked for demos but needed additional structuring steps in real systems.

“I could send you all the messages from Slack, say, amongst all these things, please tell me what are the topics”article, stated

The way that we evolved that is that instead of doing this, we actually added stuff."

— article, stated

Point-to-point agent collaboration

Rejected because: Direct agent calls create worse coupling than ordinary objects because autonomous agents decide on their own.

“avoid point-to-point agent collaboration, which is funny because I just told you the agents are objects and that's how objects work. Your object A called object B.”article, stated
“you start coupling all these different agents to each other in a way that is even worse”article, stated

Deploy agents as stateless microservices

Rejected because: Agents need memory, dynamic state, and expensive context loading, breaking many Twelve-Factor assumptions.

“Agents are very stateful. This is often terrible for microservices for various different reasons. They're stateful to a point where because they have memory, they need to basically load everything they know about the user whenever they receive a request from that user.”article, stated
“There's no stateless. We actually need to bring context every time we execute something”article, stated

Patterns

workflow-decomposition (workflow)

Outropy split Slack summarization into smaller semantic workflow steps such as discussion extraction, deduplication, ranking, and personalized summary.

“one tiny pipeline that summarized discussion from our Slack channels. Then we would deduplicate discussions”article, stated

async-message-orchestration (orchestration)

Semantic events decouple agents by publishing well-defined domain events to a bus instead of point-to-point calls.

“using semantic events. There's different definitions of semantic events.”article, stated
“you send a message to this bus, and an agent register itself”article, stated

agent-memory (state)

User and productivity facts are accumulated into memory using event sourcing and a probabilistic graph database.

“The way that we actually use memory was through a graph database. We actually use Neo4j.”article, stated

durable-execution (reliability)

Durable workflows provide retries, timeouts, checkpointing, and separation between orchestration and side effects.

“If your workflow is interrupted midway, it will actually be able to checkpoint and start from there.”article, stated

fallback-degradation (resilience)

The speaker recommends bulkheads between application code and AI model APIs.

“I would still have a lot of bulkheads between your code and whatever AI model you're calling.”article, stated

structured-output-contract (data-contract)

The workflow converts raw Slack content into semantic entities with published interfaces rather than passing unstructured blobs between steps.

“breaking workflows down into smaller ones that actually had some published interface, some actual semantic meaning and semantic entities”article, stated

Tradeoffs

Treat AI products as engineering systems

Chose iterative software/product engineering over future-hype-driven or lab-style model experimentation.

Rationale: The speaker argues AI does not get a pass from iterative product engineering and that waterfall model tinkering is too slow for products.

“I want to see iterative incremental development in everything I do. I don't think that AI gets a pass”article, stated

Use semantic events rather than direct agent calls

Chose event bus with well-defined domain events over point-to-point agent collaboration.

Rationale: Events reduce coupling and avoid recreating distributed-object/web-services complexity between autonomous agents.

“if I avoid an agent calling another one directly, what do I do? There's one particular paradigm that I think works very well”article, stated

Delay Kafka until scale requires it

Chose SQLAlchemy events and Redis first over starting with Kafka for the semantic bus.

Rationale: The speaker recommends simpler eventing early, with Kafka only after hitting barriers.

“I recommend you delay using Kafka as much as you possibly can.”article, stated
“Then we moved to using Redis, which a lot of people do.”article, stated

Use durable workflow primitives

Chose Temporal-style retry/checkpoint/orchestration separation over ad hoc Redis job sidekicks and manual retry logic.

Rationale: Teams building AI/data systems tend to reinvent job splitting, checkpointing, and retry machinery if they do not adopt durable workflow frameworks.

“Everybody ends up reinventing this whole technology.”article, stated

Gotchas (what bit them)

Demo-grade RAG failed when used as the production architecture.

Root cause: Raw context injection did not create the intermediate semantic structure the product needed.

Resolution: Add workflow steps that transform messages into conversations, topics, domain objects, and personalized summaries.

“What we've learned is that this almost never works. This is great for demos”article, stated
“What you need to do usually is add more steps that add more flavor, more color, more structure”article, stated

Agents deployed like microservices break common operational assumptions.

Root cause: Agents are stateful, non-deterministic, data-intensive, and expensive to hydrate with context.

Resolution: Model agents as coarse-grained stateful objects/components and use durable workflows/events for orchestration.

“Non-deterministic behavior.”article, stated
“Data-intensive, poor locality, related to state a little bit, but it's always very hard to fetch data.”article, stated

Monolithic AI pipelines mix unrelated source concerns.

Root cause: A single pipeline had to understand Slack-specific formatting, Google Calendar context, and report generation at once.

Resolution: Break workflows into smaller steps with semantic interfaces so pieces can be swapped or reused across sources.

“the pipeline mixes unrelated concerns.”article, stated
“It had to understand also how Google Calendar works just so that it could generate some report”article, stated

Memory facts extracted from natural language are uncertain.

Root cause: A user statement may be joking, misinformed, low-authority, or context-dependent.

Resolution: Represent memory in a probabilistic graph rather than treating all extracted facts as equally certain.

“you cannot be super sure about things. We actually had a probabilistic graph”article, stated
“How do I know if this was the person who manages the project?”article, stated

Evaluation

The source is a postmortem rather than an eval report. It uses production outcomes, user adoption, benchmark comparisons with Slack AI, and architectural failure analysis to judge which patterns worked. The speaker also emphasizes iterative engineering over long lab-style model experiments.

Metrics: few thousand real users · first public beta after six months · quality benchmark versus Slack AI · commercial failure despite product quality · pipeline modularity and swappability · resilience around model API calls

3 supporting quotes
“This product failed miserably.”article, stated
“the product we built was miles ahead in terms of quality than Slack AI, of course, based on my own benchmarks.”article, stated
“if you brought me as a CTO, VP of Engineering, whatever, my first day is like, "Tell me how we build things here”article, stated

Outcomes

The source reports a few thousand users and discusses a final architecture that would look excessive for 10,000 users in ordinary software, but was driven by memory stores, content stores, semantic eventing, and model API resilience needs.

3 supporting quotes
“This is the final architecture that we had for this product.”article, stated
“Between the different databases for memory storage, for content storage, between having the semantic buzz maybe from the beginning”article, stated
“the whole thing in the bottom there is all about making sure that we have some resilience around, in this case, was the ChatGPT API.”article, stated