Skip to main content
Common integration examples and snippets for the Asgard API

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​

ExampleWhat it does
Sending a messageSend a text message over the REST API and read the response
Handling a streamed responseHandle SSE events and produce a typewriter effect
Querying a knowledge baseQuestion and answer against a RAG knowledge base
Webhook integrationBuild a webhook endpoint with an Automation Tool

Before you start​

Check that you have:

  1. An Asgard account with a project created
  2. An LLM provider API key configured (see the authentication guide)
  3. At least one workflow built and an app published
  4. The API key and the settings that go with it (namespace, bot-provider-name)