cd /news/ai-agents/we-put-qwen-3-8-max-in-charge-of-thr… Β· home β€Ί topics β€Ί ai-agents β€Ί article
[ARTICLE Β· art-144370] src=dev.to β†— pub= topic=ai-agents verified=true sentiment=↑ positive

We Put Qwen 3.8 Max in Charge of Three Onchain Trading Agents. Here's What Happened.

A developer integrated Alibaba's Qwen 3.8 Max reasoning model as the decision-making brain for three autonomous onchain trading agents on the Contex Arena platform, live on Monad testnet. After a 30-minute session with four rounds settled onchain, the agents produced 66 decisions with zero parse failures, though the team had to raise the output token budget from 300 to 4,000 because Qwen's thinking trace consumed the original budget before the JSON decision was complete.

by read4 min views1 publishedOct 3, 2026

How Alibaba's flagship reasoning model became the brain of Contex Arena β€” an AI trading arena live on Monad testnet.

Contex Arena is simple to explain and hard to run: three AI trading agents β€” Degen Dan (aggressive momentum), The Professor (disciplined mean-reversion), Whale (patient giant) β€” trade a synthetic asset against each other, live and onchain, on Monad testnet. Every trade is a real transaction. Spectators bet MON on which agent finishes the round with the highest portfolio value; winners split the pool, parimutuel style.

The agents are fully autonomous. Each tick, an agent reads the market state onchain (price, its own positions, its rivals' portfolios, time left in the round), thinks, and outputs a single machine-parseable decision:

{"action": "BUY", "amount": 12.5, "reason": "Price 4% below average, momentum turning up."}

That decision becomes an agentBuy / agentSell transaction seconds later.

The brain is the whole game. A dumb brain makes random trades; a flaky brain breaks the JSON contract and the round stalls; a slow brain misses the round cadence. We'd been running on a failover chain of fast models β€” Nebius's Nemotron Lightning first, then Atria, then NVIDIA NIM. It worked. But we wanted to see what a real reasoning model would do with the same job.

The Metropolis hackathon's Alibaba Cloud bounty asks builders to push Qwen 3.8 Max into "genuinely agentic territory" β€” not chatbots answering prompts, but agents planning, using tools, and executing multi-step work. An autonomous trader that reads onchain state, reasons about it, and fires transactions is about as agentic as it gets: every decision has financial consequences, recorded forever on a public ledger.

Qwen 3.8 Max is Alibaba's flagship reasoning model, and it speaks the OpenAI-compatible chat completions dialect. That made the integration almost boring β€” in the best way. Our agent runner already talks to every provider through raw POST /chat/completions behind a provider failover chain, so adding Qwen took about fifteen lines of code: a new entry at the head of the chain, model qwen3.8-max, pointed at the QwenCloud international endpoint ( maas.qwencloudapi.com).

There was exactly one surprise, and it's the kind you only learn from a reasoning model in production. Qwen 3.8 Max does its reasoning in a thinking trace, and on some endpoints thinking can't be disabled β€” the trace burns output tokens against your max_tokens budget. Our old budget was 300 tokens, tuned for a fast non-reasoning model that returns bare JSON. Hand 300 tokens to a reasoning model and the thinking trace eats the budget before the JSON is complete. We'd fought (and fixed) the same failure mode with Nemotron Lightning before, so we knew the shape of the fix.

The fix: give Qwen a 4,000-token budget and let the parser do its job. Our parser doesn't trust the model to be tidy β€” it strips <think> traces, extracts every balanced {...} candidate from the response, and takes the first one that parses and validates. If the model answers in prose instead of JSON, we nudge it once with its own bad answer as context before failing over to the next provider. Defense in depth, because onchain agents don't get a human in the loop.

We pointed one agent at Qwen first, watched the logs, then promoted it to primary for all three fighters. After a 30-minute live session with all three agents running on Qwen β€” 4 full rounds settled onchain β€” here are the numbers from the QwenCloud pay-as-you-go console:

Three things, honestly:

1. Decision quality you can watch. The jump from a fast small model to a flagship reasoning model isn't subtle when the output is money on a leaderboard. The agents' reason fields β€” one short sentence per trade β€” went from plausible-sounding to actually grounded in the market state they were shown.

2. Format reliability. Zero parse failures across 66 decisions. For an agent whose entire interface to the world is a JSON object that becomes a blockchain transaction, that's the difference between "demo" and "product."

3. A real agentic story. The bounty asked for Qwen doing real work, not answering prompts. Our agents plan (persona + market analysis), use tools (onchain reads via RPC, transaction submission), and execute multi-step loops (decide β†’ re-validate the round is still active β†’ send the trade β†’ repeat). Qwen 3.8 Max sits at the center of that loop, settling decisions without human intervention.

Contex Arena is live on Monad testnet at contexarena.xyz β€” connect a wallet, grab testnet MON from the faucet, bet on a fighter, and watch three Qwen-powered brains try to out-trade each other. Every trade, bet, and payout is onchain and verifiable.

Watch the 85-second demo on YouTube.

Built for the Monad Metropolis hackathon β€” Trust, Identity & AI Infrastructure track.

── more in #ai-agents 4 stories Β· sorted by recency
── more on @qwen 3.8 max 3 stories trending now
sponsored brought to you by zahid.host 4,200+ EU-deployed projects
reading about agents? ship yours in a single git push.

Run your AI side-project on zahid.host

EU-based hosting, git-push deploys, automatic HTTPS, no cold starts. Free tier with a custom domain β€” perfect for shipping the agent you just read about.

$git push zahid main
β†’ Live at https://your-agent.zahid.host βœ“
Get free account β†’ Pricing
from €0/mo Β· no card required
LIVE [news/we-put-qwen-3-8-max-…] indexed:0 read:4min 2026-10-03 Β· β€”