Agent platform
0-day streakReview

Your progress

Level 1

0 XP100 XP to level 2
0day streak
0best streak
0topics started
0cards reviewed
    Review cards

    Progress is stored only in this browser. No account is required.

    Design an AI agent platform: the 60-second story

    Design an AI agent platform

    It finds the duplicate charge, raises a dispute, then asks before refunding ₹12,499.

    An agent loops through model and tool calls for seconds or hours, with real permissions.

    600K

    input tokens for one 25-step run

    Every call re-sends the history, say a 6,000-token prefix plus 1,500 tokens a step. Double to 50 steps and it’s 2.14M, 3.6×.

    Where does the loop run?

    Bad: In the web request

    A deploy kills it halfway; a restart refunds the customer twice.

    Good: A durable workflow

    Each model and tool call is recorded. A crash means replay, not restart.

    A worker dies after the dispute is raised. What runs again?

    Nothing that finished. A new worker replays the loop against the event history, getting recorded results back. Only model call 3 runs again.

    A refund over ₹10,000 waits for a supervisor. At peak, about 1,250 runs are waiting.

    The trick

    Each sleeps on a signal and a 24-hour timer, holding no worker. Waiting costs a row; silence is “no”.

    A ticket’s text tells the agent to email card numbers to evil.example.

    Assume the model is fooled. The policy check, in code outside it, sees a tainted run and denies external email.

    Controls live outside the model

    1. Credentials join after the model writes a call
    2. Tokens never exceed the user’s own rights
    3. Tainted runs need a human to send out
    4. Code runs in throwaway microVMs, behind egress allowlists

    No caching, a 25-step run costs ≈ ₹112 (Claude Sonnet 5, October 2026 prices).

    The trick

    Keep instructions and tools first and identical. Each token is written once, then read at a tenth. ≈ ₹26, 77% less.

    Remember

    Each run is a durable workflow, so a crash means replay. Tool calls pass checks outside the model. A stable prefix tames the cost.