This article is based on a NextQuery 2026 fireside chat between Feihu Tang, research engineer and developer relations at Moonshot AI, and Sida Shen, product manager at PhoenixAI and a StarRocks contributor. NextQuery is PhoenixAI's Data + AI Infrastructure Summit. Watch the session
Agents can now work on a single task for hours or days. What they figure out along the way usually disappears when the run ends. The last session of Track A at NextQuery 2026 looked at this from two sides. Moonshot AI trains the open-weight Kimi models, so its work is on what goes into the model. PhoenixAI builds databases, so its work is on the data and metadata an agent reads from outside the model.
Feihu has worked across most of that stack: infrastructure engineering at Google, then post-training and infrastructure at Moonshot, and now customer deployments with the API team. The conversation covered how agentic models are trained, why long runs fail, whether a million-token context window removes the need for external context, and where everything else should be kept.
What "agentic" means in training
What Kimi demo have you enjoyed most recently?
Feihu Tang of Moonshot AI picked two. The first was shown at a game development event a few days earlier: a 3D animation that a colleague without a technical background made with Kimi in a few minutes. The second came from the research side. Moonshot's internal models now help optimize GPU kernels, which speeds up both inference and training. In effect, the model helps train the next model.
When Kimi describes a model as agentic, what does that mean in training terms? How is it different from training a chat model?
Feihu named three differences. The training involves many tool calls. The tasks include long-horizon coding work. And the team builds new evaluation frameworks for this work and works closely with data engineers.
What is inside a training environment that produces a model able to run for days?
A reinforcement learning pipeline. Tasks run step by step, and each step is evaluated. The steps a harness would normally take on a long coding task are extracted so the model learns to take them itself. Moonshot calls this "the model as agent": over time, the model should be able to do the work without the harness doing it for it. Sida Shen put it as training the harness into the model.
Why long runs break
What breaks first in a long run?
Every step in a long task is a chance to make a mistake, and an early mistake makes every later step harder. Feihu Tang described the model's job as catching and recovering from those mistakes on its own, for example finding a bug in code it wrote earlier and working out the fix. That takes a capable model.
Is that a context problem? Does the model lose sight of the full history?
Partly. On a long task the context grows quickly, and the harness has to decide when to compact it and which messages to keep. Those decisions affect the outcome as much as the model does.
This also makes long-horizon work hard to measure. Feihu showed the Agents Last Exam leaderboard, where each task means operating real software through its user interface, such as Unity, Unreal or Blender. The leaderboard ranks combinations of model and harness, and reports total run time, tokens used and cost next to the score. The model on its own is no longer what gets evaluated.
Does a million-token window remove the need for external context?
Moonshot AI's CEO Yang Zhilin has said that every problem is essentially a long-context problem. With context windows now reaching a million tokens, are retrieval and an external context layer still needed?
Feihu Tang's answer was yes. No matter how large the context window gets, harder tasks will need more. The model's own window and the external harness will work together for a long time.
Sida Shen added the database view. Database tasks are short, a minute or two each, but the context needed to run them well is large. To build a good physical query plan, a database collects statistics about the data, such as how values are distributed. A database with a cost-based optimizer uses those statistics to work out plan costs on its own. Handing that job to the model would mean putting the statistics into the context window, and a database collects far too many to fit. Even if it did, window space should hold only what the model needs. The database, the model and the harness should each do the part they are built for.
The second gap is knowledge that isn't written down anywhere the agent can see. Sida's example was annualized revenue. It sounds simple, but every company defines it differently, and the definition is not in the prompt. Feihu agreed that harnesses now need tools that give the model this kind of information. Sida's view is that it belongs in a knowledge or semantic layer the model can query.
What a sub-agent keeps
Kimi's Agent Swarm shards context instead of truncating it: only task-relevant output goes back to the orchestrator. When a sub-agent reports back, what happens to the rest of what it did? Is that standardized, or up to each harness?
In a swarm, Feihu Tang said, each sub-agent keeps its own working memory, and only the key conclusions go back to the master agent. The master agent does not save the full trace. Beyond that, each harness handles it differently: some compress context, some don't, and some compress at set points. In Kimi Code, an export command writes the session context to a Markdown file, which shows what the harness kept. Sida Shen added that Kimi Code is notably efficient with tokens, and that this is a design choice.
Does an agent's own trace ever become its context? Do you feed results from one run into the next?
Feihu Tang said it depends on the task. For coding, the limit is often the size of the code base. At a large internet company, the repository can be bigger than any model can read at once, so the agent needs search tools over the code.
Sida Shen took that further. A dedicated, persistent store the agent can search, holding semantics, business knowledge, traces from other agents and evaluation results, takes load off the context window. Searching it is less direct than having everything in the window, but it gives the agent far more to work with than a window can hold.
Running the agent loop where the data lives
Many companies cannot send their data to a model API. What does an open-weight model change for them, and what does it take to run the whole agent loop inside their own environment?
Feihu Tang's answer was to host the model yourself, so the data never leaves your environment. Moonshot AI releases its weights so the open frontier keeps up with proprietary models and so others can build on them. Feihu pointed to Cursor, which trained its Composer model on a Kimi model and fine-tuned it for its own product. Moonshot also gives some enterprise partners day-zero access to new models.
Sida Shen sees the same shift on the data side. Now that teams can host the whole AI stack themselves, they want the data to sit close to where the model runs. In PhoenixAI's cloud, the data and the database stay inside the customer's perimeter, and an air-gapped option is available for data centers where nothing can leave.
A year from now
One prediction each: a year from now, does more of an agent's work live inside the model or in the systems around it?
Feihu Tang expects both. More of what harnesses do today will be trained into models. Models will also be asked to solve harder problems, and those will need more complex harnesses. The two will keep developing together.
Sida Shen agreed and answered for the context side. The model should do the complex reasoning. Infrastructure, databases included, should supply the information the model needs, instead of the model trying to hold that information in its context window. Data statistics and metadata belong in the database. No one tries to fit three petabytes of data into a context window, and the statistics on those three petabytes don't belong there either.
Where agent context should live
Sida Shen's argument for data statistics extends to business semantics. Definitions change often, and many people and agents depend on them, so they need persistent storage outside the window, with version control and governance. That store should also tell an agent what it is allowed to do, and let it see what other agents have done. Sida's view is that these pieces should live together in one system outside the model: semantics, business knowledge, traces and evaluation results, where every agent can reach them.
Both speakers ended in roughly the same place. Models will take on more of how a task gets done. The information the task depends on, such as statistics, definitions and earlier results, still has to come from outside the model, from a system that keeps it current and governed.