I'm Eranga, a hands-on lead engineer with 14+ years across agentic AI, sports trading and gaming with crypto, and payments. Most recently Applied AI Lead at Chaos Theory, designing Cloudbet's agentic platform. The harness engineering, the model pipelines, and the backend systems they stand on.
A note before the tour. Most of this work lives in private organisation GitHub and GitLab repositories, so the code is not visible.
Case 01 · Cloudbet
Applied AI Lead · architecture, harness engineering, model platform
Pulse is a live timeline where AI personas analyse markets, place play-fund bets and post about them, sport-specialist agents consult a shared news analyst, real players tail and copy the calls, and VIP concierge agents serve high-value customers privately. It started as one monolithic elizaOS agent and was re-architected into a scoped LangGraph fleet on Google Cloud. One loop (start → agent → tool → END) reused everywhere, with the trust model enforced in infrastructure rather than prompts.
The non-negotiables were backend decisions. Privilege separation. Only
the internal Bet Placement agent holds placeBetOnBehalfOf and
checkStakeLimits in its bindTools() array, persona, analyst
and VIP agents call it as a tool and can never touch the Betting Engine directly.
Human confirmation. Every player-funded bet pauses on LangGraph's
interrupt(), checkpointed in Postgres, so a confirmation survives a crash,
a deploy, or a VIP who replies four hours later. Load shape. A World
Cup final doesn't melt the engine because Cloud Tasks rate-limits dispatch at 50/s with
a circuit breaker in Redis shared across the fleet, and every placement carries an
idempotency key derived from the thread and tool call ids.


Fig. 1. Compute matched to traffic shape. GKE for the always-on persona fleet, Cloud Run for request-shaped player replies, Cloud Functions for thin webhook ingestion, Pub/Sub to decouple settlement bursts from the workers that process them.



interrupt() rendered as UI.pruneVolatile() drops stale balance/odds ToolMessagesrecursionLimit 15, token ceiling, wall-clock. The model is never trusted to stop itself.Fig. 2. Harness engineering. The model is a stateless, rented reasoning step inside a loop the platform owns. State, budgets, validation, identity and safety all live in code, a prompt rule is a suggestion, a code gate is a wall.
interrupt()Fig. 3. The routing economics. Fine-tuned 1–3B open-weight models handle the narrow high-volume steps (classification, scanning, routing, compaction) for latency, cost and data control. Frontier models are reserved for open-ended reasoning where a mistake is expensive.
Fig. 4. The agentic evaluation workflow. Probabilistic components get the same discipline as code. Versioned, tested in CI against a golden dataset, shipped through shadow and canary, and monitored for drift, with the feedback loop closing from incidents back into the eval suite.
Fig. 4b. The news fine-tunes in one flow. Evals make it shippable. A frozen golden set of 12k labelled tweets (including sarcasm, fan accounts and ambiguous "questionable" cases) scores per-field precision/recall, and the certainty ladder is calibrated against human labels, a tweet the classifier gets wrong becomes next release's golden case.



interrupt() gate is architecture, not policy.Case 02 · Cloudbet × elizaOS
Applied AI Lead · led the agentic transformation
Before the LangGraph fleet, this is where the agentic programme started. Turning an app-based sports trading product into one you can delegate to, built on elizaOS, the open-source TypeScript agent framework, and scaled to 4,000+ users engaging with agents betting real money under hard guardrails. It began as a hackathon prototype that took 1st place out of 30+ teams and became the production programme.
The runtime's contract is strict. Providers assemble context, markets, prices, bankroll, open positions, fresh each cycle. Actions are the only effects an agent can produce. Build a slip, place a bet within caps, publish a post. Evaluators score every cycle after the fact, bankroll discipline, strategy drift, and write to long-term memory so each agent's public track record stays honest. Open-weight models served from the Hugging Face Hub do the reasoning. Nothing reaches the trading APIs except through the same limits, risk checks and audit trail a human account gets. Running it at scale also exposed the monolith's ceiling, one flat action list, 30–50 tool schemas per call, no privilege boundary between analysis and execution, and those lessons became the design brief for the Pulse fleet above.


Fig. 5. Agents are powerful because they're constrained. The guardrail layer, not the model, is the design.
Case 03 · Cloudbet
Senior Fullstack Engineer → Tech Lead → Applied AI Lead · 2020–2026
Cloudbet trades thousands of live markets around the clock. I initiated the rewrite of the legacy main app and co-led it to delivery on a NestJS microservices stack on GKE, then led the realtime trading apps hands-on, integrating sports trading providers and keeping every open betslip honest against a feed that re-prices in milliseconds.
The backend is a classic read/write split under pressure. The read path, odds, flows from provider feeds through the pricing engine into Google Pub/Sub topics and out over websocket and SSE fan-out, with per-connection bounded buffers that coalesce to latest state so one slow client never backs up a hot stream. The write path, bet placement, is strict. The slip is re-priced server-side at submit, risk and max-stake limits come live from the risk engine, and placement is an idempotent transaction so a double-tap or a network retry can never double-bet. An auth + BFF layer gives each client one fast contract and hides the fan-out. Vercel adoption across the frontend catalog let a small team ship a large portfolio of apps with no dedicated DevOps.




Fig. 6. Reads are cached, replicated and coalesced. Writes are re-priced, risk-checked and idempotent. Every arrow carries a timeout, a retry policy and a metric.

Case 04 · Cloudbet
Tech Lead → Applied AI Lead · realtime gaming vertical
The gaming vertical aggregates studios like Hacksaw, Pragmatic Play and BGaming plus live-dealer floors alongside Cloudbet Originals. In-house provably-fair games. I led the realtime gaming apps hands-on. The personalised lobby, the game-launch session pipeline, and the live win feeds, and drove the move that mattered most operationally. game and studio ops became AI-first workflows, cutting ~70% of the operational workload.
The hard part of an aggregator is the contract surface. Every provider launch is a short-lived signed session token carrying wallet binding, geo and compliance rules. Every spin settles through the same debit/credit API against the central ledger, so a provider can never hold a balance of its own. Win events stream back through Google Pub/Sub into the lobby's live feeds and into the analytics pipeline that prices launch failures and provider reliability in dollars. The AI-first ops layer sits on top. Agents that release titles, tune categories and assemble tournaments against the catalog service, human-approved, fully audited.


Fig. 7. One wallet session follows the player from lobby to any provider's game and back. The ledger is the only place money exists.

Case 05 · Cloudbet
Tech Lead · with the Payments team
A betting platform is a wallet with opinions. Together with the Payments team I overhauled the crypto wallet and payments flow. 26+ currencies, instant on-chain deposits, wallet and exchange connections, and a single double-entry ledger that sports, gaming and promotions all settle against, no internal transfers, no provider-held balances.
Money paths are where classic backend discipline earns its keep. Deposits. Per-chain watchers follow confirmations, credit the ledger in a transaction that writes the balance change and an outbox event together, and survive reorgs by re-verifying before finality. Withdrawals. A request passes velocity rules and compliance checks inline, queues for review only when a rule trips, then goes to the signing service and is tracked to broadcast, every step idempotent, every state transition evented, with rejected attempts first-class citizens in the history. The player sees two honest doors, transfer crypto, or connect a wallet, and a transactions view that mirrors the chain's own states.





Fig. 8. The ledger is the product. Everything else is a door into it. Deposits reconcile from the chain in. Withdrawals are risk-gated, signed and tracked out, both paths evented through the outbox.
Case 06 · Founder build
Founder & engineer · unamy.ai
Unamy is a bespoke agentic conversational-commerce system for small and medium businesses. The boutique, the salon, the home baker whose entire storefront is a chat thread. Their catalog and every customer conversation live in one place, and an AI agent works beside them at exactly the level of trust they choose.
It's the same harness discipline as the trading floor, scaled to a two-person shop. The trust dial maps to tool scopes. In draft mode the agent holds no send-capable tools at all. In semi-auto it answers within a whitelisted intent set and hands over the rest. In full-auto it runs the conversation but orders, bookings and payments still pass a confirmation gate under the owner's rules. Each business onboards with its own catalog, voice and boundaries, context assembled per-tenant, memory scoped per-tenant, never shared.
@AI, picks full auto, and the agent reschedules the session end-to-end, labelled as AI the whole way.The three screens above are the product's own animated scenes, running live. They show the whole trust dial in order. The shared inbox where AI-handled threads sit beside human ones. The private AI lane where the agent reads the catalog and stock ("Lena wants the blue mug. You have 12 in stock."), drafts the reply with the product card attached, and waits for the owner's tap. And the full-auto handoff, where the owner picks how the agent should handle it, the chat switches to an "AI has this chat" bar, and every message the agent sends is labelled AI to the customer.
Fig. 9. The trust dial is a tool-scope dial. Autonomy is granted by what the agent can call, not what it's asked to do.
@AI.