DEV Community

Edmund DSouza
Edmund DSouza

Posted on

How Kimi Powers REGLO Agent’s On-Chain Decisions

REGLO Agent is an AI agent built for the Monad Metropolis hackathon that gets paid automatically in MON when it proves — on-chain — that it saved money by scheduling compute around real solar-curtailment windows. The piece of it I want to talk about here is the reasoning step: the moment where the agent actually has to decide which window to act on, out of dozens of real candidates, and explain why.

Where Kimi fits in

REGLO Agent evaluates real curtailment and tariff data from REGLO (a live solar-curtailment monitoring platform covering four UK solar sites) and has to pick the best window to defer a compute job into. That decision runs through Kimi, Moonshot AI’s LLM, called via its OpenAI-compatible chat-completions endpoint in agent/reason.js. Setting REASONING_PROVIDER=kimi routes every decision through Kimi for that run.

Kimi receives the full list of candidate windows — site, hour, curtailment risk, tariff — and returns both a choice and a plain-language rationale for it. That rationale is what turns a black-box optimisation into something a person (or a judge) can actually read and trust: on a real run, Kimi explained its pick as “the 13:00 slot has the lowest electricity price, and all sites carry the same low curtailment risk, so it’s the cheapest available choice” — reasoning a human can check against the raw data in seconds.

What value that actually brings

Two things, concretely. First, interpretability: the contract and the oracle don’t care about the LLM’s wording at all — they independently verify the real cost saving before any payout happens — but for anyone trying to understand why the agent did what it did, Kimi’s explanation is the only human-readable part of the pipeline. Second, a built-in honesty check: every run also computes the deterministic cost-optimal window independently, and compares it against Kimi’s pick. If Kimi’s answer isn’t actually the cheapest option, the agent says so out loud in its logs rather than quietly accepting whatever the model said. On every real run so far, Kimi’s pick has matched the true optimum.

Just as important architecturally: Kimi never touches the numbers that decide the payout. It only picks which window to act on. An oracle independently re-derives the baseline and actual cost from REGLO’s real data and signs that; the smart contract checks the savings itself before paying out. A wrong or hallucinated answer from Kimi could at worst mean a smaller saving — never a wrong or fraudulent payout. That separation is what makes it safe to let an LLM make a real-money decision at all.

Proof, not a claim

This isn’t a wiring diagram with nothing running through it. A real run against real REGLO data, reasoning through Kimi, produced a real payout on Monad testnet: 0xcc5f99ebfccb2a9128a102984f5ddde4d22d67c9b4268bc9b42201e058b8e438. The same code path also supports Qwen and a local Ollama fallback, so the agent keeps working even if one provider is unreachable — but for this run, every decision genuinely came from Kimi.

Full project: github.com/edmundjeevan/reglo-agent-pipeline

Top comments (0)