Agentic Router: An Execution-Grounded Continual Learning Approach With Memory
Yuxuan Chen, Rongpeng Li, Zhifeng Zhao, Yuntao Liu, Xing Xu, Honggang Zhang
Zhejiang University · Zhejiang Lab · State Grid Hebei Electric Power Company · Macau University of Science and Technology
cs.AI
Submitted: 2026-08-10
Updated: 2026-08-11
Code: https://github.com/sonic-net/SONiC
License: http://arxiv.org/licenses/nonexclusive-distrib/1.0/
Importance score: 95/100
The gist: The paper proposes an execution-grounded dual-path consequence-aware agent for CLI-based SONiC network operations.
Terminology
Summary
The paper proposes an execution-grounded dual-path consequence-aware agent for CLI-based SONiC network operations. The framework separates candidate proposal from consequence-aware action selection. A proposal LLM first generates multiple complete candidate actions. A consequence predictor estimates their likely execution consequences, and utility- and risk-aware reranking selects the action to be executed. Observed consequences then update the two adaptation paths. The proposal-side path abstracts reusable operational lessons into long-term memory and retrieves them as guidance for future proposals without modifying the proposal LLM. The selection-side path uses recent state–action–consequence records to apply session-level LoRA updates to the consequence predictor, correcting later reranking decisions.
The problem is formulated as a multi-turn decision process where the agent receives a natural-language user intent and an environment observation at each turn. The agent generates a set of K complete candidate actions, predicts the consequence of each, and selects the top-ranked action based on predicted utility minus a risk penalty. After execution, the verifier determines success. The paper decomposes top-1 success into feasible-action coverage and conditional selection quality: Pr(yt⋆ = 1) = Pr(ct = 1) Pr(yt⋆ = 1 ct = 1). This decomposition motivates the two adaptation targets: improving candidate coverage on the proposal side and improving selection quality on the selection side.
The proposal-side operational memory stores compact operational lessons extracted from accumulated execution records. Each memory item contains a type, intent description, applicability condition, and reusable proposal guidance. At each turn, the current context is encoded as a retrieval query, and the top-R memory items are retrieved by cosine similarity and inserted into the proposal prompt. The selection-side adaptation updates the consequence predictor through session-level LoRA updates using real SSH feedback, keeping the base predictor stable while providing session-level plasticity.
Experiments over multi-turn SONiC operation sessions with different Qwen3 proposal models (1.7B, 8B, and 14B) show that the framework improves feasible-action coverage and top-1 execution success. The full dual-path framework achieves the highest top-1 success across all tested model scales. The ablation study using Qwen3-8B shows that the proposal-side-only variant improves feasible-action coverage, the selection-side-only variant improves conditional selection quality but remains bounded by available candidates, and the full framework achieves the highest success rate, supporting the decomposition in Eq. (11) and demonstrating that the two adaptation paths provide complementary gains over interaction.
Improvements for AI systems
Improvements to AI Systems:
-
Dual-path adaptation architecture: Implement a system that separates candidate generation from action selection, with independent adaptation mechanisms for each path. The proposal path uses retrievable long-term memory (operational lessons) to improve coverage without retraining the generator, while the selection path applies session-level LoRA updates to a consequence predictor for rapid, localized correction. This prevents catastrophic forgetting and enables both broad exploration and precise refinement.
-
Consequence-aware risk-constrained decision-making: Add a consequence predictor that estimates execution outcomes for every candidate action, then selects actions by maximizing predicted utility minus a risk penalty. This enables the AI to avoid high-risk actions even if they have high nominal utility, improving safety in interactive environments (e.g., network configuration, robotics, API calls).
-
Decomposition-driven optimization: Use the success decomposition (coverage × conditional selection quality) to explicitly target weaknesses. The system can monitor which factor limits performance and allocate adaptation effort accordingly—e.g., if coverage is low, expand memory retrieval; if selection is poor, increase LoRA updates on the predictor.
-
Reusable operational memory with retrieval-augmented prompting: Store compact, structured lessons (type, intent, applicability condition, guidance) extracted from past executions. At each turn, encode current context as a query and retrieve top-R relevant lessons to inject into the prompt. This allows the AI to generalize across sessions and scales without fine-tuning the base model.
-
Session-level plasticity via LoRA on the predictor: Apply lightweight, session-specific LoRA updates to the consequence predictor using real feedback (e.g., SSH logs). This corrects systematic mispredictions within a session while keeping the base model stable, enabling rapid adaptation to new environments or user intents.
What the improved AI system can do:
-
Operate CLI-based or command-line-driven systems (e.g., network devices, servers) with higher success rates across multiple turns, by generating diverse candidate actions and intelligently selecting the safest, most effective one.
-
Adapt to novel or changing environments in real time: it can learn from execution failures and successes within a single session (via LoRA) and across sessions (via memory), without requiring full model retraining.
-
Provide explainable action selection: the consequence predictor can output predicted outcomes and risk scores, allowing users to see why an action was chosen.
-
Scale efficiently: works with small (1.7B) to large (14B) base models, improving performance proportionally, making it suitable for resource-constrained deployments.
-
Avoid repeated mistakes by storing and retrieving operational lessons, leading to faster convergence to correct actions in multi-step tasks (e.g., configuring network protocols, debugging, system administration).
Related papers
- MAVEN-T: Reinforced Heterogeneous Distillation for Real-Time Multi-Agent Trajectory Prediction
- Model Discovery Agent: LLM-assisted Bayesian experiment design for data-efficient discovery of mechanistic world models
- Agents' Last Exam
- The Clinician's Veto: Navigating Trust, Liability, and Uncertainty in Autonomous AI Prescribing
- MindHelper: Closed-Loop Embodied Mental-State Reasoning for Precision Intervention
- Incumbent Advantage: Brand Bias and Cognitive Manipulation Dynamics in LLM Recommendation Systems