CRMWeaver: Building Powerful Business Agent via Agentic RL and Shared Memories

Yilong Lai, Yipin Yang, Ting Liang, Jialong Wu, Zhenglin Wang, Jianguo Lin, Keping Yang

TL;DR

CRMWeaver is a novel framework that allows a lightweight 4B-parameter model to match or outperform frontier models like Gemini-2.5-Pro and Qwen3-235B on complex enterprise CRM tasks. It achieves this by combining graph-based synthetic data generation, multi-turn agentic reinforcement learning, and a dynamic long-term memory module that retrieves and injects workflow guidelines at inference time.

What Problem Does This Paper Address?

Building AI agents for business environments (like Salesforce or internal enterprise databases) is notoriously difficult. Unlike general-purpose chatbots, business agents must navigate highly intricate data dependencies—such as large-scale interconnected database tables—and execute heterogeneous tasks ranging from precise SQL data queries to policy compliance checks.

Figure 1: Challenges of business agents in handling diverse user needs and interacting with heterogeneous data sources.

Because high-quality training trajectories for these specific enterprise workflows are incredibly scarce, current solutions rely on prohibitively expensive, massive frontier models. The authors tackle this data scarcity and domain complexity gap, aiming to train a smaller, cost-effective model that can reliably execute complex multi-step business workflows.

Methods

CRMWeaver uses a three-part approach spanning data generation, a two-stage training recipe, and an inference-time memory mechanism:

Figure 2: The overall pipeline of CRMWeaver. We first construct both simple and complex synthetic data by leveraging correlations among data records to support model training (§ 3.1). The training recipe adopts a two-stage paradigm, including SFT for model initialization and reinforcement learning for generalization (§ 3.3). Finally, the inference process incorporates a memory enhancement mechanism (§ 3.4).
  1. Graph-Based Data Synthesis: To overcome data scarcity, the authors model the enterprise database schema as a graph (where nodes are records and edges are relationships). They perform random walks across this graph and use an LLM to iteratively refine these paths into highly complex, multi-relational natural language queries.
  2. Two-Stage Training Recipe:
  3. Stage 1 (SFT Cold Start): The model is initialized using Supervised Fine-Tuning (SFT) on high-quality trajectories generated via rejection sampling from GPT-4.
  4. Stage 2 (Agentic RL): The model is optimized using Decoupled Clip and Dynamic Sampling Policy Optimization (DAPO). The reward function heavily prioritizes both strict tool-calling formats (using <think> and <tool_call> tags) and final answer accuracy.
  5. Long-Term Memory Module: During inference, the agent looks up an index of successful workflow guidelines from similar past tasks. If a match is found, the guideline is injected directly into the context window. If the agent fails a query, an advanced offline model (like o3-mini) resolves it, extracts a high-level abstract guideline, and updates the memory pool.

Datasets

The framework was trained on a mix of simple/complex synthetic data and task-specific data from CRMArena.

For evaluation, the authors used CRMArena-Pro, a highly challenging benchmark simulating a Salesforce environment. It features 25 interconnected objects across Service, Sales, and Configure-Price-Quote (CPQ) schemas, containing over 80,000 records. The evaluation spans 19 distinct tasks across both Business-to-Business (B2B) and Business-to-Consumer (B2C) scenarios.

Key Insights and Ideas

  • Small Models Can Punch Above Their Weight: With targeted reinforcement learning and procedural memory, a 4B model can develop specialized reasoning capabilities that rival models nearly 60 times its size.
  • Format Rigor Drives Accuracy: In tool-augmented environments, a significant portion of agent failure stems from formatting errors. Explicitly rewarding correct tag usage (<think>, <tool_call>) during RL drastically stabilizes multi-turn execution.
  • Memories Don't Need Constant Updates: Interestingly, the authors found that the long-term memory module only needed updates for about 3% of tasks in the B2B scenario. Once a robust set of workflow guidelines is established, the agent consistently reuses them effectively.

Key Results

Using Qwen3-4B-Instruct as its backbone, CRMWeaver achieved remarkable results on the CRMArena-Pro benchmark:

Experimental results on CRMArena-Pro across B2B and B2C domains
  • B2B Domain: CRMWeaver scored an average of 55.6, outperforming Qwen3-235B-Instruct (51.9) and Gemini-2.5-Pro (54.1).
  • B2C Domain: It scored 57.1, beating Qwen3-235B-Instruct (53.3) and coming within striking distance of Gemini-2.5-Pro (58.3).
  • Database Mastery: CRMWeaver showed a massive advantage in structured data tasks, scoring 73.0 in B2B Database tasks compared to Gemini-2.5-Pro's 57.6.

Ablation studies confirmed that every component was vital; removing the long-term memory or the RL training caused noticeable performance drops.

Ablation studies for CRMWeaver variants

Limitations and Future Work

Despite its success, the authors note several limitations:

  • Single-Query Constraint: The current RL setup assumes the user provides a single query at the start, rather than supporting dynamic, multi-turn back-and-forth conversations with a human user.
  • Inference/Rollout Overhead: The asynchronous rollout process during RL training is time-consuming, leading to underutilized GPU resources. The authors plan to explore fully asynchronous RL frameworks like AReal to mitigate this.
  • Context Window Constraints: To prevent context overflow during training, the authors had to limit the number of database records returned by tools, which inherently caps the agent's reasoning capacity for massive data dumps.

Summary updated

Abstract

Recent years have witnessed the rapid development of LLM-based agents, which shed light on using language agents to solve complex real-world problems. A prominent application lies in business agents, which interact with databases and internal knowledge bases via tool calls to fulfill diverse user requirements. However, this domain is characterized by intricate data relationships and a wide range of heterogeneous tasks, from statistical data queries to knowledge-based question-answering. To address these challenges, we propose CRMWeaver, a novel approach that enhances business agents in such complex settings. To acclimate the agentic model to intricate business environments, we employ a synthesis data generation and RL-based paradigm during training, which significantly improves the model's ability to handle complex data and varied tasks. During inference, a shared memories mechanism is introduced, prompting the agent to learn from task guidelines in similar problems, thereby further boosting its effectiveness and generalization, especially in unseen scenarios. We validate the efficacy of our approach on the CRMArena-Pro dataset, where our lightweight model achieves competitive results in both B2B and B2C business scenarios, underscoring its practical value for real-world applications.
BibTeX
@inproceedings{lai2025crmweaver,
  author = {Yilong Lai and Yipin Yang and Ting Liang and Jialong Wu and Zhenglin Wang and Jianguo Lin and Keping Yang},
  title = {{CRMWeaver: Building Powerful Business Agent via Agentic RL and Shared Memories}},
  booktitle = {MTI-LLM @ NeurIPS},
  year = {2025},
  url = {https://openreview.net/forum?id=uqMPNWvMkp},
}
Figure