Agente con persistencia de memoria
El objetivo principal de este flujo es que el agente de IA mantenga un diálogo coherente , permitiendo que la respuesta se base en el contexto completo.
graph TD
%%{init: {'theme': 'mc','layout': 'elk'}}%%
ChatInput-tj4g4[<div><img src="/_astro/messages-square.BaSDmT6g.svg" style="height: 20px !important;width: 20px !important"/></div>Chat Input]
style ChatInput-tj4g4 stroke:#a170ff
ChatOutput-17n0s[<div><img src="/_astro/messages-square.BaSDmT6g.svg" style="height: 20px !important;width: 20px !important"/></div>Chat Output]
style ChatOutput-17n0s stroke:#a170ff
GoogleGenerativeAIModel-6dquc[Google Generative AI]
style GoogleGenerativeAIModel-6dquc stroke:#a170ff
AdvancedAgent-09rkl[Agent]
style AdvancedAgent-09rkl stroke:#a170ff
GoogleGenerativeAIModel-6dquc -.- AdvancedAgent-09rkl
linkStyle 0 stroke:#a170ff
ChatInput-tj4g4 -.- AdvancedAgent-09rkl
linkStyle 1 stroke:#a170ff
AdvancedAgent-09rkl -.- ChatOutput-17n0s
linkStyle 2 stroke:#a170ff
Agente con persistencia de memoria (Agent with Memory Persistence)
🧩 Overview
This workflow implements a direct communication channel with an intelligent agent, enhanced by advanced memory management. Unlike conventional chat systems, the agent operates under an executive summarization protocol, allowing it to maintain coherent, context-aware conversations over extended interactions. It is designed to provide a persistent and adaptive AI assistant that can recall and build upon previous dialogue.
⚙️ Main Features
- Provides a user-friendly chat interface for interacting with an AI agent.
- Employs an advanced agent with a summarization-based memory strategy to manage long conversation histories.
- Utilizes a powerful language model (Google Gemini) to generate intelligent and contextually relevant responses.
- Delivers the agent's final response back to the user through a dedicated chat output.
🔄 Workflow Steps
| Component Name | Role in the Workflow | Key Inputs | Key Outputs |
|---|---|---|---|
| Chat Input | Captures the user's message to initiate the conversation. | User's text message, session identifiers. | Formatted user message for the agent. |
| Agent | The core reasoning unit that processes the user's query using tools and memory. It is configured to summarize past interactions to manage context. | User message, language model, memory configuration. | Intelligent agent response based on context and available tools. |
| Google Generative AI Model | Provides the underlying language model powering the agent's reasoning and text generation capabilities. | Model configuration (e.g., temperature, token limits). | Configured language model instance for the agent. |
| Chat Output | Displays the agent's final response to the user within the chat interface. | The agent's generated response message. | Formatted message displayed to the user. |
🧠 Notes
- The agent is configured with a "Summarize" memory strategy, which condenses older parts of the conversation to stay within context window limits while preserving key information.
- The workflow requires a valid API credential for the Google Generative AI service to function.
- The system prompt and agent description can be customized to define the assistant's personality and capabilities.
- The memory persistence allows the agent to reference earlier parts of the same conversation session, enabling more coherent multi-turn dialogues.