Implement a Copilot assistant based on a ReAct AI agent

Integrating edge computing with artificial intelligence enables innovative use cases. It allows the deployment of AI algorithms and models directly through edge applications, making real-time data processing and analysis possible. In this context, AI agents are a relevant concept, acting as autonomous systems capable of analyzing data, making decisions, and taking action. This approach delivers intelligence right where data is generated and consumed, ensuring faster decision-making, reduced latency, and enhanced efficiency.

One practical application of AI agents is a Copilot implementation. A Copilot is a smart assistant designed to simplify user interactions with a platform or service. By leveraging the edge, the Copilot can provide real-time guidance and personalized user support, helping users navigate the platform and complete complex tasks more efficiently and effectively, all while minimizing latency and maximizing performance.


Copilot Assistant Architecture Diagram

This example uses the ReAct (Reasoning + Acting) Agent architecture, which combines logical reasoning and decision-making with action execution, enabling AI agents to process information, plan, and take action.

When a user sends a question or request, the agent retrieves data from the functions and tools containing the logic and knowledge base. If the agent finds an adequate response, return the response. Otherwise, the process is finished.

ReAct (Reasoning + Acting) AI Agent diagram

Considering the implementation of a ReAct agent in an Edge Computing Platform, the general architecture looks similar to this:

Azion Copilot Assistant Architecture Diagram

Copilot Assistant Dataflow

  1. The user sends a request.
  2. The healthiest node in the network attends to the request.
  3. Edge Application processes it adequately, executing any implemented rule.
  4. Edge Functions executes the AI Agent’s logic.
  5. The AI Agent consults various external tools and resources, such as semantic or vector search engines, databases, and documents, while analyzing the context of the user’s query to ensure relevant results.
  6. If a suitable response is found, it’s sent back to the user. Otherwise, the process concludes with an error message, informing the user of the issue.

Components

  • Edge Application: allows you to build applications that run in Azion Edge Network.
  • Edge SQL: an edge-native SQL solution designed for serverless applications.
    • Vector Search: enables customers to implement semantic search engines.
  • Edge Network: a highly distributed architecture that includes strategically located edge nodes.

Implementation

  1. Create an edge application.
  2. Create the Edge SQL database that will be consulted.
  3. Create an edge function with your AI Agent’s logic and instantiate it in the application.
  4. Implement Vector Search.
  5. You can monitor your AI Agent through Azion Observe products and specialized tools such as LangGraph.


Contributors