Runnable With Message History
⚠️ DEPRECATION WARNING
This component is deprecated and will be removed in a future version of Nappai.
Please migrate to the recommended alternative components.
Runnable With Message History is a tool that lets you run a task (called an agent) and automatically remembers the messages that were exchanged. It tries to figure out which input and output fields the agent needs, so you don’t have to set them manually.
How it Works
When you drop this component into a workflow, you give it an Agent Executor (the agent you want to run) and a few optional settings. The component then:
- Collects the conversation history – it pulls messages from an external memory if you provide one; otherwise it uses Nappai’s internal memory.
- Runs the agent – it calls the agent’s
execute
method, passing any extra parameters you specify. - Stores the result – the output message is saved back into the memory so that later components can read it.
Because the component guesses the input and output keys, you usually only need to set the basic fields. It’s a quick way to add a “run and remember” step to your automation.
Inputs
- External Memory: Retrieve messages from an external memory. If empty, it will use the nappai internal.
- Agent Executor: The agent you want to run. This field is required.
- Executor Name: The name of the executor to use.
- Input Key: The key that holds the input data for the agent.
- Input: The actual input message to send to the agent.
- Memory top message: The number of top messages to keep in memory.
- Number of extra input parameters: Number of extra input parameters to pass to the agent.
- Output Key: The key that will store the agent’s output.
- Stream: Whether to stream the agent’s output as it is produced.
Outputs
- Text: The message produced by the agent (type: Message). This can be used as input for other components or displayed in the dashboard.
Usage Example
- Add the component to your workflow.
- Connect an Agent Executor (e.g., “Email Sender”) to the Agent Executor input.
- Set “Input” to the message you want the agent to process (you can use a previous component’s output).
- Leave “External Memory” empty if you want to use the default memory.
- Run the workflow. The component will execute the agent, remember the conversation, and output the result in the Text field.
You can then feed the Text output into another component, such as a “Send Email” step, to complete the automation.
Related Components
- Agent Executor – The core component that defines the logic of an agent.
- Memory Store – Manages persistent conversation history across workflows.
- Message Builder – Helps create structured messages for agents.
Tips and Best Practices
- Keep the memory size small: If you only need recent context, set Memory top message to a low number to reduce memory usage.
- Use named executors: Give each executor a clear name so you can easily identify it in the workflow.
- Test with simple inputs first: Verify that the agent runs correctly before adding complex parameters.
- Avoid excessive streaming: Set Stream to
false
unless you need real‑time updates, as streaming can increase latency.
Security Considerations
- Data privacy: Messages stored in memory may contain sensitive information. Ensure that your workflow complies with your organization’s data‑handling policies.
- Access control: Only authorized users should be able to configure or run agents that handle confidential data.
- Audit trail: Use the built‑in logging to keep a record of agent executions for compliance purposes.