Integration guide
This page strings the existing Asgard documentation into one path, from nothing to live: design a bot in Odin, publish it as a bot provider, get the credentials, and connect it to your application with the SDK. Each step links to the detailed page for it, and following them through gets you your first integration.
If you would rather look at interactive component examples, read this alongside the
integration overview on the SDK demo site, which takes the @asgard-js/react view.
1. Understand the concepts, choose an integration pattern
Decide how the application will connect to Asgard first, because it affects every step after it.
- Integration overview and how to choose: the terms, the four patterns compared, and how to decide
- The four patterns: Hosted Embed, Direct Connect, Workflow Auth, Backend Relay
2. Build the bot and the workflow in Odin
Design the conversation, from the simplest Hello up to an AI chatbot connected to an LLM.
- Building your first workflow: Hello
- Building a simple AI chatbot
- Streaming responses
3. Configure the model
Let the bot call an LLM.
- Completion model settings
- API keys for the various LLM providers
4. Publish as an integration, and get the endpoint and API key
Publish the bot you designed as a bot provider. This is the step that gives you the botProviderEndpoint
and API key the front-end SDK needs.
- Creating a generic integration (getting the endpoint and API key)
5. Manage the API key
Getting, rotating and safely storing a key, and the limits such as rate limiting.
6. Connect it to your application with the SDK
With the endpoint and credentials in hand, wire up the front end or the back end.
- SDK overview
- JavaScript SDK, Backend SDK
- Interactive examples on the SDK demo site: integration overview, quick start
7. Understand the message flow
To handle streamed responses after integrating, start from the sequence of SSE events.
- The Send Message API, with the full event flow and a sequence diagram
8. Design how the reply looks
A bot's reply is carried by a message template and rendered by the front end.
- Message Template, and the other template pages
Once you have been through this path, go back to the pattern page for the integration model you chose and read the detail of its auth, history, memory and payload.