Skip to main content
This guide walks you through embedding the chat widget on your site and sending your first message.

Prerequisites

  • An Agentic Trust account with a project created in the dashboard
  • Your API key (lum_pk_...) from the project settings page

Embed the widget

1

Add the script tag

Include the widget script in your HTML:
<script src="https://platform.agentictrust.com/widget.js"></script>
2

Initialize the widget

Call initAsync with your project credentials:
<script>
  AgenticTrust.initAsync({
    apiUrl: "https://platform.agentictrust.com/api/v1",
    apiKey: "lum_pk_your_api_key"
  });
</script>
The widget bubble appears in the bottom-right corner of your page.
3

Test it out

Click the widget bubble and send a message. If you’ve added knowledge sources in the dashboard, the agent will answer from your content.

Send a message via the API

You can also interact with the agent programmatically.
1

Create a conversation

curl -X POST "https://platform.agentictrust.com/api/v1/chat/conversations" \
  -H "x-api-key: lum_pk_your_api_key" \
  -H "Content-Type: application/json" \
  -d '{"endUserExternalId": "user-42"}'
Save the conversationId from the response.
2

Stream a response

curl -N -X POST "https://platform.agentictrust.com/api/v1/chat/messages" \
  -H "x-api-key: lum_pk_your_api_key" \
  -H "Content-Type: application/json" \
  -d '{
    "conversationId": "conv_abc123",
    "messages": [{"role": "user", "content": "Hello, how can I reset my password?"}]
  }'
The response streams back as Server-Sent Events.

What’s next

Knowledge Base

Upload documents and crawl websites so the agent answers from your content.

Custom Actions

Let the agent call your APIs to take actions on behalf of users.

Widget Configuration

Customize the widget appearance, position, and color scheme.

Identity Verification

Secure your agent with HMAC or JWT identity verification.