Configure and use an agent in chat
In ALIDA, an endpoint can be exposed for each agent. The BDA chat can be connected to multiple agents through these endpoints by using an environment variable that contains the relevant JSON configuration.
Before starting, make sure you have:
- A running agent.
- The agent invocation endpoint URL.
- The streaming endpoint URL, if the agent exposes one.
- The API protocol used by the endpoint.
The URLs are REST endpoints exposed by the BDA. To understand how ALIDA exposes and protects these endpoints, see I/O Ports: REST API endpoints.
Configuration fields
| Field | Meaning |
|---|---|
name |
Display or logical name of the agent. |
url |
Main endpoint used to invoke the agent. |
streamingUrl |
Endpoint used to receive streaming responses. |
protocol |
Application protocol used by the integration. |
contextPage |
ALIDA pages where the agent is available in chat. Leave it empty to make the agent available on every ALIDA page. |
extra.queryParams |
Additional request parameters. |
Configuration examples
{
"name": "Custom Coding Agent",
"url": "https://<alida-instance-url>/events/bda/<bda-id>/<service-id>",
"streamingUrl": "https://<alida-instance-url>/events/bda/streaming/<bda-id>/<service-id>",
"token": "",
"protocol": "OpenCode",
"contextPage": [
{
"path": "/services"
}
],
"extra": {
"queryParams": {
"token": "{{alida-token}}"
}
}
}
Use this configuration for any agent that exposes OpenAI-compatible APIs. The ADK Agent is one agent that integrates this type of endpoint.
{
"type": "agent",
"name": "Alida Agent",
"url": "https://<alida-instance-url>/events/bda/<bda-id>/<service-id>/v1",
"streamingUrl": "https://<alida-instance-url>/events/bda/streaming/<bda-id>/<service-id>",
"token": "",
"protocol": "OpenAI",
"contextPage": [
{
"path": "/services"
}
],
"extra": {
"queryParams": {
"token": "{{alida-token}}"
}
}
}
First request
- Go to the page specified in
contextPage, for example/services. - Open chat and make a request appropriate to that context.
- Verify the result before using or deploying the generated artifacts.