Code examples
These examples show how to do the integration tasks that come up most often with the Asgard API. Every one of them comes in cURL, JavaScript and Python.
The examples
| Example | What it does |
|---|---|
| Sending a message | Send a text message over the REST API and read the response |
| Handling a streamed response | Handle SSE events and produce a typewriter effect |
| Querying a knowledge base | Question and answer against a RAG knowledge base |
| Webhook integration | Build a webhook endpoint with an Automation Tool |
Before you start
Check that you have:
- An Asgard account with a project created
- An LLM provider API key configured (see the authentication guide)
- At least one workflow built and an app published
- The API key and the settings that go with it (namespace, bot-provider-name)