Agents
LUMA AI agents answer your customers on your website, in your app and on WhatsApp, using the knowledge you give them (web pages, files, text) and the tools you connect (your APIs, MCP servers).
What you can do with the API
| Task | Page |
|---|---|
| List your agents and read one agent | List and get agents |
| Get a short-lived token to chat with an agent | Client token handshake |
| Ask a question and get the answer, complete or streamed | Chat with an agent |
| Put the chat bubble on your website | Widget embed code |
| Open, close and feed the widget from your page | Widget JavaScript SDK |
| Restyle the widget | Widget CSS |
| Add websites, files and text to an agent's knowledge | Knowledge |
| Read leads, take over chats, read ratings | Leads, human handoff and ratings |
| Let the agent call your API or an MCP server | Tools |
IDs you will use
| ID | Where to find it | Example placeholder |
|---|---|---|
| Project ID | GET /v1/projects (data[].project_id), or GET /v1/waba | PROJECT_ID |
Agent ID (chatbot_id) | Agent's Install page, or List agents | AGENT_ID |
| Session ID | Returned by the first chat call; send it back to continue the same conversation | SESSION_ID |
Agent IDs are opaque strings. Use them exactly as LUMA returns them.
Two ways to talk to an agent
| From | Credential | Typical use |
|---|---|---|
| The LUMA widget, your own chat window, a mobile app | Agent client token from the handshake (the widget gets it itself; your server gets it for your own chat window) | Websites and apps |
| Your server | Agent client token, or your API key | Back-office automation, other channels (SMS, your own app backend) |
Credits: 60 per AI answer. Knowledge training: 250 per file or web page.