Skip to main content

3.7 Version Release: Agent Middleware

· 4 min read
Tiven Wang

Today, we are excited to announce the official launch of XpertAI Agent Platform version 3.7! The core highlight of this update is the newly introduced Agent Middleware feature, providing developers with fine-grained control over agent execution processes and modular extension capabilities, further advancing agent construction from "functional implementation" to a new stage of "controllable processes and malleable capabilities."

Middleware node config
Middleware node config

🧩 Agent Middleware: Redefining Agent Control Granularity

Agent Middleware aims to enable developers to flexibly intervene in the entire process of agent decision-making, execution, and output through a modular plugin mechanism, achieving transparent observation and precise intervention of agent behavior.

Its core capabilities include:

  • Modular Plugin Configuration
    Encapsulate functions such as logging, prompt transformation, response formatting, and error retry as independent plugins, supporting on-demand combination. Build customized agent processes quickly like assembling building blocks, improving function reuse and system maintenance efficiency.

  • Visual Execution Chain
    Provide observable hooks before and after key steps such as agent thinking, tool invocation, and result generation, forming a clear execution chain view. Developers can intuitively track the entire "think-act-observe" process of agents, facilitating debugging and strategy optimization.

  • Centralized Flexible Configuration
    Through a unified middleware node management interface, dynamically configure plugin enable status and parameters, supporting quick switching and combination adjustments in different environments, greatly enhancing the customization capability of agent applications.

🏗️ Extensible Architecture Based on NestJS

XpertAI Agent Middleware is built using the NestJS plugin module mechanism, featuring high extensibility and stability:

  • Each middleware function is encapsulated as a standard NestJS module, following a unified plugin interface to ensure behavioral consistency.
  • Supports developers in quickly developing custom middleware based on agreed interfaces, easily integrating into the platform to achieve independent evolution and smooth upgrading of business logic.

🔗 Alignment with LangChain Architecture: Ecosystem Compatibility and Best Practice Synchronization

We reference and are compatible with the design philosophy of LangChain Agent Middleware, bringing multiple strategic values:

  • Reuse Mature Ecosystem
    Directly leverage or integrate rich middleware implementations from the LangChain community (such as PII detection, human review, prompt caching, etc.), accelerating feature implementation and ecosystem building.

  • Synchronize with Industry Frontiers
    Follow LangChain's continuous evolution in Agent architecture, timely introducing new middleware patterns such as context optimization and multi-agent collaboration, maintaining platform technological leadership.

  • Enhance Framework Universality
    Whether simple Q&A bots or complex multi-step task agents, all can be flexibly assembled through the same middleware system, supporting broader business scenarios and architectural patterns.

🚀 Empowering Diverse Agent Application Scenarios

Internal R&D Efficiency Enhancement

Project teams can quickly build agents with different characteristics through plugin combinations, for example:

  • Add a "conversation summary" plugin to dialogue systems to automatically generate conversation summaries;
  • Load a "PII detection" plugin for retrieval scenarios to implement sensitive information filtering. Combined with visual execution chains, significantly reduce debugging and iteration costs.

Ecosystem Cooperation and Custom Integration

Third-party developers can develop industry-specific middleware based on standard plugin interfaces (such as financial compliance review, medical terminology standardization, etc.), seamlessly integrating into XpertAI agent processes to achieve secure and controllable cross-domain capability expansion.

📦 Experience Now

Agent Middleware functionality is fully available in XpertAI version 3.7, and existing users can directly configure and use it in the agent workflow management interface. We simultaneously provide multiple common middleware plugin examples and detailed integration documentation to help you get started quickly.


Agents should not just be "black boxes," but observable, intervene-able, and composable intelligent units. The Agent Middleware launched in XpertAI 3.7 is a key step we are taking toward this goal.

Visit our Documentation Center to learn more details and start your agent process customization journey.

Finer control, freer combination, more transparent intelligence—XpertAI Agent Middleware, here for you.


XpertAI continues to empower agent construction and implementation, working with developers to advance AI application engineering.