[KongchangAI]
· 2 min read· 1,177 words

How Kimi Powers REGLO Agent's On-Chain Decisions

How Kimi Powers REGLO Agent's On-Chain Decisions

REGLO Agent uses Kimi to pick optimal scheduling times in solar curtailment windows, with architectural isolation keeping LLM away from payments.

REGLO Agent at Monad Metropolis hackathon uses Kimi as a reasoning engine to select the best window for deferring compute tasks from real-time curtailment and price data across four UK solar sites. Kimi returns a choice with human-readable rationale, making it the only explainable link. The system independently computes the deterministic optimum for honesty checks, always matching Kimi in real runs. Architectural isolation ensures Kimi only decides execution windows, not payment numbers, so LLM hallucinations at most reduce savings. Validated with real payments on Monad testnet, with Qwen and Ollama as fallbacks.

At the Monad Metropolis hackathon, an AI agent called REGLO Agent demonstrated an interesting architecture: it saves costs by scheduling compute tasks outside real solar curtailment windows, and once on-chain proofs confirm the savings, it automatically receives MON token payments. This article focuses on the most critical link in the agent's decision chain — the reasoning step: selecting the best execution time from dozens of candidate windows, and explaining why it made that choice.

rss source: How Kimi Powers REGLO Agent's On-Chain Decisions

Kimi's Role in the Decision Chain

REGLO Agent evaluates real curtailment and electricity price data from the REGLO platform — a real-time monitoring platform covering four UK solar sites — and then picks the best window to defer compute tasks to. This decision is made through Kimi, Moonshot AI's large language model, invoked via its OpenAI-compatible chat-completions endpoint in the agent/reason.js file. With REASONING_PROVIDER=kimi set, all decisions in that run are routed to Kimi.

Kimi receives the full list of candidate windows — including site, hour, curtailment risk, and electricity price — and returns a selection along with a plain-language rationale. It is this rationale that transforms black-box optimization into something humans (or judges) can read and trust. In one real run, Kimi explained its choice like this: "The 13:00 slot has the lowest electricity price, and all sites share the same low curtailment risk, making it the cheapest available option." Such reasoning can be verified against the raw data by a human in seconds.

Solar Curtailment refers to when grid operators actively ask photovoltaic plants to reduce output or even curtail generation because the grid cannot absorb the power or transmission lines are constrained. For generators, curtailment means electricity that could have been produced is wasted; for consumers, curtailment periods often come with extremely low wholesale prices because supply exceeds demand. REGLO Agent's core idea is precisely to schedule deferrable compute tasks into these "curtailment windows," thereby purchasing electricity at lower or even negative prices while reducing curtailment. Understanding this background is key to grasping how Kimi chooses among dozens of candidate windows: what it weighs is not pure algorithmic complexity, but the combination of site, hour, curtailment risk, and electricity price.

The Dual Value of Explainability and Honesty Checks

Kimi's value manifests concretely in two aspects.

Smart contracts and oracles couldn't care less about the LLM's wording — they independently verify actual cost savings before making payments — but for anyone who wants to understand why the agent did what it did, Kimi's explanation is the only human-readable part of the entire pipeline. This explainability is especially important when the decision logic needs to be presented to judges, auditors, or end users.

Built-in Honesty Check: Comparison Against the Deterministic Optimum

Each run also independently computes the deterministic cost-optimal window and compares it against Kimi's choice. If Kimi's answer is not the cheapest option, the agent explicitly flags this in the logs rather than silently accepting whatever the model said. In all real runs to date, Kimi's choice has matched the true optimum. This cross-validation mechanism adds a layer of safety assurance to LLM decision-making.

Deterministic Optimum refers to the cheapest option derived without relying on any probabilistic model, simply by directly enumerating or sorting the cost function across candidate windows. In REGLO Agent's honesty check, the code independently runs this deterministic logic and then compares the result against Kimi's choice. The benefit of this approach is that it demotes the LLM from "sole arbiter" to "advisor": the model can provide reasoning and preferences, but if it deviates from the hard optimum, the system flags it in the logs. For agents handling real money, this cross-validation effectively binds explainability to verifiability, allowing the LLM's flexibility and traditional optimization's reliability to complement each other rather than replace one another.

Equally important from an architectural perspective: Kimi never touches the numbers that determine payment. It is only responsible for choosing which window to execute the task in. The oracle independently re-derives baseline and actual costs from REGLO's real data and signs off on them; the smart contract checks the savings amount itself before paying. A wrong or hallucinated answer from Kimi at most means reduced savings — it can never lead to incorrect or fraudulent payments. It is precisely this separation of responsibilities that makes it safe and feasible to let an LLM make decisions involving real money.

This design pattern is worth borrowing for other on-chain AI agent projects: decouple the LLM's reasoning capability from fund safety logic, letting the former handle explainable decision recommendations while the latter is guaranteed by deterministic code and on-chain verification.

Oracle in the blockchain context refers to middleware that reliably feeds off-chain real-world data onto the chain. In this article, the oracle is responsible for re-deriving baseline and actual costs from REGLO platform's real-time monitoring data, signing the results, and making them available for the smart contract to read. Since the oracle is completely independent of the LLM, even if Kimi hallucinates or suggests a wrong window, it can only affect "how much is saved," not tamper with "how much should be paid." This is the technical foundation of architectural isolation: the LLM handles decision recommendations at the semantic layer, the oracle provides truth endorsement at the data layer, and the smart contract performs fund verification at the execution layer — each fulfilling its own role.

More Than a Demo: Real Runs and Payment Proof

This is not a wiring diagram without actual execution. A run against real REGLO data, with reasoning through Kimi, produced a real payment on Monad testnet: transaction hash 0xcc5f99ebfccb2a9128a102984f5ddde4d22d67c9b4268bc9b42201e058b8e438.

The same code path also supports Qwen and local Ollama as fallback options, so the agent can continue working even if a provider becomes unreachable — but in this run, every decision indeed came from Kimi. This multi-provider design improves system robustness while maintaining consistency in the core reasoning logic.

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

One-line Summary

REGLO Agent uses Kimi to pick the optimal scheduling time within solar curtailment windows, with architectural isolation ensuring the LLM never touches payments.

Paragraph Summary

At the Monad Metropolis hackathon, REGLO Agent demonstrated how to use Kimi as a reasoning engine to select the best window for deferring compute tasks from real-time curtailment and electricity price data covering four UK solar sites. Kimi receives the full candidate list and returns a choice with a human-readable rationale, making it the only explainable link in the entire pipeline. The system also independently computes the deterministic optimum and compares it against Kimi, forming a built-in honesty check; in real runs the two have always aligned. More critically, architectural isolation: Kimi only decides the execution window and never touches payment numbers, while the oracle and smart contract independently verify savings, so LLM hallucinations at most reduce profits and never cause incorrect payments. This design has been validated with real payments on Monad testnet and supports Qwen and local Ollama as fallback providers.

#Kimi LLM#REGLO Agent#on-chain decisions#solar curtailment#Monad Metropolis#architectural isolation#deterministic verification#AI agent payments
Share:

Related articles