Upgrade to Pro — share decks privately, control downloads, hide ads and more …

Beyond the Demo: Engineering an Open-Source AI ...

Sponsored · Ship Features Fearlessly Turn features on and off without deploys. Used by thousands of Ruby developers. →

Beyond the Demo: Engineering an Open-Source AI Platform for Production

Building an AI prototype has never been easier. Building an AI platform that is secure, scalable, observable, and reliable enough for production is an entirely different challenge.

In this talk, I'll share the engineering journey behind Synkora, an open-source AI platform designed to help organisations build and operate production-grade AI applications without being locked into a specific model provider or cloud vendor.

Rather than focusing on prompts or individual LLMs, this session explores the engineering foundations required to run AI systems in production. We'll cover how we designed a modular architecture that supports multiple AI providers, agent workflows, contextual retrieval, workflow orchestration, background processing, and self-hosted deployments.

More importantly, I'll discuss the real engineering challenges we encountered along the way—from scaling long-running AI workflows and managing context efficiently to implementing observability, security, and operational best practices—and the architectural decisions that helped us overcome them.

Attendees will leave with practical patterns, lessons learned, and reference architectures that they can apply when building their own production AI platforms.

What attendees will learn
The architectural building blocks of a production AI platform
Designing provider-agnostic AI infrastructure
Orchestrating long-running AI workflows
Context management beyond simple prompt engineering
Operating AI workloads with observability and monitoring
Security and deployment considerations for enterprise AI
Lessons learned from building and open-sourcing a production platform

Raju Mazumder

October 28, 2026

Transcript

48 slides
  1. C O N TA I N E R D AY

    S S I N G A P O R E 2 0 2 6 Beyond the Demo. Making agent systems scale and stay reliable. Raju Mazumder · 15+ years in software AI Engineering Lead, Deriv · Creator of synkora.ai X @rajumaz · LinkedIn in/rajuniit
  2. A TRUE STORY · SYNKORA agent> query(orders) error: connection refused

    agent> query(orders) error: connection refused agent> query(orders) error: connection refused Nothing crashed. It kept trying. A real agent loop we debugged. Same query. Same arguments. Same error.
  3. THE GAP Friday: a demo. Monday: something people trust. The

    first useful answer creates a false sense of completion.
  4. THE FORECAST Over 40% of agentic AI projects will be

    cancelled. Gartner forecast, June 2025, for the end of 2027. A prediction, not a measurement. Escalating costs Unclear business value Inadequate risk controls → 02 Context → 07 Evals → 05 Control · 06 Trust the bill compounds with every turn you cannot show what you do not measure what it can touch, who approves
  5. THEN THE REAL QUESTIONS ARRIVE 01 Who can use it?

    Which customer, which team, whose permissions. 02 What can it see? Whose data reaches the model, and where it goes after. 03 What can it change? Reading is one thing. Write, delete, send, pay is another. 04 What happens when it fails? Not if. When. And a user is on the other end. Not later questions. The product.
  6. A demo proves the happy path. Production owns every other

    path. • Two requests at once • A document that is far too long • An API that times out • Hostile input • A tool that returns junk • A provider with a bad afternoon The job is not to make the model smarter. It is to make every boundary explicit.
  7. THE WORKED EXAMPLE Synkora: the application layer for AI agents.

    Web UI + REST API Multi-tenant workspaces RAG knowledge bases 50+ tool integrations 8 delivery channels Human-in-the-loop approvals Scheduled + autonomous runs LLM observability + cost tracking Self-hosted · MIT licensed · your own LLM keys In production across micromobility, finance and enterprise This talk is not about these features. It is about what keeps them alive.
  8. BEFORE YOU BUILD The most reliable agent is the one

    you did not need. 3 2 1 One LLM call plus retrieval and examples A workflow An agent model-directed steps fixed code paths Flexible. Costly. Fails in new ways. Predictable steps. You own the control flow. Worth it when the task is ambiguous and valuable. e.g. Classify a ticket, then draft and format the reply e.g. Find why a deploy failed, across logs, repos and dashboards Predictable. Cheap. Fast. e.g. Summarise a support ticket Climb only when it demonstrably helps. Every rung adds failure modes.
  9. W H AT C H A N G E S

    W H E N T H E S Y S T E M C A N D E C I D E Seven agent problems. 01 · MONDAY 02 · DAY 2 03 · DAY 3 04 · DAY 4 The loop Context Visibility Tools & models Stop it by error signature The bill and the memory Record what the model saw Fail before the first token 05 · WEEK 2 06 · WEEK 3 07 · WEEK 4 Control Trust Evals Lanes, handoffs, long runs Secrets, PII, the trifecta Pass every time, not once We follow one agent through its first month. The problems arrive in this order.
  10. GOOD NEWS Most of it is old. WHAT THE HYPE

    CALLS IT WHAT YOU ALREADY KNOW Loop with a stopping condition → Queue worker + iteration limit Memory outside the conversation → Key-value store Verification loop with retry → Dead-letter queue + max retries Human checkpoint → Middleware gate that blocks The vocabulary changed. The patterns did not.
  11. Four parts are not. 1 2 3 4 The breaker

    needs an error signature Context compounds the bill Traces must show what the model saw State lives in natural language Each one is an old pattern that breaks when a model sits inside the loop.
  12. CHAPTER 1 OF 7 · THE LOOP Monday, 9:02. The

    agent gets a job. It has tools and a goal. When a tool fails, it tries again. And again. The loop Context Visibility Tools & models Control Trust Evals
  13. 01 THE LOOP · THE BREAKER Same query. Same arguments.

    Same error. query() → query() → query() again. again. again. A normal circuit breaker sees “three failures.” The agent needs to see “the same mistake.”
  14. POP QUIZ Five failures each. Only one is stuck. A

    B Five tools. One tool. Each fails once, differently. Which one should trip the breaker? Fails the same way, five times.
  15. THE ANSWER: B Key the breaker on tool + error

    signature. error_key = f"{tool_name}:{error_message[:100]}" if count[error_key] >= 3: break # same tool, same error A keep exploring B stop the loop Different tools, different errors Same tool, same error ×3
  16. CHAPTER 2 OF 7 · CONTEXT Day 2. It remembers.

    It costs. The loop now stops. But every turn it carries everything it has ever seen. The loop Context Visibility Tools & models Control Trust Evals
  17. 02 CONTEXT · THE BILL Compute is flat. The bill

    is not. Tokens per request at turn 30, same session 30–40k 5–10k after compaction ≈70% lower cost. Same agent. Same quality.
  18. 0 2 C O N T E X T ·

    F O U R PA S S E S Four kinds of waste. 1 2 3 4 Tool schemas Attached files Tool results Binary blobs 50 tools 8–15k tokens Over 10k chars Keep last 3 in full Base64 over 1k chars → under 3k → 600-char query preview → older: head + tail → size note, immediately Thresholds are ours. The waste is in every agent. Skills fix the same thing: name first, body on demand.
  19. Keep the signal. Delete the payload. WHAT THE MODEL NEEDS

    “47 rows returned, 3 failures, report saved.” Not 100k characters of screenshot data.
  20. 0 2 C O N T E X T ·

    W H E R E M E M O RY L I V E S Decide where each thing is remembered. IN THE WINDOW IN STORAGE IN THE MODEL what this step needs now state you can fetch again knowledge needed everywhere Pruned, summarised, and the first to be poisoned. Keep it small. Plans, intermediate results, documents. Pass a reference, not a copy. Changes slowly and costs a training run. Not a place for live facts. Synkora: four compaction passes cut it from 30–40k to 5–10k tokens. Synkora: knowledge bases; pending tasks survive summaries. Fine-tuning or a better base model.
  21. 0 2 C O N T E X T ·

    T H E H I S T O RY Not confused about the tool. Confused about its own history. Error: connection refused Error: connection refused Error: connection refused Error: connection refused Error: connection refused Error: connection refused Error: connection refused Error: connection refused Error: connection refused Context poisoning: nothing throws. Answers just degrade. the actual question
  22. CHAPTER 3 OF 7 · VISIBILITY Day 3. Worse answers.

    All green. You trimmed the context. How would you know you trimmed the wrong thing? The loop Context Visibility Tools & models Control Trust Evals
  23. 03 VISIBILITY · THE TRACE A wrong answer. A perfect

    trace of 200s. Turn 4 SQL returns correct data Turn 8 Pruning trims part of it Turn 12 Model summarises what is left Output Confident. Wrong.
  24. 0 3 V I S I B I L I

    T Y · A T R U E S T O RY cache_read_tokens: 0 Every turn after the first. No error. Clean execution. Wrong cost. The trace told us before the invoice did. Anthropic You mark the prefix to cache. Reads cost a fraction. OpenAI Automatic on long prompts. No setup. Gemini Implicit and automatic, or explicit with a stored cache. Same rule everywhere: only an identical prefix is reused. Change one early token and the cache misses.
  25. 03 VISIBILITY · WEEK ONE OF TRACES None of this

    was in the logs. 22% 18+ of web-search calls timed out turns before pruning ate SQL results avg 8.4s against a 10s limit. Hidden as graceful failures. only long sessions, one agent. Found on day 4. 41% · 28% 4% → 67% error rates on two tools cache hit rate on three agents in config for months. Nobody knew. after dynamic content left the prompt. Nothing alerted. No user reported it. The event sequence did.
  26. 0 3 V I S I B I L I

    T Y · E V E RY O P T I M I S AT I O N N E E D S A M E T R I C One week. 312 quiet failures. 34% 312 2.1M 3 of sessions triggered pruning data-bearing results truncated tokens saved by pruning days with more than 20 truncations The pruner saved money and degraded answers. Nothing threw an error.
  27. CHAPTER 4 OF 7 · TOOLS & MODELS Day 4.

    The world fails around it. Now you can see. What you see: APIs time out, tokens run out, models go down. The loop Context Visibility Tools & models Control Trust Evals
  28. 0 4 T O O L S A N D

    M O D E L S · D E C I S I O N TA B L E A decision table, not a retry loop. GitHub returns 401 Fail fast Search returns 503 1s → 2s → 4s Model fails before first token Fallback model Model fails after streaming Show partial failure Same tool + same error ×3 Break the loop Ask: what evidence says a retry could help?
  29. 04 TOOLS AND MODELS · STREAMING Fall back before the

    first token. Never after. FAILS BEFORE ANY CONTENT Request Provider fails Nothing sent yet Switch to fallback model Provider fails Keep partial. Surface the failure. FAILS AFTER STREAMING STARTED Request Tokens streaming Better a partial answer than two models stitched together.
  30. 04 TOOLS AND MODELS · TOOL DESIGN A tool description

    is a prompt. 40% less task completion time after a tool-testing agent rewrote tool descriptions Show how to use it Examples, edge cases, input formats, and the boundary with similar tools. Make mistakes hard Change the arguments. Requiring absolute paths removed a whole class of errors. Test it with the model Run many inputs, read the failures, rewrite the description. Before you remove the tool with a 41% error rate, read its description.
  31. CHAPTER 5 OF 7 · CONTROL Week 2. More users.

    More agents. One failing tool you can contain. Now many conversations at once, and sometimes a person must take over. The loop Context Visibility Tools & models Control Trust Evals
  32. 05 CONTROL · CONCURRENCY Two messages. One conversation. WITHOUT A

    LANE WITH A LANE Run A Run A Run B Run B Conflicting state A coherent history A lock per conversation. 90 s TTL, so a crashed run never holds it forever.
  33. 0 5 C O N T R O L ·

    M U LT I - A G E N T Two top teams. Opposite advice. THE CASE FOR THE CASE AGAINST Fan out. Do not. Lead + subagents beat a single agent by 90.2% on an internal research eval, at about 15× the tokens. Conflicting decisions and split context make fragile systems. “Share full agent traces, not just messages.” Our reading: split parallel, read-mostly exploration. Keep interdependent writes in one context.
  34. 05 CONTROL · HUMANS IN THE LOOP Knowing when to

    stop is a feature. 3–7% 93–97% 4.2 min < 100 ms of conversations are handed to a human finish without one median wait for an operator for the reply to reach the user Agent pauses → Operator replies in the same thread A handoff queue is a queue. Give it an SLA. → Agent resumes
  35. 05 CONTROL · EARNING AUTONOMY Autonomy is earned, one week

    at a time. L AT E R WEEK 4 W EEK 3 W EEK 2 WEEK 1 Draft a reply with citations Human sends it Classify urgency, route the ticket Human confirms Fetch account context Read-only tools “Can it act?” → “What evidence lets it act safely?” Apply a safe tag or status Approval gate Resolve low-risk cases After trace review
  36. CHAPTER 6 OF 7 · TRUST Week 3. Now it

    can act. Acting is the point, and the risk. What must it never be allowed to do? The loop Context Visibility Tools & models Control Trust Evals
  37. 0 6 T R U S T · W H

    AT T H E M O D E L S E E S The model reasons about the customer. Never sees them. T O O L R ESU LT W HAT THE L LM SE ES W HAT T HE US E R S EE S [email protected] [EMAIL_1] “The customer +1 415 555 0100 123-45-6789 → [PHONE_1] [SSN_1] → [EMAIL_1] submitted a request on June 3rd.” Same email, same token, every time. The model can still follow one customer across turns.
  38. 0 6 T R U S T · T H

    E L E T H A L T R I F E C TA Three things. Never all at once. Private data tools that read what matters Untrusted + content anything an attacker can write A way out + email, HTTP, links, anything that sends = Your data leaves Remove a leg. Do not trust a filter: a 95% block rate is a failing grade.
  39. 0 6 T R U S T · A C

    C O U N TA B I L I T Y The chatbot is the company. F E B RU ARY 202 4 · MOF FATT V. A IR C A NADA , B C TRIB UNAL The chatbot said a bereavement fare could be claimed after travel. The airline's policy said it could not. “While a chatbot has an interactive component, it is still just a part of Air Canada's website.” Liable The tribunal rejected the argument that the chatbot was a separate party A small award. A clear principle: you own what your agent says.
  40. 06 TRUST · EXCESSIVE AGENCY It was told not to.

    It could, so it did. JULY 2025 · AS REPORTED A coding agent erased a production database. 1,206 executives, 1,196+ companies. Day 9 of a 12-day trial. It had been told not to change anything without approval. Functionality read-only, not read-and-delete Permissions least privilege, in the user's context Autonomy rate each tool low, medium, high; humans for high An instruction is not a permission. Fix the access, not the prompt.
  41. CHAPTER 7 OF 7 · EVALS Week 4. Is it

    getting better? You have given it power. Before you give it more, you need a number. The loop Context Visibility Tools & models Control Trust Evals
  42. 0 7 E VA L S · C O N

    S I S T E N C Y It worked once. That is not a metric. pass@k pass^k At least one of k tries succeeds. Rises with k. Flatters a demo. All k tries succeed. Falls with k. What a customer feels. 75% 42% < 25% per-trial success pass^3: three in a row pass^8 in τ-bench retail looks shippable 0.75 × 0.75 × 0.75 GPT-4o, 2024 paper Run every task several times. Report the number a customer feels.
  43. 0 7 E VA L S · W H E

    R E T O S TA RT Start with twenty real failures. 1 Collect 20–50 tasks from real failures, bug reports and support tickets 2 Grade the outcome Is the record in the database? Not: did it say it booked. 3 Run several trials In a clean environment each time. Report pass^k. 4 Error analysis first Read traces: they tell you which evals to write 5 Graduate Passing capability evals become the regression suite at ~100%
  44. THE WHOLE STORY One agent. Seven safeguards. Follow one message

    through the system. Each box is a chapter you just saw. Message a user asks 05 02 → Control → Context lane, handoff, leash 01 → The loop a budget, not a log 04 → Tools stops by signature 03 Visibility record what the model saw at every step 06 Trust secrets out of its sight, never the full trifecta, least agency 07 Evals pass every time, graded on twenty real failures, before more autonomy and models: a decision table
  45. BEFORE YOU SHIP AN AGENT Seven questions. 01 The loop

    What stops it, and what happens on the third identical error? 02 Context What does turn 30 cost, and what gets pruned first? 03 Visibility Can I replay exactly what the model saw? 04 Tools & models For each failure, what evidence says a retry could help? 05 Control When does a human step in, and who owns each conversation? 06 Trust Which legs of the trifecta does this agent have? 07 Evals Does it pass every time, on twenty real failures?
  46. Boundaries, not bravado. Start with one bounded job. Make every

    decision traceable. Raju Mazumder · AI Engineering Lead, Deriv · Creator of Synkora X @rajumaz · LinkedIn in/rajuniit · github.com/getsynkora/synkora-ai

More Decks by Raju Mazumder

Other Decks in Technology