Hanako's banner
Hanako's profile picture

Hanako

@hanakoxbt17,805 subscribers

Building my name | ai researcher | dm open

Shorts

there are four types of agent loops. most people only know one. loop engineering is a choice between four structures, each handing off one more job than the last. every one answers two questions: what starts a run, and what ends it. hand-run, you answer both yourself, every time. 1) turn-based → you prompt, it acts, you review, you prompt again. both jobs stay with you. use when requirements are still forming. 2) goal-based → "/goal hit Lighthouse 90, stop after 5 tries." an evaluator checks, a no sends it back. use when the outcome is measurable but the path isn't. 3) time-based → a clock fires, it runs "check the PR, fix CI," then waits. /loop local, /schedule survives a closed laptop. use for recurring work. 4) proactive → no human present. it watches a channel, spawns triage, fix, and a reviewer, closes the task itself. use for standing duties you can't predict. not which one is most advanced. whether your task is exploratory, measurable, recurring, or standing. the more you hand off, the less you babysit. full breakdown in the article below.

there are four types of agent loops. most people only know one. loop engineering is a choice between four structures, each handing off one more job than the last. every one answers two questions: what starts a run, and what ends it. hand-run, you answer both yourself, every time. 1) turn-based → you prompt, it acts, you review, you prompt again. both jobs stay with you. use when requirements are still forming. 2) goal-based → "/goal hit Lighthouse 90, stop after 5 tries." an evaluator checks, a no sends it back. use when the outcome is measurable but the path isn't. 3) time-based → a clock fires, it runs "check the PR, fix CI," then waits. /loop local, /schedule survives a closed laptop. use for recurring work. 4) proactive → no human present. it watches a channel, spawns triage, fix, and a reviewer, closes the task itself. use for standing duties you can't predict. not which one is most advanced. whether your task is exploratory, measurable, recurring, or standing. the more you hand off, the less you babysit. full breakdown in the article below.

477,713 次观看

an agent is four parts in a loop. you own one. the other three break it. that's why the demo works and prod doesn't. you can't debug what you can't see. 1) the prompt → what you tell the model each turn. you own this one. good. 2) the context window → what it sees right now. the framework fills it with junk, and you never notice until it rots. 3) the tools → what it can do. you own the list, not when or why it fires them. 4) the control flow → what happens next, when to stop. the framework owns this. it's what breaks at 80%. own all four and your agent stops being a magic trick that works on stage and dies on call. this isn't my idea. it's the 12-factor agents guide (24k stars) github: the whole thing every serious builder ends up rewriting their stack around. full breakdown in the article below.

an agent is four parts in a loop. you own one. the other three break it. that's why the demo works and prod doesn't. you can't debug what you can't see. 1) the prompt → what you tell the model each turn. you own this one. good. 2) the context window → what it sees right now. the framework fills it with junk, and you never notice until it rots. 3) the tools → what it can do. you own the list, not when or why it fires them. 4) the control flow → what happens next, when to stop. the framework owns this. it's what breaks at 80%. own all four and your agent stops being a magic trick that works on stage and dies on call. this isn't my idea. it's the 12-factor agents guide (24k stars) github: the whole thing every serious builder ends up rewriting their stack around. full breakdown in the article below.

38,184 次观看

Videos

hanakoxbt's profile picture

LLMs vs. Jev, clearly explained! LLMs are great, and the ceiling is one you can watch scroll past: an LLM writes the answer one token at a time. give it a failed deploy and four decisions, and it produces a small JSON object where every token depends on the one before it. token nine cannot exist until token eight does, so four decisions that had nothing to do with each other just stood in a queue. then your code parses it, validates the shape, and retries when the shape is wrong. Jev fixes this without being a smaller or faster model: it removes the order. one turn on that deploy has to know: → whether the incident is urgent → which team owns it → whether the next command is risky → whether the task is actually done you declare the questions and the answer type upfront, and all four come back together, typed, with a probability on each. three primitives cover almost every fork in an agent: 1. **Choice** picks one of up to 255 options you define, like engineering, billing or sales. 2. **Score** places the state on an ordered scale you define, like low, medium or high risk. 3. **Noul** returns the probability that a yes-or-no condition is true. here is the sentence that resolves the whole confusion: text is a line you have to walk. an answer space is a room you see all of at once. ↳ generation: one order you cannot change, one string at the end, a shape you hope holds ↳ evaluation: no order at all, typed answers, a probability on every option Prompts → Agents → Loops → Graphs → Jev the probabilities matter more than the answer. ↳ engineering at 0.91 against billing at 0.09 is a route you can automate ↳ 0.52 against 0.46 is a coin flip wearing a label, and the label alone never told you which one you got that last one catches careful people. an LLM would have said "engineering" in a confident sentence and given you no way to know the race was that close. thresholds live in your code, one per action, scaled to what being wrong costs. it works when the options are known and the call depends on meaning. it is not for writing, code, arithmetic, or anything where question two needs the answer to question one. and the one that eats whole nights: type safety prevents malformed output, not incorrect judgment. Jev cannot return an option outside your schema, and it can still pick the wrong valid one with confidence. a schema-valid mistake refunds the wrong customer just as fast. an LLM writes new language when the answer space is open. Jev evaluates known paths when the answer space is closed. below i have quoted my full breakdown on Jev. it covers the three primitives, the parallel battery, the thresholds, and where it does not belong. save this and read it below ↓

Hanako

42,632 次观看 • 2 天前

hanakoxbt's profile picture

a Citadel intern told me something at a party he probably shouldn't have it was on a rooftop in brooklyn. i mentioned i trade prediction markets. he got quiet for a second. "we have a model for that. it scores every contract on four factors. when all four align we enter. when any breaks we exit. that's it" i asked what the four factors are. he looked around. then said it fast like he was confessing. "cross-market divergence. disposition coefficient. capital velocity. pair network correlation" I didn't know what half of that meant. but i memorized it. went home. 11pm. opened Claude. "here are four scoring factors from a quant fund. build a terminal that runs all four on prediction markets" Claude asked one question: "Where's the data?" I sent him one repo: 86 million trades. every wallet. every entry. every outcome three weeks later i'm sitting in my apartment watching a screen i barely understand print money. the disposition meter alone changed everything. it measures how you exit - not how you enter. top wallets capture 86% of winner value and cut losers at 12%. everyone else captures 58% and holds losers to 41%. same exact entries. the exits make it a completely different game. capital velocity: 49x. every dollar gets recycled 49 times before the average trader recycles once. the terminal found 42 pair correlations across 11 markets. when MSFT beats Q3 is priced at 80c but the model reads 93% - it enters. when the gap closes 2 hours later - it exits. no opinions. no news. just four numbers that either align or don't. his fund runs this with a floor of PhDs and $800M AUM. my setup: > Claude - $20/month > VPS - $5/month > poly_data repo - free > Polymarket API - free $25/month. no team. no office. no Bloomberg. 280 trades so far. 70% win rate. $800 seed. four bots splitting the work: pulse_alpha +$299. arb_hunter +$558. trend_rider +$337. cal_engine +$719. +$11,514 total. copytrade here: he texted me last week. "delete everything i told you" too late.

Hanako

1,741,749 次观看 • 5 个月前

hanakoxbt's profile picture

Loops vs. Graphs, clearly explained! loops are great, and they have a ceiling you can watch happen: a loop goes around. it produces, checks, corrects, and goes around again. after six passes you have one job, done very well. after six hundred passes you still have one job, done very well. Graph engineering fixes this by moving the decision up a layer: not how well one job gets done, but which jobs exist to be done at all. you need both, and here is the sentence that resolves the whole confusion: the loop lives inside a node. the graph lives between them. ↳ inside one unit: produce, check, correct, repeat until green ↳ between units: split, fan out, merge, gate, send back Prompts → Context → Harness → Loops → Graphs the loop does not go away when you build a graph. it moves inside, and now there are three of them running at once on three things you would never have thought to run. the trick is being selective about what becomes a node. only spend a model where judgment lives. merging, ranking, deduping and schema checks are edges, and edges are code. free, instant, and they cannot be argued out of a verdict. one thing to know before you scale it. a loop that cannot fail is not a loop, it is a repeat with a bill attached. and the check people write is almost always the wrong kind. ↳ the test suite exits 0 is a check. the diff touches only the files in the plan is a check ↳ the output looks good, the model says it is confident, no errors were raised, none of those are checks that last one catches careful people. absence of an error is not evidence of correctness, and a loop built on it will confidently repeat a mistake until the budget runs out, with a clean log the whole way. and the one that eats whole nights: when a unit fails, return that unit, not the batch. send back four slices because one failed and you have just rewritten three correct ones. do it twice in a run and the run never converges. below i have quoted my full guide on graph engineering. it covers the three topologies, the verifier patterns, and where the gate should actually open. save this and read it below ↓

Hanako

128,054 次观看 • 17 天前

hanakoxbt's profile picture

Orchestrators vs. Graphs, clearly explained! orchestrators are great, and everyone builds one first. here is the ceiling: an orchestrator sits above the work and routes every message. five agents report to it. it reads all five. it decides what each one does next, and reads all five replies. that is ten trips through one context, and by the fifth agent that context has read four reports, five instructions and its own reasoning about all of them. Graph engineering fixes this by removing the seat: not a better router, but no router at all. you need both, and here is the sentence that resolves the whole confusion: an orchestrator sits above the work and holds all of it. a graph is the shape of the work, and holds none of it. ↳ above the work: one context that has to see everything before anything ships ↳ inside the work: a splitter that hands out and lets go, and a merge that reads nothing Prompts → Context → Harness → Loops → Graphs the coordination did not disappear. it moved into the edges, where it costs nothing and cannot get tired. the trick is noticing what you actually built. if one node has to see every result before the run can finish, you did not remove the bottleneck. you hired it, gave it the longest context in the system, and made it the thing you were counting on to stay sharp. one thing to know before you scale it. an orchestrator degrades in the one way nothing catches. ↳ it does not crash, time out or return an error. it stays up and keeps routing ↳ it just starts routing worse, somewhere around the fifth report, and every downstream agent does exactly what it was told that last one catches careful people. you can have perfect isolation on every worker and still have one window quietly drifting at the top, and the traces will all look clean because each worker did its job. and the one that eats whole nights: the merge is where this shows up first. ranking five findings is not judgment, it is a sort. if a model is doing it, you are paying a model to read five reports so it can put them in an order that three lines of code would have got right, and now that model has read everything too. below i have quoted my full guide on graph engineering. it covers the three topologies, the verifier patterns, and where the gate should actually open. save this and read it below ↓

Hanako

43,781 次观看 • 8 天前

hanakoxbt's profile picture

Loops vs. Graphs, clearly explained! loops are great, and the ceiling is one you can watch turn: a loop is a gear. it produces, checks, corrects, and comes back around. after six turns you have one job, done very well. after six hundred turns you still have one job, done very well. the teeth are perfect. they are touching nothing. Graph engineering fixes this by moving the decision up a layer: not how well one gear turns, but what it is meshed into. you need both, and here is the sentence that resolves the whole confusion: the loop lives inside a node. the graph lives between them. ↳ inside one unit: produce, check, correct, repeat until green ↳ between units: split, fan out, merge, gate, send back Prompts → Context → Harness → Loops → Graphs the loop does not go away when you build a graph. it moves inside, and now there are three of them turning at once on three things you would never have thought to run. the trick is being selective about what becomes a node. only spend a model where judgment lives. merging, ranking, deduping and schema checks are edges, and edges are code. free, instant, and they cannot be argued out of a verdict. one thing to know before you scale it. a loop that cannot fail is not a loop, it is a repeat with a bill attached. ↳ the test suite exits 0 is a check. the diff touches only the files in the plan is a check ↳ the output looks good, the model says it is confident, no errors were raised, none of those are checks that last one catches careful people. absence of an error is not evidence of correctness, and a loop built on it will confidently repeat a mistake until the budget runs out, with a clean log the whole way. and the one that eats whole nights: when a unit fails, return that unit, not the batch. send back four slices because one failed and you have just rewritten three correct ones. do it twice in a run and the run never converges. below i have quoted my full guide on graph engineering. it covers the three topologies, the verifier patterns, and where the gate should actually open. save this and read it below ↓

Hanako

31,867 次观看 • 6 天前

hanakoxbt's profile picture

Harness vs. Graphs, clearly explained! a harness is great, and most people think it is the whole thing: retries, timeouts, a sandbox, a log, the context it assembles before every call. all of that is real work, and all of it wraps exactly one call. run it a hundred times and you have one call, made very safely, a hundred times. Graph engineering fixes this by moving the decision up a layer: not how safely one call is made, but which calls exist to be made at all. you need both, and here is the sentence that resolves the whole confusion: the harness is everything around one call. the graph is everything between them. ↳ around one call: retry, timeout, sandbox, log, assemble the context, hand back a result ↳ between calls: split, fan out, merge, gate, send back Prompts → Context → Harness → Loops → Graphs the harness does not go away when you build a graph. it moves under each node, and now there are five of them, each wrapping a call you would never have made by hand. the trick is knowing which layer a failure belongs to. turn a piece off and run it again. if the call still works, it was the harness. if the wrong step runs at all, it was the graph. people spend weeks hardening a harness around a node that should not have existed. one thing to know before you scale it. most of what people call their agent is a harness with a chat box on it. ↳ it retries, it times out, it logs, it assembles context, it holds one call up beautifully ↳ it has never once decided that a second call should exist, and that is the entire difference that last one catches careful people. a harness that never fails is not evidence the system is right. it is evidence one call went well, which is the smallest possible claim. and the one that eats whole nights: a harness cannot save you from the wrong step running. you can retry a bad decision three times with a clean log and perfect isolation, and all you bought was three copies of it. below i have quoted my full guide on graph engineering. it covers the three topologies, the verifier patterns, and where the gate should actually open. save this and read it below ↓

Hanako

50,770 次观看 • 11 天前

hanakoxbt's profile picture

Agents vs. Graphs, clearly explained! spawning more agents is great, but it has a ceiling nobody says out loud: five agents is a count. a graph is a shape. only one of them changes the answer. point five agents at the same pile with the same window and they converge. the first one writes a finding, the rest read it, and all five reports centre on the same thing. you paid five times for one opinion with four echoes. Graph engineering fixes this by moving the decision up a layer: not how many agents, but who is allowed to look at what. you need both. here's how it works: ↳ the count buys you throughput. five things happening instead of one ↳ the shape buys you coverage. five different things happening instead of the same one five times Prompts → Context → Harness → Agents → Graphs the node that does this is the splitter, and it decides more than any other node in the system. cut a repository by folder and four workers audit the same three files. cut it by blast radius and each one sees something the others cannot. the trick is being selective about what each lane is allowed to see. separate contexts are not a nice-to-have, they are the mechanism. if two agents are meant to produce different things, they must not share a window. if they are meant to produce the same thing, you did not need two agents. one thing to know before you scale it. a branch that throws does not reject the batch. it resolves to null, and that is the containment. which means your merge quietly receives a short list. ↳ filter the nulls before the merge, or one dead lane poisons the whole result ↳ never index a merge by position. eight good branches and one failure will shift everything by one, silently skip that and the run looks like it worked. the output is just missing a lane, and nothing errored. and the one that eats whole nights: multi-agent setups can use up to fifteen times the total tokens of a single chat, because every lane reloads its own core. you are trading total tokens for a clean main window. usually the right trade, always a choice. below i have quoted my full guide on graph engineering. it covers the three topologies, the verifier patterns, and where the gate should actually open. save this and read it below ↓

Hanako

96,967 次观看 • 1 个月前

hanakoxbt's profile picture

Memory vs. Graphs, clearly explained! memory is great, and the ceiling arrives quietly: it stores what happened. it does not store what to do about it. six runs later your file has fifty lines, and the model reloads all of them before it does anything. Graph engineering fixes this by changing what memory is: not a place things are kept, but an edge that runs backwards. you need both, and here is the sentence that resolves the whole confusion: a store keeps what happened. an edge keeps what to do about it. ↳ a store grows with every run, and every line is reloaded before the next one ↳ an edge carries one derived rule, and the rule replaces the run that produced it Prompts → Context → Harness → Loops → Graphs the transcript goes away, the constraint stays. and the constraint is smaller, because "adapters preserve keyword args exactly" is four hundred tokens shorter than the run that proved it. the same four blocks work on anything you can cut into lanes. i pointed them at token launches on Robinhood Chain, open source, nothing leaves your terminal the trick is knowing what deserves to survive. an output is not memory. "ported the utils slice, green on first pass" tells the next run nothing it can act on. the rule you derived from it does. one thing to know before you scale it. what you write down is not what comes back. ↳ the root rules file and auto memory are re-injected from disk. they come back intact, every time ↳ path-scoped rules live in message history. they get summarized away and do not return until a matching file is read again so a rule that must persist cannot be path-scoped. move it to the root and pay the always-loaded cost, or accept that it is advisory in any long session. and the one that eats whole nights: a memory file that has never had a line deleted is not memory. it is a tax on every run you will ever make, and nobody reads it back. below i have quoted my full guide on graph engineering. it covers the three topologies, the verifier patterns, and where the gate should actually open. save this, and the repo that runs it is below ↓

Hanako

47,766 次观看 • 16 天前

hanakoxbt's profile picture

your agent loop needs 8 exits. most people ship only one. (explained with triggers) 1) goal met → an evaluator scores the output against a rubric, and the run stops on a pass. → fires when the work is measurably done, not when the model says it is done. 2) turn cap → a hard ceiling on iterations, counted and enforced by the harness, not the prompt. → fires on the task it was never going to finish, before you pay to find that out. 3) budget cap → a limit on tokens or dollars, whichever one runs out first. → fires mid-run, which is exactly why it is the exit that saves you the 3am bill. 4) wall clock → a deadline on elapsed time, independent of how much progress was made. → fires when the run collides with a deploy window or the start of business hours. 5) no progress → hash the state every turn and compare it against the last few. → fires when three turns in a row change nothing. busy is not the same as moving. 6) human interrupt → an approval gate before risky steps, plus a kill switch that lives outside the loop. → fires whenever you decide, and it is the one exit the model cannot argue with. 7) error threshold → a counter of consecutive failures that resets on any success. → fires at n in a row, so it halts instead of retrying into the same wall all night. 8) external event → a webhook or a poll on whatever the task was actually about. → fires when the PR merged or the ticket closed and the work stopped mattering. a loop with one exit hangs. a loop with eight is a system. write the exits before you write the prompt.

Hanako

182,139 次观看 • 2 个月前

hanakoxbt's profile picture

an ex-Citadel quant told me a salary is a short position on your own time we were at a dinner in new york. friend of a friend. he asked what i do. "software engineer. $4,200 a month" he said one simple thing "you're mass-selling the most valuable asset you have. your hours. at a fixed price. with no upside. that's a short position on your own life" i didn't have a response. then he showed me his phone. a terminal. live trades. +$39,453 running for 6 weeks. "i built this with Claude Opus 4.7 and one open source dataset. took a weekend. haven't touched it since" i asked how. "gave Opus one repo and one prompt. find who wins on prediction markets. find why. copy their edge" 2,900 stars. 36GB. every trade on Polymarket and Kalshi. every wallet. every resolution. Opus read the whole dataset friday night. by sunday it had a live terminal scanning 1,400 markets per hour. 8 detectors running in parallel. entering when void score exceeds 90. exiting when it drops below 75. no human override. > Senate filibuster. locked at 42c. now 98c. +$1,133. > Neuralink approval. entered 52c. now 98c. +$1,396. > Fed 0% rate. entered 35c. now 97c. +$1,147. > BTC 250K. entered 8c. now 98c. +$1,258. > Megaquake. entered 6c. now 97c. +$1,039. the part that broke something in me: latency arbitrage. Polymarket updates in 19ms. Kalshi in 63ms. the bot trades the 44ms gap between them. automatically. every time. "we had four people at Citadel doing what your bot does with latency alone" copy mirror tracking 6 positions: > Senate fili +$1,252. void signal. 10%. > BTC 250K +$958. zero signal. 2%. > Neuralink +$1,384. sign signal. 9%. > Fed 0% +$863. fill signal. 8%. > Megaquake +$1,070. bridge signal. 18%. > META AI +$979. gas signal. 5%. 972 trades. 83% win rate. kelly f+ 0.101. avg profit $10.65. drawdown -1.4%. maker rebate tracker collecting $203 across four platforms while the bot trades. Polymarket +$114. Kalshi +$40. dYdX +$28. Betfair +$21. $1,800 seed. +$39,453. i quit the next morning. one email. "i'm done. thank you for everything." copytrade setup: texted him a week later. "you ruined a perfectly stable career" he replied "no. i closed your short position"

Hanako

379,758 次观看 • 5 个月前

hanakoxbt's profile picture

10 agent evals for AI engineers: (explained with usage) 1) golden set → a fixed set of cases you never edit, run on every single change. → use as the baseline that tells you whether anything moved at all. 2) llm as judge → a second model scores the output against a written rubric. → use when the answer is open-ended and there is no string to match against. 3) rubric scoring → one number per dimension: correctness, tone, safety, cost. → use when a single score hides which part actually got worse. 4) trajectory eval → grade the path the agent took, not only the answer it landed on. → use when the right answer for the wrong reason is going to bite you later. 5) tool unit tests → test each tool on its own, with fixtures, no model in the loop. → use always. most agent bugs are tool bugs wearing a costume. 6) regression suite → replay past runs against the new prompt or model and diff the results. → use before every prompt change, because prompts have no type system. 7) a/b in prod → split live traffic between two versions and compare outcomes, not vibes. → use when offline scores stopped predicting what users actually do. 8) human review → sample a slice of runs and have a person grade them honestly. → use to calibrate your judge, because a judge nobody checks quietly drifts. 9) shadow run → the candidate runs on real traffic in parallel and its output is shown to nobody. → use before a risky rollout, when one bad answer would be expensive. 10) red team → deliberately attack it: jailbreaks, injection, exfil, tool abuse. → use before anyone external can reach it, not after. offline evals tell you it works. online evals tell you it still works. both sides matter, but not all ten do. run the two that would have caught your last outage. save this. then read the full breakdown on loop engineering below.

Hanako

151,536 次观看 • 2 个月前