WhatsApp Chat Agent with Tool Delegation
WhatsApp-based AI agent that processes incoming messages, maintains short-term context, and delegates tasks to external tools.
This workflow exposes an AI agent through a WhatsApp Business Cloud interface and serves as a conversational entry point for users over WhatsApp. Incoming messages trigger the workflow and are forwarded directly to the agent for interpretation.
The agent uses a chat model for language understanding and decision-making, supported by a window-based memory component that retains recent conversational context. This allows the agent to handle follow-up questions without maintaining long-term state.
Based on the resolved intent, the agent can either respond directly or delegate execution to connected tools. Available tools include a Wikipedia lookup for factual queries and a calculator for basic arithmetic operations. Tool usage is explicit and controlled, keeping reasoning separate from execution.
Once a response has been generated or tool results have been processed, the final message is sent back to the user via the WhatsApp Business Cloud API. The workflow is intentionally minimal, focusing on clean message handling, predictable behavior, and extensibility rather than complex orchestration.
