Series · 8 parts · 67 min
Inside āagman
From July 2025 to April 2026 I was Founding Software Engineer at KotiLabs, leading a team of three and owning āagman's backend end to end. These eight posts follow one request through the system, from a sentence to a broker order, in enough detail to follow the design. Part 1 is the map; each later part goes one level down.
- 8parts
- 5worker agents
- 4risk gates
- 90%+LLM calls avoided
- 10×screener throughput
The map
The constraints, the services and one request traced end to end.
From sentence to strategy
The typed language the model writes, and the agents that write it.
- 02 A strategy language the model can’t escape The JSON DSL at the center of āagman: why the LLM’s only output is a typed strategy document, what the grammar covers, how the compiler turns it into an execution plan, and where the design stops protecting you.
- 03 The agent desk: routing, worker agents and memory How āagman turns a sentence into a typed strategy: an intent classifier, one orchestrator with a supervisor tool, five stateless worker agents, a staged workflow with a clarifying loop, two layers of memory, and the distilled router and semantic cache that avoid most expensive calls.
Data and evidence
A reproducible backtester, the market-data platform and the filings pipeline.
- 04 A backtester you can put a golden test on How āagman’s backtesting engine works: a pinned VectorBT core in a sandbox, next-bar fills, intrabar stop rules, golden tests on frozen data, and an honest list of what the first version leaves out.
- 05 Market data and a 500-symbol screener The data platform under āagman: Yahoo Finance and Alpha Vantage ingestion with Prefect, ClickHouse and Postgres storage, a Parquet export for the sandboxed backtester, and a batched, vectorized screener that scans 500+ instruments.
- 06 Cheap first: the NSE announcements pipeline The announcements pipeline behind āagman’s research agent: ingest, extract text, extract fields with rules first and a capped LLM fallback, and classify into 13 categories, with idempotent stages, a dead-letter queue and a windowed backfill.
Moving money
Four gates before the broker, and orders sent from the user's own machine.
- 07 Four gates before the broker The pre-trade controls for āagman: a kill switch, a daily loss cap, circuit breakers and a margin check, decided by a policy engine from inputs the model can’t touch, plus the readiness gate, the plan-bound approval and the failure matrix.
- 08 Execution from the user’s own machine The last mile of āagman: a Manifest V3 Chrome extension that drives the user’s own logged-in broker session, how signed execution requests reach it, the order types and brokers it supports, and how fills are reconciled.
If you read three, read these
The language, the backtester and the execution path. Together they show how the desk stays safe.