Skip to content

TodoListMiddleware

The TodoListMiddleware acts like a digital checklist and progress tracker built directly into your AI agent. Instead of relying solely on the AI’s memory, this component creates a structured list of steps that the AI can read, update, and manage as it works. It runs quietly in the background to keep your automation flows organized, preventing the AI from repeating steps, losing track of pending items, or missing critical updates during long processes.

How it Works

Think of this component as a state manager for your workflow. When connected to an AI agent, it automatically tracks the lifecycle of every task through three simple stages: pending, in progress, and completed. As your agent executes steps, this middleware intercepts the process to log changes, update task statuses, and adjust instructions in real time. It injects clear guidance into the agent’s prompts, ensuring it always knows what to do next without you having to manually update dashboards or check logs. The component handles all tracking logic behind the scenes, so you only see clean, organized results as your automation runs.

Inputs

Input Fields

The following fields are available to configure this component:

  • inputs: A configuration panel that holds all the settings needed to connect the middleware to your agent. It contains parameters for reading and updating task lists, accessing conversation history, and defining how progress is tracked. Adjust these settings to match your workflow’s structure.
  • System Prompt: Instructions for the agent on how to use the todo tool. Leave empty to use defaults.
  • Tool Description: Description of the write_todos tool. Leave empty to use defaults.

Outputs

This component does not return a single report. Instead, it updates the internal state of your AI agent and provides feedback on task execution. After processing, it delivers an enriched context that includes the current status of each task, confirmation of successful updates, and clear instructions for the next steps in your workflow. These outputs are automatically fed back into your agent’s decision-making process, helping it adapt its next actions based on real-time progress.

Output Data Example (JSON)json

{ “context_modified”: { “task_states”: { “task_001”: “pending”, “task_002”: “in_progress”, “task_003”: “completed” }, “tool_execution_result”: { “status”: “success”, “message”: “Task list synchronized and agent state updated successfully.”, “next_steps_guidance”: “Review pending items and proceed with the next in-progress task.” }, “agent_prompt_adjustments”: { “instruction_type”: “state_based_guidance”, “recommendation”: “Always verify task status before proceeding to the next step.” } } }

Connectivity

This component is typically placed between AI/LLM nodes and data processing or output nodes. It works best when connected to the output of an AI agent node, so it can automatically track what the agent is doing. The updated task states and execution feedback are then passed forward to downstream nodes that need to act on progress updates, log results, or trigger the next phase of automation. This creates a smooth, self-updating workflow where task management and execution happen in sync.

Usage Example

Imagine you are building an automation that helps your customer support team resolve tickets. As the AI agent reviews incoming requests, the TodoListMiddleware automatically creates a list of actions needed (e.g., “Check ticket history”, “Draft response”, “Send notification”). As the AI works through each step, the middleware updates the task status in real time. When a task is finished, the AI receives instant feedback and automatically moves to the next item. You do not need to manually update dashboards or set up complex tracking rules—the component handles the organization and progress reporting behind the scenes.

Tips and Best Practices

  • Leave the System Prompt and Tool Description fields empty unless you need highly customized AI behavior. The defaults are optimized for clear and reliable task tracking.
  • Keep task names and descriptions short and action-oriented. This helps the AI process them quickly and reduces confusion during complex workflows.
  • Use this component whenever a workflow involves more than two or three steps. It prevents the AI from skipping tasks or repeating work unnecessarily.
  • Connect it early in your automation flow. Placing it after the initial AI processing step ensures all subsequent actions are properly logged and organized.

Security Considerations

This component operates entirely within your Nappai workspace and does not require external credentials or third-party API connections. All task data and state updates are stored securely within your automation environment. To maintain security and reliability, avoid passing sensitive personal information through task fields, and rely on the built-in state validation to prevent unauthorized or accidental task modifications.