Add an AI agent that remembers your users, with one REST call
Most "add AI to your support" tutorials stop at a chat completion. The model answers, and then you discover the real work: remembering who the user is between messages, answering from your documents instead of the internet, knowing when a message is a hot lead, booking a slot without double-booking

Most "add AI to your support" tutorials stop at a chat completion. The model answers, and then you discover the real work: remembering who the user is between messages, answering from your documents instead of the internet, knowing when a message is a hot lead, booking a slot without double-booking, and not charging twice when your client retries a request.
We built all of that for our own product, an AI agent that answers customers on WhatsApp, Instagram, Messenger, Telegram, email and website chat. The same engine is available as a REST API, so you can run it inside your own app without any of those channels. This post shows what one call looks like and what comes back.
curl https://api.waslo.io/v1/agent/reply \ -H "Authorization: Bearer wsk_live_..." \ -H "Content-Type: application/json" \ -H "Idempotency-Key: 8f1c2e40-msg-001" \ -d '{ "message": "Do you have a morning slot on Thursday?", "userId": "customer_8842", "tools": ["calendar"] }' Enter fullscreen mode Exit fullscreen mode Three fields matter:
{ "reply": "Yes, Thursday at 9:30 or 11:00 is free. Which one suits you?", "classification": "HOT", "citations": [ { "documentName": "opening-hours.pdf", "preview": "Thursday 09:00–13:00..." } ], "usage": { "credits_charged": 3, "credits_remaining": 597 }, "request_id": "req_..." } Enter fullscreen mode Exit fullscreen mode reply is ready to show. It already used the user's history and your knowledge base. classification scores the lead HOT, WARM or COLD on every turn (or with your own stage names, if you set them), so your app can route a hot conversation to a person straight away.
If you define your own topic labels, a topic field comes back too. citations tell you which of your documents the answer came from. That is useful for debugging and for showing users where an answer came from. usage tells you what the call cost and what is left. No surprise invoices.
Teaching it about your business The agent answers from documents you upload. That can be price lists, FAQs, policies or product sheets:
curl https://api.waslo.io/v1/kb/documents \ -H "Authorization: Bearer wsk_live_..." \ -F "file=@pricing-faq.pdf" \ -F "name=Pricing FAQ" Enter fullscreen mode Exit fullscreen mode GET /v1/kb/documents lists them and DELETE /v1/kb/documents/:id removes one. The same workspace is visible in the Waslo dashboard, so a non-technical teammate can add documents there and your code sees them immediately.
If you sell products, /v1/catalog lets you list, create, update and delete items in the catalogue the agent sells from, including photos and PDFs it can send.
Every remembered fact about a user is readable and deletable:
# what does the agent remember about this user? curl https://api.waslo.io/v1/memory/customer_8842 \ -H "Authorization: Bearer wsk_live_..." # forget them (privacy request, test cleanup, account deletion) curl -X DELETE https://api.waslo.io/v1/memory/customer_8842 \ -H "Authorization: Bearer wsk_live_..." Enter fullscreen mode Exit fullscreen mode Being able to delete memory with one call matters more than it sounds. It is what you need when a user asks you to forget them.
PUT /v1/config sets the agent's system prompt and behaviour persistently. You can also pass systemPrompt on a single request with promptMode: "append" or "replace".
replyLanguage is the setting people ask about most. "auto" answers each user in the language they wrote in. A code like "es" or "ar" always answers in that language.
The API bills credits per call: 2 for a text reply, 3 when it used a tool, 5 when it read media, plus 2 for voice output. A standalone classification is 1 credit. New accounts start with 75 free credits, enough to build and test an integration before paying anything. API credit packs start at $49 for 5,000 credits.
If all you want is an AI agent on WhatsApp or Instagram, you don't need the API. Connecting the channel in the dashboard takes a few minutes. The API is for when the conversation happens inside your product: a SaaS that wants an assistant for its own customers, an agency running agents for clients, or a team that wants lead scoring and knowledge-base retrieval without building them.
Create a key in the developer portal at waslo.io/developers. The full reference is in the Agent API docs.
If you build something with it, I'd like to hear what broke first. That's usually the most useful feedback we get.