Overview
The Conversational Agent is Podium’s AI-powered shopping companion engine. It gives developers two endpoints — synchronous and streaming — that turn a user message into an intelligent, context-aware conversation with access to the full commerce stack. The agent:- Knows the user — loads their intent profile, interaction history, and conversation memory before every turn
- Uses tools — can search products, get recommendations, record interactions, update profiles, and create orders mid-conversation
- Streams responses — delivers progressive text deltas, tool execution events, and product cards over Server-Sent Events
- Remembers everything — persistent conversation history with automatic summarization keeps context across sessions
- Is configurable — persona, tone, rules, enabled tools, and model are all overridable per request
Endpoints
Both endpoints share the same request body.
Request Schema
Synchronous Response
POST /companion/agent/chat returns a complete JSON response after the agent finishes thinking, executing tools, and composing its reply.
Streaming Response
POST /companion/agent/chat/stream returns a text/event-stream with progressive events as the agent works.
Event Types
Where
spendSummary is: { dailySpent: number, dailyLimit: number, txMax: number }
SSE Client Example
Built-in Tools
The agent has access to 7 commerce tools that map directly to Podium API operations. Each tool is callable by the AI during conversation — no developer code needed.Tool Selection
By default, all tools are enabled. Restrict the tool set per request to control what the agent can do:- Browse-only mode: Enable only
search_productsandget_recommendations - Profile-building mode: Enable
update_profileandrecord_interaction - Full commerce mode: Enable all tools including
create_order
Conversational Order Flow
When a user expresses purchase intent, the agent uses a multi-turn state machine to collect the required information: The order state persists across messages, so the user can provide information across multiple turns naturally.Memory & Context
Persistent History
Every conversation turn (user message + agent response) is stored in persistent memory. On each new message, the agent loads:- Intent profile — the user’s preferences, constraints, avoidances, and behavioral signals
- Conversation history — recent messages (up to
maxHistoryturns) - Conversation summary — a compressed summary of older conversations
- Agent state — any in-progress workflows (e.g., pending orders)
Automatic Summarization
Summary extraction happens automatically at conversation milestones:
When summarization triggers, Podium:
- Generates a summary of older messages
- Trims the history to keep only recent turns
- Stores the summary for future context
Agent Summary → Intent Profile
Summaries are stored on the user’s intent profile (agentSummary field), making conversation insights available to other parts of the platform — recommendations, the agentic product feed, and downstream analytics.
Memory is also stored as a structured AgentMemory object on the user’s profile. This structured memory — preferences, goals, concerns, avoidances, products tried, and category-aware price ranges — feeds directly into recommendation scoring, reason tag generation, and proactive nudges. See Memory & Intelligence for the full schema and scoring details.
Personas
Configure the agent’s identity and behavior per request:
Different verticals can share the same agent infrastructure with entirely different personalities and expertise.
Proactive Nudges
Beyond reactive conversations, Podium’s agent can proactively re-engage users through scheduled nudges. The nudge system runs as a background cron job and generates personalized outreach based on user signals.Nudge Types
How It Works
- User selection — the system identifies users eligible for nudges based on activity signals (days since last conversation, profile completeness, recent purchases)
- Signal gathering — for each eligible user, the system collects their profile, loved products, recent purchases, conversation summary, and profile gaps
- Nudge generation — AI generates a personalized, contextual message using the user’s full signal set
- Delivery — the nudge is published to configured channels (Telegram, email, push) and logged
- History integration — nudge messages are appended to the conversation history so the agent has full context if the user replies
nudgeType for analytics.
Quick-Reply Chips
The agent can suggest contextual quick-reply options to keep the conversation flowing. Chips are returned in thedone event:
Quick replies are suggestions, not constraints — the user can always type a freeform message instead.
Durable Chat History
Conversations are persisted to durable storage. You can retrieve a user’s full chat history for display in your UI or for analytics:Response
History is ordered newest-first. Page backward through the conversation by passing the last message’s
id as the before parameter.
Purchase Mode & Spend Controls
The agent classifies each product by purchase mode, determining how the transaction is executed:Spend Controls
Forx402_platform purchases, the agent enforces spend limits to protect users:
Purchase flow:
- User expresses purchase intent
- Agent resolves the product’s purchase mode
- For
x402_platform— agent checks spend limits and emitsconfirmation_requiredwith product details and current spend summary - User confirms → agent executes the purchase
- If limits would be exceeded → agent emits
spend_limit_exceededwith the reason and reset timing

