Actions

Learn how to create custom actions by making one or more APIs available to your AI agent. Actions allow agents to integrate external data or interact with the real-world, such as connecting agents to databases, plugging them into your emails, or making them your shopping assistant, all through APIs.
Actions are defined using the OpenAPI specification, which is a standard for describing APIs.

Create a new action

Navigate to Actions in the dashboard. Tap the + New button.
Enter a valid JSON OpenAPI specification into the Schema input. Note: The Authentication feature is not yet functional. This inconvenience is temporary and will become functional soon.
The code block below is an OpenAPI specification example that uses the Coindesk API to get the real-time price of Bitcoin.
1
{
2
"openapi": "3.0.1",
3
"info": {
4
"title": "CoinDesk Price Index API",
5
"description": "An API that provides the current prices for various cryptocurrencies and fiat currencies.",
6
"version": "1.0.0"
7
},
8
"servers": [
9
{
10
"url": "https://api.coindesk.com"
11
}
12
],
13
"paths": {
14
"/v1/bpi/currentprice/{symbol}.json": {
15
"get": {
16
"summary": "Get current price for a specified currency or cryptocurrency",
17
"operationId": "getCurrentPrice",
18
"parameters": [
19
{
20
"name": "symbol",
21
"in": "path",
22
"required": true,
23
"schema": {
24
"type": "string"
25
},
26
"description": "The symbol for the currency or cryptocurrency to get the price for (e.g., BTC, USD, ETH)"
27
}
28
],
29
"responses": {
30
"200": {
31
"description": "Current price for the specified currency or cryptocurrency",
32
"content": {
33
"application/json": {
34
"schema": {
35
"type": "object",
36
"properties": {
37
"time": {
38
"$ref": "#/components/schemas/Time"
39
},
40
"disclaimer": {
41
"type": "string"
42
},
43
"bpi": {
44
"type": "object",
45
"additionalProperties": {
46
"$ref": "#/components/schemas/CurrencyPrice"
47
}
48
}
49
}
50
}
51
}
52
}
53
}
54
}
55
}
56
}
57
},
58
"components": {
59
"schemas": {
60
"Time": {
61
"type": "object",
62
"properties": {
63
"updated": {
64
"type": "string",
65
"description": "Human-readable updated time"
66
},
67
"updatedISO": {
68
"type": "string",
69
"format": "date-time",
70
"description": "ISO 8601 formatted updated time"
71
},
72
"updateduk": {
73
"type": "string",
74
"description": "UK formatted updated time"
75
}
76
},
77
"required": ["updated", "updatedISO", "updateduk"]
78
},
79
"CurrencyPrice": {
80
"type": "object",
81
"properties": {
82
"code": {
83
"type": "string",
84
"description": "The currency or cryptocurrency code"
85
},
86
"rate": {
87
"type": "string",
88
"description": "The current rate in the specified currency or for the specified cryptocurrency"
89
},
90
"description": {
91
"type": "string",
92
"description": "Description of the currency or cryptocurrency"
93
},
94
"rate_float": {
95
"type": "number",
96
"description": "The rate as a floating-point number"
97
}
98
},
99
"required": ["code", "rate", "description", "rate_float"]
100
}
101
}
102
}
103
}
Tap the Save button.
You should now see the custom action you just created. Note: If the OpenAPI specification is invalid, the action will not appear.
Test and confirm your new action works as expected by chatting with your AI agent.

Troubleshooting

If you need help creating a new custom action, please consider joining our Discord community for support.
Last modified 1mo ago