• bitcoinBitcoin(BTC)$77,227.000.16%
  • ethereumEthereum(ETH)$2,511.082.11%
  • tetherTether(USDT)$1.000.02%
  • binancecoinBNB(BNB)$734.022.57%
  • rippleXRP(XRP)$1.361.09%
  • usd-coinUSDC(USDC)$1.00-0.03%
  • solanaSolana(SOL)$101.561.88%
  • tronTRON(TRX)$0.3407330.50%
  • Figure HelocFigure Heloc(FIGR_HELOC)$1.03-0.34%
  • zcashZcash(ZEC)$1,131.104.07%
  • HyperliquidHyperliquid(HYPE)$78.65-1.25%
  • dogecoinDogecoin(DOGE)$0.0843490.36%
  • RainRain(RAIN)$0.015209-3.21%
  • moneroMonero(XMR)$534.983.91%
  • USDSUSDS(USDS)$1.000.00%
  • whitebitWhiteBIT Coin(WBT)$80.140.42%
  • chainlinkChainlink(LINK)$11.51-0.27%
  • leo-tokenLEO Token(LEO)$9.130.36%
  • cardanoCardano(ADA)$0.207723-1.05%
  • stellarStellar(XLM)$0.1798742.10%
  • bitcoin-cashBitcoin Cash(BCH)$229.670.70%
  • Ethena USDeEthena USDe(USDE)$1.000.04%
  • daiDai(DAI)$1.00-0.02%
  • USD1USD1(USD1)$1.000.03%
  • litecoinLitecoin(LTC)$53.781.74%
  • CantonCanton(CC)$0.098421-0.23%
  • uniswapUniswap(UNI)$6.180.18%
  • the-open-networkGram (prev. Toncoin)(GRAM)$1.360.32%
  • Global DollarGlobal Dollar(USDG)$1.00-0.01%
  • avalanche-2Avalanche(AVAX)$7.45-0.89%
  • hedera-hashgraphHedera(HBAR)$0.074334-1.69%
  • shiba-inuShiba Inu(SHIB)$0.0000052.39%
  • nearNEAR Protocol(NEAR)$2.34-4.76%
  • suiSui(SUI)$0.72-2.44%
  • paypal-usdPayPal USD(PYUSD)$1.000.00%
  • crypto-com-chainCronos(CRO)$0.0573971.47%
  • BlackRock USD Institutional Digital Liquidity FundBlackRock USD Institutional Digital Liquidity Fund(BUIDL)$1.000.00%
  • MemeCoreMemeCore(M)$1.202.68%
  • tether-goldTether Gold(XAUT)$4,349.160.27%
  • Circle USYCCircle USYC(USYC)$1.140.03%
  • Ripple USDRipple USD(RLUSD)$1.000.00%
  • okbOKB(OKB)$114.104.23%
  • BittensorBittensor(TAO)$233.25-1.62%
  • Ondo US Dollar YieldOndo US Dollar Yield(USDY)$1.14-0.19%
  • aaveAave(AAVE)$125.191.77%
  • mantleMantle(MNT)$0.580.80%
  • pax-goldPAX Gold(PAXG)$4,355.120.25%
  • AsterAster(ASTER)$0.69-3.65%
  • polkadotPolkadot(DOT)$1.05-8.80%
  • World Liberty FinancialWorld Liberty Financial(WLFI)$0.055020-1.78%
TradePoint.io
  • Main
  • AI & Technology
  • Stock Charts
  • Market & News
  • Business
  • Finance Tips
  • Trade Tube
  • Blog
  • Shop
No Result
View All Result
TradePoint.io
No Result
View All Result

Decoding AI’s Open-Source Course Maps Three Ways to Run an Agent Loop and the Provider Economics Behind Each

August 22, 2026
in AI & Technology
Reading Time: 19 mins read
A A
Decoding AI’s Open-Source Course Maps Three Ways to Run an Agent Loop and the Provider Economics Behind Each
ShareShareShareShareShare

Most teams treat ‘which model’ as the important decision. The harness engineering literature keeps pointing somewhere else. In LangChain’s Terminal-Bench experiment, changing only the harness—same model throughout—moved a coding agent from roughly 30th place into the top 5.

That result reframes the question. If the harness decides quality, then how you run the loop becomes an architecture decision, not a deployment detail. Paul Iusztin’s open-source course Building a Coding Agent From Scratch builds a Python agent called Decode. Published through Decoding AI, it separates three run modes. Each mode has a different latency profile. Each one therefore wants a different inference provider.

YOU MAY ALSO LIKE

Apple Kicks Off Ternus Era with First Foldable Phone | Bloomberg Tech 9/09/2026

Apple Debuts Foldable iPhone Duo in Biggest-Ever Device Revamp

One headless core, three shapes

The center of the system is a headless harness with no interface of its own. Inside it runs the agent loop every harness shares: the LLM picks an action, a tool executes, the observation feeds back. Everything reads from and writes to the context window.

The agent itself is small. In Decode it is a ~20-line Pydantic AI definition composing a model, tools, and an output type. In Claude Code’s leaked source, the core loop is roughly 150 lines. Everything else—memory, skills, sandbox, permissions, LSP feedback, compaction—is harness.

Interfaces then plug into that core. That is where the three modes appear:

Mode 1: Interactive, online

A terminal UI is wired to one live session, in memory, in the same process. Events stream back through async generators as tokens arrive.

The hard problem here is steering. If you type while a tool call is in flight, injecting the message immediately corrupts the turn. Decode’s answer is a steering queue plus a priority gate. Input is buffered on arrival and injected only at a safe boundary. The loop exposes two: MODEL_REQUEST, before the next model call, and WOULD_STOP, when the turn would end.

Three input modes map onto that. Plain Enter steers within the turn. Alt+Enter queues a follow-up until the turn stops. Esc triggers a cooperative abort at the next boundary, clearing both queues so history stays intact.

A human is reading every token. This mode is latency-bound, which is why it belongs on a low-latency hosted API.

Mode 2: Remote, offline

Remote mode keeps the harness headless and runs it on a server through an agent runtime. Decode uses Kitaru, ZenML’s agent runtime, deployed to GCP, with the agents themselves executing on Modal.

Nobody is watching. A backlog of tickets fans out to N harnesses in parallel, each producing its own PR. Because the runtime records progress step by step, a sandbox that dies mid-task resumes from its last recorded step instead of restarting. A run that pauses for human input freezes and consumes no compute while it waits.

Tools execute inside Modal Sandboxes remotely, Docker locally. The metric that matters is throughput per dollar, not time-to-first-token.

Mode 3: Async, online

The third shape sits between the two. A live session hands work to a job queue and returns immediately. Background workflows fan out LLM calls and post results back later.

The user is online but not watching each step. The queue owns the work, so the run outlives the client that started it. This is the pattern behind Slack-triggered agents and background PR review, and it bills like batch, not like chat.

The interactive explainer

Why the provider changes with the mode

The cost model follows the latency requirement, and the gap is large.

Take 1,000 documents at 30,000 input tokens each, roughly 500 output tokens per document. At frontier API rates of $3 per million input and $15 per million output, the lesson’s arithmetic lands near $97. Prompt caching does not rescue it, because every document is a different prefix. Batched on a serverless GPU at around 3,000 tokens per second, the same work is under three hours of GPU time—roughly $13.

The reverse case is just as sharp. Decode’s default test model, Qwen3.6 35B, runs on a single H200. Modal’s published pricing lists H200 SXM at $0.001261 per second, or about $4.54 per hour. Leave an interactive agent idle overnight waiting on a y confirmation, and ten idle hours add roughly $45 to the bill.

That is the whole argument. Interactive work pays per token because a human is waiting. Offline and async work pays per GPU-hour because throughput is the objective and idle time is the enemy.

There is a second axis: serverless versus reserved capacity. Modal’s pricing analysis reduces it to one comparison. Reservations charge the peak rate for the whole contract; serverless follows the demand curve. When the peak-to-average ratio exceeds the reservation discount, serverless is cheaper. Modal reports typical discounts of 2–5× against peak-to-average ratios of 5–10× for inference, training, and agentic development. Industry surveys it cites put reservation utilization below 30%, often under 10%.

Key Takeaways

  • Harness beats model: swapping only the harness moved an agent from ~30th to top 5 on Terminal-Bench.
  • Interactive mode is latency-bound and steers via a queue draining at MODEL_REQUEST and WOULD_STOP boundaries.
  • Remote and async modes are throughput-bound, so GPU-hour billing beats per-token billing at volume.
  • 1,000 documents cost ~$97 on frontier API rates versus ~$13 of batched GPU time.
  • Serverless wins whenever peak-to-average demand exceeds the reservation discount, typically 5–10× against 2–5×.

Sources:


Michal Sutter is a data science professional with a Master of Science in Data Science from the University of Padova. With a solid foundation in statistical analysis, machine learning, and data engineering, Michal excels at transforming complex datasets into actionable insights.

Credit: Source link

ShareTweetSendSharePin

Related Posts

Apple Kicks Off Ternus Era with First Foldable Phone | Bloomberg Tech 9/09/2026
AI & Technology

Apple Kicks Off Ternus Era with First Foldable Phone | Bloomberg Tech 9/09/2026

September 12, 2026
Apple Debuts Foldable iPhone Duo in Biggest-Ever Device Revamp
AI & Technology

Apple Debuts Foldable iPhone Duo in Biggest-Ever Device Revamp

September 12, 2026
How India Is Training The Robots Of The Future
AI & Technology

How India Is Training The Robots Of The Future

September 12, 2026
Apple’s Foldable iPhone Duo Is Here, What We Know
AI & Technology

Apple’s Foldable iPhone Duo Is Here, What We Know

September 12, 2026
Next Post
Nvidia: It's All About SpaceX Now

Nvidia: It's All About SpaceX Now

Leave a Reply Cancel reply

Your email address will not be published. Required fields are marked *

Search

No Result
View All Result
Firefighters battle Spain’s biggest wildfire of 2026

Firefighters battle Spain’s biggest wildfire of 2026

September 7, 2026
Lane Kiffin's LSU era begins with easy victory over Clemson – ESPN

Lane Kiffin's LSU era begins with easy victory over Clemson – ESPN

September 6, 2026
Mom horrified after Meta AI starts asking about her young daughters, where family lives — and allegedly digs up years-old deleted photo

Mom horrified after Meta AI starts asking about her young daughters, where family lives — and allegedly digs up years-old deleted photo

September 12, 2026

About

Learn more

Our Services

Legal

Privacy Policy

Terms of Use

Bloggers

Learn more

Article Links

Contact

Advertise

Ask us anything

©2020- TradePoint.io - All rights reserved!

Tradepoint.io, being just a publishing and technology platform, is not a registered broker-dealer or investment adviser. So we do not provide investment advice. Rather, brokerage services are provided to clients of Tradepoint.io by independent SEC-registered broker-dealers and members of FINRA/SIPC. Every form of investing carries some risk and past performance is not a guarantee of future results. “Tradepoint.io“, “Instant Investing” and “My Trading Tools” are registered trademarks of Apperbuild, LLC.

This website is operated by Apperbuild, LLC. We have no link to any brokerage firm and we do not provide investment advice. Every information and resource we provide is solely for the education of our readers. © 2020 Apperbuild, LLC. All rights reserved.

No Result
View All Result
  • Main
  • AI & Technology
  • Stock Charts
  • Market & News
  • Business
  • Finance Tips
  • Trade Tube
  • Blog
  • Shop

© 2023 - TradePoint.io - All Rights Reserved!