Viyan

Viyan AI

CREW Uses Reinforcement Learning for Agent Workflows

The CREW framework shifts agentic workflows from manual, hard-coded sequences to learned policies using reinforcement learning.

The CREW framework moves multi-agent research systems away from hard-coded linear pipelines toward a reinforcement learning approach. Until now, these systems followed a fixed sequence where agents performed tasks in a pre-ordained order. By applying Independent Proximal Policy Optimization, CREW agents make autonomous decisions about their next steps based on the current context of the project. Instead of executing a script, the agents adapt their workflow behavior to the specific requirements of the literature they encounter.

The Mechanism of Learned Coordination

CREW models the research process as a sequential decision-making problem. At each step, a policy acts as a controller, observing the current state and outputting a probability distribution over available actions: Retrieve, Compose, Critique, and Disseminate. During inference, this policy maps the input state—the observable metrics of current progress—to a set of action probabilities. The agent then samples from this distribution to decide the next move.

Coordination between agents emerges because the system is optimized against a shared global reward. Each agent’s policy is trained to maximize this single, document-level return, which tethers individual behaviors to a common goal. To manage the problem of credit assignment, the system uses temporal difference learning to bridge the gap between intermediate actions and the final outcome. Through this method, the agent calculates the difference between the estimated value of its current state and the discounted value of the next state plus the immediate reward. If the agent performs a retrieval action that enables a higher-quality composition later, the value function updates to reflect that the initial action was a high-value contributor to the final reward signal.

Feature Static Multi-Agent Pipelines CREW Framework
Action Selection Heuristic/Predefined Autonomous/Learned
Coordination Logic Fixed linear sequence IPPO Policy Model
Token Efficiency Low (redundant steps) High (dynamic selection)
Adaptability Rigid Reactive to content

Moving from Orchestration to Training

A static pipeline might force five sequential retrieval calls to ensure coverage, even if the first paper retrieved already addresses the primary theme. This burns unnecessary tokens on the later steps by default. In contrast, the CREW policy learns to reduce subsequent retrieval calls if the marginal reward gain falls below a threshold. Consider an agent drafting a review on deep learning optimizers. If the first paper provides a comprehensive overview, the policy assigns a lower probability to additional retrieval actions. The agent effectively stops searching as soon as the expected reward for further retrieval drops below the cost of the action, which saves both latency and tokens.

This framework relies on a reward function that provides a scalar value to guide the learning process. In the current implementation, this reward is derived using an LLM-as-a-judge approach. The final document is evaluated against a set of quality criteria, such as factual grounding or synthesis depth, and the LLM produces a numerical score. This score serves as the terminal signal for the training loop. The primary bottleneck is the quality of this reward function, as it must reliably distinguish between high-quality synthesis and text that is merely fluent but misses critical data. Developers must ensure the judge model captures the specific nuances of the desired output, as a generic evaluator may fail to penalize missing citations or logical gaps.

Implementation Risks and Unknowns

What remains unclear is the training cost for the policy and its generalizability across diverse research domains. The framework assumes that the training data represents the target domain well. If the policy is brittle, shifting from machine learning papers to molecular biology could degrade performance and force a cycle of retraining that outweighs the efficiency gains. Because the agents learn through trial and error within a simulated research environment, the system requires a high volume of successful trials to converge.

Reward sparsity is a significant hurdle. In many research tasks, the agent might execute dozens of retrieval and critique actions before receiving a single feedback score upon completing the full document. In a state where an agent spends time formatting bibliography entries or cleaning raw text, it receives no immediate feedback on whether these actions improve the final quality score. Without an immediate reward, the agent must rely entirely on the value function's ability to propagate the final score back through the sequence. If the path to a high-quality document is not clearly linked to intermediate steps, the agent struggles to distinguish between productive search actions and trivial administrative tasks. This forces developers to design denser intermediate reward signals or accept longer training cycles to reach convergence.

Sources