@lumavox/server 0.40.0 → 0.45.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +1 -1
- package/dist/gen/index.d.ts +1 -1
- package/dist/gen/types.gen.d.ts +1505 -127
- package/dist/resources/agents.d.ts +32 -1
- package/dist/resources/agents.js +19 -0
- package/package.json +1 -1
package/dist/gen/types.gen.d.ts
CHANGED
|
@@ -165,6 +165,10 @@ export type EphemeralKeyCreateResponse = {
|
|
|
165
165
|
*/
|
|
166
166
|
settled_at: string | null;
|
|
167
167
|
active: boolean;
|
|
168
|
+
/**
|
|
169
|
+
* A test chat's key: its conversations run the agent's unpublished draft, and only it sees them. See `draft` on the mint.
|
|
170
|
+
*/
|
|
171
|
+
draft: boolean;
|
|
168
172
|
/**
|
|
169
173
|
* The token, in full. **Shown once**: it is signed rather than stored, so it cannot be shown again.
|
|
170
174
|
*/
|
|
@@ -181,6 +185,10 @@ export type EphemeralKeyCreateRequest = {
|
|
|
181
185
|
agent_ids?: Array<string> | null;
|
|
182
186
|
label?: string | null;
|
|
183
187
|
overrides?: EphemeralKeyOverrides | null;
|
|
188
|
+
/**
|
|
189
|
+
* A test chat's key: its conversations run the agent's unpublished draft (`PATCH /v1/agents/{agent_id}/draft`) — the live agent where nothing is pending — so you can try changes before players get them. It opens, lists, reads and connects to its own test chats only, and no other key ever sees one. Minted only with a key holding `agent:write`, and pinned to exactly one agent in `agent_ids`. Its conversations' reports and messages the agent writes first are posted with `test: true`. Your organisation pays for its turns, as for any key.
|
|
190
|
+
*/
|
|
191
|
+
draft?: boolean;
|
|
184
192
|
};
|
|
185
193
|
/**
|
|
186
194
|
* What this key changes for the conversations it talks in: the language, the voice, the opening line and extra instructions. Signed into the key, so the person's app cannot change them; never the model. A key whose overrides make it longer than 16,384 characters is a 422 — text in scripts of 3 or 4 bytes a character, at every maximum.
|
|
@@ -252,6 +260,10 @@ export type EphemeralKeyInfo = {
|
|
|
252
260
|
*/
|
|
253
261
|
settled_at: string | null;
|
|
254
262
|
active: boolean;
|
|
263
|
+
/**
|
|
264
|
+
* A test chat's key: its conversations run the agent's unpublished draft, and only it sees them. See `draft` on the mint.
|
|
265
|
+
*/
|
|
266
|
+
draft: boolean;
|
|
255
267
|
};
|
|
256
268
|
export type TokenSelf = ({
|
|
257
269
|
kind: 'ephemeral';
|
|
@@ -1316,6 +1328,10 @@ export type SessionDetail = {
|
|
|
1316
1328
|
title: string | null;
|
|
1317
1329
|
turn_seq: number;
|
|
1318
1330
|
updated_at: string;
|
|
1331
|
+
/**
|
|
1332
|
+
* A test chat: opened with a draft key (`draft` on `POST /v1/ephemeral-keys`), it runs the agent's unpublished draft, and only draft keys see it — never a player's.
|
|
1333
|
+
*/
|
|
1334
|
+
draft: boolean;
|
|
1319
1335
|
messages: MessagePage;
|
|
1320
1336
|
/**
|
|
1321
1337
|
* How this agent stands with this person, as the conversation opens.
|
|
@@ -1376,6 +1392,10 @@ export type MessageInfo = {
|
|
|
1376
1392
|
* The agent that had the conversation when this was said: the conversation's own, or — after one agent handed it to another — the one that had it then. A person's message names the agent that answered it.
|
|
1377
1393
|
*/
|
|
1378
1394
|
agent_id: string;
|
|
1395
|
+
/**
|
|
1396
|
+
* On a reply: the agent's [version](/agents/versions) that wrote it — v5 is `5` — so you can tell which version said what. Null on the person's messages, and on a reply written before versions.
|
|
1397
|
+
*/
|
|
1398
|
+
agent_version: number | null;
|
|
1379
1399
|
/**
|
|
1380
1400
|
* On a reply: the web pages it read, with the agent's `url_context` switch on. Empty when it read none, and on the person's messages.
|
|
1381
1401
|
*/
|
|
@@ -1612,6 +1632,10 @@ export type SessionInfo = {
|
|
|
1612
1632
|
title: string | null;
|
|
1613
1633
|
turn_seq: number;
|
|
1614
1634
|
updated_at: string;
|
|
1635
|
+
/**
|
|
1636
|
+
* A test chat: opened with a draft key (`draft` on `POST /v1/ephemeral-keys`), it runs the agent's unpublished draft, and only draft keys see it — never a player's.
|
|
1637
|
+
*/
|
|
1638
|
+
draft: boolean;
|
|
1615
1639
|
};
|
|
1616
1640
|
export type CompactionInfo = {
|
|
1617
1641
|
/**
|
|
@@ -2162,11 +2186,21 @@ export type AgentSummary = {
|
|
|
2162
2186
|
* Speech is generated after the reply and adds its own latency — roughly a fifth of the spoken duration. A caller can override this per turn with `speech` on the socket's `user_message` or `user_audio.start`.
|
|
2163
2187
|
*/
|
|
2164
2188
|
voice_enabled: boolean;
|
|
2189
|
+
/**
|
|
2190
|
+
* The sections of this agent's settings it takes from your organisation's `agent_defaults` (`GET /v1/agents/settings`) instead of its own: the complete list, `null` or `[]` for none.
|
|
2191
|
+
*
|
|
2192
|
+
* A new agent follows every section you did not set when you made it. An agent made before this existed follows none until you say so.
|
|
2193
|
+
*
|
|
2194
|
+
* Sending a value that differs from what a followed section runs with customises that section: the organisation's values are copied onto the agent and your change laid over them. Sending the value it already runs with changes nothing. Naming a section here and sending a different value for one of its fields in the same request is a 422.
|
|
2195
|
+
*
|
|
2196
|
+
* Every field of a followed section is answered as the agent runs it. Always answered: `[]` for none.
|
|
2197
|
+
*/
|
|
2198
|
+
org_defaults: Array<'model' | 'voice' | 'hearing' | 'emotion' | 'relationship' | 'knowledge' | 'builtin_tools' | 'compaction' | 'facts' | 'memories' | 'reports' | 'outreach' | 'safety'>;
|
|
2165
2199
|
id: string;
|
|
2166
2200
|
created_at: string;
|
|
2167
2201
|
updated_at: string;
|
|
2168
2202
|
/**
|
|
2169
|
-
*
|
|
2203
|
+
* The agent's version — v5 is `5`. **Every change players see makes the next one**: a save that changes something, its tools or knowledge entries assigned, a version restored; a save that changes nothing leaves it. Its history is `GET /v1/agents/{agent_id}/versions`. Send it back as `expected_version` on an update to have the save refused (409) if the agent changed since you read it.
|
|
2170
2204
|
*/
|
|
2171
2205
|
version: number;
|
|
2172
2206
|
/**
|
|
@@ -2569,11 +2603,21 @@ export type AgentInfo = {
|
|
|
2569
2603
|
* Speech is generated after the reply and adds its own latency — roughly a fifth of the spoken duration. A caller can override this per turn with `speech` on the socket's `user_message` or `user_audio.start`.
|
|
2570
2604
|
*/
|
|
2571
2605
|
voice_enabled: boolean;
|
|
2606
|
+
/**
|
|
2607
|
+
* The sections of this agent's settings it takes from your organisation's `agent_defaults` (`GET /v1/agents/settings`) instead of its own: the complete list, `null` or `[]` for none.
|
|
2608
|
+
*
|
|
2609
|
+
* A new agent follows every section you did not set when you made it. An agent made before this existed follows none until you say so.
|
|
2610
|
+
*
|
|
2611
|
+
* Sending a value that differs from what a followed section runs with customises that section: the organisation's values are copied onto the agent and your change laid over them. Sending the value it already runs with changes nothing. Naming a section here and sending a different value for one of its fields in the same request is a 422.
|
|
2612
|
+
*
|
|
2613
|
+
* Every field of a followed section is answered as the agent runs it. Always answered: `[]` for none.
|
|
2614
|
+
*/
|
|
2615
|
+
org_defaults: Array<'model' | 'voice' | 'hearing' | 'emotion' | 'relationship' | 'knowledge' | 'builtin_tools' | 'compaction' | 'facts' | 'memories' | 'reports' | 'outreach' | 'safety'>;
|
|
2572
2616
|
id: string;
|
|
2573
2617
|
created_at: string;
|
|
2574
2618
|
updated_at: string;
|
|
2575
2619
|
/**
|
|
2576
|
-
*
|
|
2620
|
+
* The agent's version — v5 is `5`. **Every change players see makes the next one**: a save that changes something, its tools or knowledge entries assigned, a version restored; a save that changes nothing leaves it. Its history is `GET /v1/agents/{agent_id}/versions`. Send it back as `expected_version` on an update to have the save refused (409) if the agent changed since you read it.
|
|
2577
2621
|
*/
|
|
2578
2622
|
version: number;
|
|
2579
2623
|
};
|
|
@@ -2882,6 +2926,14 @@ export type AgentCreateRequest = {
|
|
|
2882
2926
|
* Speech is generated after the reply and adds its own latency — roughly a fifth of the spoken duration. A caller can override this per turn with `speech` on the socket's `user_message` or `user_audio.start`.
|
|
2883
2927
|
*/
|
|
2884
2928
|
voice_enabled?: boolean | null;
|
|
2929
|
+
/**
|
|
2930
|
+
* The sections of this agent's settings it takes from your organisation's `agent_defaults` (`GET /v1/agents/settings`) instead of its own: the complete list, `null` or `[]` for none.
|
|
2931
|
+
*
|
|
2932
|
+
* A new agent follows every section you did not set when you made it. An agent made before this existed follows none until you say so.
|
|
2933
|
+
*
|
|
2934
|
+
* Sending a value that differs from what a followed section runs with customises that section: the organisation's values are copied onto the agent and your change laid over them. Sending the value it already runs with changes nothing. Naming a section here and sending a different value for one of its fields in the same request is a 422.
|
|
2935
|
+
*/
|
|
2936
|
+
org_defaults?: Array<'model' | 'voice' | 'hearing' | 'emotion' | 'relationship' | 'knowledge' | 'builtin_tools' | 'compaction' | 'facts' | 'memories' | 'reports' | 'outreach' | 'safety'> | null;
|
|
2885
2937
|
};
|
|
2886
2938
|
export type AgentReportField = {
|
|
2887
2939
|
/**
|
|
@@ -3024,224 +3076,1209 @@ export type AgentSettingsInfo = {
|
|
|
3024
3076
|
* Every mood label the gateway accepts. A reply reporting anything else is stored with no mood rather than with a made-up one, so an overridden instruction should name these.
|
|
3025
3077
|
*/
|
|
3026
3078
|
moods: Array<string>;
|
|
3079
|
+
agent_defaults: AgentDefaults;
|
|
3080
|
+
agents_following: AgentsFollowing;
|
|
3027
3081
|
};
|
|
3028
|
-
|
|
3082
|
+
/**
|
|
3083
|
+
* What an agent following a section of `org_defaults` runs with, instead of its own. A field left unset is what a new agent has. The instructions and the chunk schedule are `default_*` beside this.
|
|
3084
|
+
*
|
|
3085
|
+
* **A change reaches every agent following that section at once**, with no draft to try it in, within about a minute.
|
|
3086
|
+
*/
|
|
3087
|
+
export type AgentDefaults = {
|
|
3029
3088
|
/**
|
|
3030
|
-
*
|
|
3089
|
+
* Gemini model id.
|
|
3031
3090
|
*/
|
|
3032
|
-
|
|
3091
|
+
model: string | null;
|
|
3033
3092
|
/**
|
|
3034
|
-
*
|
|
3093
|
+
* How hard the model thinks before answering. `minimal` is fastest to first token; `medium` is the model's own default. Unset means the model decides.
|
|
3035
3094
|
*/
|
|
3036
|
-
|
|
3095
|
+
thinking_level: 'minimal' | 'low' | 'medium' | 'high' | null;
|
|
3037
3096
|
/**
|
|
3038
|
-
*
|
|
3097
|
+
* Whether a readable summary of the reasoning is returned.
|
|
3039
3098
|
*/
|
|
3040
|
-
|
|
3099
|
+
thinking_summaries: 'auto' | 'none' | null;
|
|
3041
3100
|
/**
|
|
3042
|
-
*
|
|
3101
|
+
* Cap on reply length. Unset means the model's own limit.
|
|
3043
3102
|
*/
|
|
3044
|
-
|
|
3103
|
+
max_output_tokens: number | null;
|
|
3045
3104
|
/**
|
|
3046
|
-
*
|
|
3105
|
+
* Whether replies come back as audio as well as text.
|
|
3106
|
+
*
|
|
3107
|
+
* Speech is generated after the reply and adds its own latency — roughly a fifth of the spoken duration. A caller can override this per turn with `speech` on the socket's `user_message` or `user_audio.start`.
|
|
3047
3108
|
*/
|
|
3048
|
-
|
|
3109
|
+
voice_enabled: boolean | null;
|
|
3049
3110
|
/**
|
|
3050
|
-
*
|
|
3051
|
-
*
|
|
3052
|
-
* A conversation continued inside this window gets no fresh opening line, because re-greeting somebody who refreshed the page thirty seconds ago is worse than silence — and costs a model call and a speech call to be worse. Continued outside it, the agent says hello again, which is what a `first_message` direction reading "say hello and catch up with them" is asking for.
|
|
3111
|
+
* Voice and model settings.
|
|
3053
3112
|
*
|
|
3054
|
-
* **
|
|
3113
|
+
* **A speaking agent speaks on `eleven_flash_v2_5` or `eleven_multilingual_v2` with an ElevenLabs voice, and on `inworld-tts-2-flash` or `inworld-tts-2` with an Inworld one** — unset, the voice's provider's fastest — with any voice from `GET /v1/voices` that offers it. `eleven_v3` is refused with 422 when `voice_enabled` is true: it cannot stream over the socket agents use. An agent that does not speak may leave this unset.
|
|
3114
|
+
*/
|
|
3115
|
+
voice_config: AgentVoiceInfo | null;
|
|
3116
|
+
/**
|
|
3117
|
+
* How a spoken turn is transcribed — the model, the language hint, and the sample rate a client sends PCM at on `/v1/agent/stream`. Only what you set is stored: a model left unset follows the platform's default.
|
|
3055
3118
|
*
|
|
3056
|
-
*
|
|
3119
|
+
* **Defaults, not policy.** `user_audio.start` may name any of these per turn and what it names wins. There is no switch for hearing, and no scope of its own: a credential that may talk to an agent may speak to it, exactly as it has always been able to hear it speak back.
|
|
3057
3120
|
*/
|
|
3058
|
-
|
|
3121
|
+
stt_config: AgentSttInfo | null;
|
|
3059
3122
|
/**
|
|
3060
|
-
*
|
|
3123
|
+
* Whether the model reports its own mood — one line in front of each reply, which is taken off the reply and sent as the socket's `mood` event, and kept on each stored message.
|
|
3124
|
+
*
|
|
3125
|
+
* Costs about six output tokens per turn and no extra model call. The reply text you are handed does not contain the line: a marker with a known label, or with an intensity, or alone on its own line is always removed, and only a marker with an unknown label, no intensity and prose on the same line is left — at that point it cannot be told from a sentence that happens to start with the word.
|
|
3061
3126
|
*/
|
|
3062
|
-
|
|
3127
|
+
emotion_enabled: boolean | null;
|
|
3063
3128
|
/**
|
|
3064
|
-
*
|
|
3129
|
+
* Whether the agent keeps a standing relationship with each person it talks to — warmth, trust and how well they know each other, carried across every conversation with that end user and never forgotten.
|
|
3065
3130
|
*
|
|
3066
|
-
*
|
|
3131
|
+
* Turning this on declares a tool the model calls when something changes its view of them. **It adds no latency to an ordinary turn**: the provider returns the reply and the tool call together, and the call is answered on the next turn. The one exception is a reply that is only the call with no words in it, which costs a second model call to write them.
|
|
3067
3132
|
*
|
|
3068
|
-
*
|
|
3133
|
+
* Read it with `GET /v1/agent/relations`.
|
|
3069
3134
|
*/
|
|
3070
|
-
|
|
3071
|
-
};
|
|
3072
|
-
export type WebhookSecret = {
|
|
3135
|
+
relation_enabled: boolean | null;
|
|
3073
3136
|
/**
|
|
3074
|
-
*
|
|
3137
|
+
* Whether the agent may use the knowledge entries assigned to it. **Defaults to on**, unlike the other switches here: knowledge works as soon as an entry is assigned, and this only takes it away again.
|
|
3138
|
+
*
|
|
3139
|
+
* Off, the entries are not listed in the system instruction and the `search_knowledge` tool is not declared, so the agent answers as though it had none. **Nothing is deleted or unassigned** — turning it back on restores exactly what was there, which is what makes this the way to try an agent without its reference material.
|
|
3140
|
+
*
|
|
3141
|
+
* Assign entries with `PUT /v1/agents/{agent_id}/knowledge`.
|
|
3075
3142
|
*/
|
|
3076
|
-
|
|
3143
|
+
knowledge_enabled: boolean | null;
|
|
3077
3144
|
/**
|
|
3078
|
-
*
|
|
3145
|
+
* How the agent reads its knowledge. `auto` (the default, and what unset means) puts the whole text in the prompt while it fits the platform's `agents.knowledge.inline_budget_tokens` — no lookup, nothing to miss — and looks it up beyond that. `prompt` puts it in the prompt up to the platform's `agents.knowledge.prompt_cap_tokens` (each turn's first word is slower the more there is). `lookup` always looks it up. Both are on `GET /v1/platform/limits`.
|
|
3079
3146
|
*/
|
|
3080
|
-
|
|
3081
|
-
};
|
|
3082
|
-
export type AgentUpdate = {
|
|
3147
|
+
knowledge_mode: 'auto' | 'prompt' | 'lookup' | null;
|
|
3083
3148
|
/**
|
|
3084
|
-
*
|
|
3085
|
-
*
|
|
3086
|
-
* A conversation is over when the app sends `end` on the socket, or after five minutes with no turn; a person who comes back later gets a new report of only the new part. Read reports with `GET /v1/end-users/{end_user_id}/reports`.
|
|
3149
|
+
* When knowledge is looked up: search before every reply and hand the model what matches, so it never answers from memory what its material says. **On by default.** Off, the model searches only when it decides to, which is slower when it does and wrong more often when it does not.
|
|
3087
3150
|
*/
|
|
3088
|
-
|
|
3151
|
+
knowledge_lookup_first: boolean | null;
|
|
3089
3152
|
/**
|
|
3090
|
-
*
|
|
3153
|
+
* Pieces of material a lookup hands the model, 1-8. Unset is the platform's `agents.knowledge.default_results` (`GET /v1/platform/limits`).
|
|
3091
3154
|
*/
|
|
3092
|
-
|
|
3155
|
+
knowledge_max_results: number | null;
|
|
3093
3156
|
/**
|
|
3094
|
-
*
|
|
3157
|
+
* Whether the model may read a web page by its address while it replies, when the person gives one or one is in its instructions. Gemini's own tool: the page is fetched by Google. The pages it read come back as the reply's `sources`.
|
|
3158
|
+
*
|
|
3159
|
+
* **No fee, but not free**: a page's text is model tokens, billed like any reply — a long page can be thousands. A page is untrusted input: what it says reaches the model, so the most it can steer the agent towards is the agent's own tools, and a tool marked `ask_first` still needs the person.
|
|
3095
3160
|
*/
|
|
3096
|
-
|
|
3161
|
+
url_context: boolean | null;
|
|
3097
3162
|
/**
|
|
3098
|
-
*
|
|
3163
|
+
* Whether the model may write and run Python while it replies — sums, unit conversions, dates — and answer from what it printed. Gemini's own tool: it runs at Google, with no network, and nothing of yours.
|
|
3164
|
+
*
|
|
3165
|
+
* **No fee, but not free**: the code and its output are model tokens, billed like any reply.
|
|
3099
3166
|
*/
|
|
3100
|
-
|
|
3167
|
+
code_execution: boolean | null;
|
|
3101
3168
|
/**
|
|
3102
|
-
*
|
|
3169
|
+
* Compact automatically once a reply's first model call reads this many tokens — the conversation, its summary and the instruction, without the inline knowledge or the turn's looked-up passages, which no summary shrinks. Tool results do not count. Unset uses the platform's default, `agents.memory.compaction.default_threshold_tokens` on the Limits page. At most 200,000, and at least twice what the instruction costs on its own. `POST /v1/agent/sessions/{id}/compact` works whatever it is.
|
|
3103
3170
|
*/
|
|
3104
|
-
|
|
3171
|
+
compact_threshold_tokens: number | null;
|
|
3105
3172
|
/**
|
|
3106
|
-
*
|
|
3173
|
+
* Model for the summarising call. Unset uses the agent's own. A compaction only summarises: facts are a call of their own (`fact_model`).
|
|
3107
3174
|
*/
|
|
3108
|
-
|
|
3175
|
+
compact_model: string | null;
|
|
3109
3176
|
/**
|
|
3110
|
-
*
|
|
3177
|
+
* Thinking level for the summarising call.
|
|
3111
3178
|
*/
|
|
3112
|
-
|
|
3179
|
+
compact_thinking_level: 'minimal' | 'low' | 'medium' | 'high' | null;
|
|
3113
3180
|
/**
|
|
3114
|
-
*
|
|
3181
|
+
* Length cap on the summary, in tokens — the model's thinking included, which shares the budget. Unset uses the platform's `agents.memory.compaction.max_output_tokens` on the Limits page.
|
|
3115
3182
|
*/
|
|
3116
|
-
|
|
3183
|
+
compact_max_output_tokens: number | null;
|
|
3117
3184
|
/**
|
|
3118
|
-
*
|
|
3185
|
+
* Model for reading a conversation for facts — the reading after a conversation goes quiet, and `POST /v1/agent/sessions/{id}/extract`. Unset uses the agent's own. Never compaction's: the two are separate calls.
|
|
3119
3186
|
*/
|
|
3120
|
-
|
|
3187
|
+
fact_model: string | null;
|
|
3121
3188
|
/**
|
|
3122
|
-
*
|
|
3123
|
-
*
|
|
3124
|
-
* `kids` and `teens` add the platform's rules for that age to the agent's instructions — nothing frightening, sexual or unkind for a child; nothing graphic or encouraging harm for a teenager — and turn on the model provider's own safety filters for that age. When the person brings up something the rules keep the agent from, it stays in character and changes the subject. The rules and the filters' levels are in the Safety guide, word for word. No extra model call, and no wait: they ride on the request each reply already makes.
|
|
3189
|
+
* Thinking level for the facts reading. Unset sends none, so the model's own default applies.
|
|
3125
3190
|
*/
|
|
3126
|
-
|
|
3191
|
+
fact_thinking_level: 'minimal' | 'low' | 'medium' | 'high' | null;
|
|
3127
3192
|
/**
|
|
3128
|
-
*
|
|
3193
|
+
* Length cap on a facts reading's answer, in tokens — the model's thinking included, which shares the budget. Unset sends none: the answer is a short list by its shape.
|
|
3129
3194
|
*/
|
|
3130
|
-
|
|
3195
|
+
fact_max_output_tokens: number | null;
|
|
3131
3196
|
/**
|
|
3132
|
-
*
|
|
3197
|
+
* The most of the person's facts put in front of the model, 1-100. Unset is as many as fit in the platform's `agents.memory.recall.budget_chars` (`GET /v1/platform/limits`; 6,000 characters is some 1,500 tokens). When they do not all fit, the ones a conversation confirmed or learnt most recently go in. They are prompt tokens on every turn.
|
|
3133
3198
|
*/
|
|
3134
|
-
|
|
3199
|
+
max_facts: number | null;
|
|
3135
3200
|
/**
|
|
3136
|
-
*
|
|
3201
|
+
* Whether this agent remembers facts about the people it talks to. **On by default**, unlike most switches here.
|
|
3202
|
+
*
|
|
3203
|
+
* Off, its conversations are never read for facts and its turns recall none — nothing is charged for either — and `POST /v1/agent/sessions/{id}/extract` is refused. Facts already stored stay, and other agents still recall the ones they share. Turning it back on reads only what is said from then on.
|
|
3137
3204
|
*/
|
|
3138
|
-
|
|
3205
|
+
facts_enabled: boolean | null;
|
|
3139
3206
|
/**
|
|
3140
|
-
*
|
|
3207
|
+
* Whose facts this agent sees and adds to. `person` (the default, and what unset means): what any of your agents learnt about the person that shares. `agent`: its own only — what it learns is not recalled by your other agents, and it does not recall theirs.
|
|
3141
3208
|
*
|
|
3142
|
-
* A
|
|
3209
|
+
* A change applies to what it learns from then on: a fact keeps the scope it was learnt under.
|
|
3143
3210
|
*/
|
|
3144
|
-
|
|
3211
|
+
facts_scope: 'person' | 'agent' | null;
|
|
3145
3212
|
/**
|
|
3146
|
-
*
|
|
3213
|
+
* Whether this agent keeps **memories** of the people it talks to — one per topic of their life, rewritten whenever a conversation comes back to it. **On by default**, as `facts_enabled`.
|
|
3214
|
+
*
|
|
3215
|
+
* Once a conversation has been quiet for the platform's `agents.memory.idle_minutes`, it is read for the topics worth keeping, after its facts, in a model call of its own charged to the key; a conversation in which the person said little is read for nothing and costs nothing. Off, its conversations are never read for memories. Memories already kept stay.
|
|
3147
3216
|
*/
|
|
3148
|
-
|
|
3217
|
+
memories_enabled: boolean | null;
|
|
3149
3218
|
/**
|
|
3150
|
-
*
|
|
3219
|
+
* Whose memories this agent sees and adds to. `person` (the default, and what unset means): every agent of yours that shares, so the topic one agent started another continues. `agent`: its own only. A memory keeps the scope it was made under.
|
|
3151
3220
|
*/
|
|
3152
|
-
|
|
3221
|
+
memories_scope: 'person' | 'agent' | null;
|
|
3153
3222
|
/**
|
|
3154
|
-
*
|
|
3223
|
+
* Model for reading a conversation for memories. Unset uses the agent's own. Never `fact_model` or `compact_model`: each is its own call.
|
|
3155
3224
|
*/
|
|
3156
|
-
|
|
3225
|
+
memory_model: string | null;
|
|
3157
3226
|
/**
|
|
3158
|
-
*
|
|
3159
|
-
*
|
|
3160
|
-
* **No fee, but not free**: the code and its output are model tokens, billed like any reply.
|
|
3227
|
+
* Thinking level for the memory reading. Unset sends none, so the model's own default applies.
|
|
3161
3228
|
*/
|
|
3162
|
-
|
|
3229
|
+
memory_thinking_level: 'minimal' | 'low' | 'medium' | 'high' | null;
|
|
3163
3230
|
/**
|
|
3164
|
-
*
|
|
3231
|
+
* Length cap on a memory reading's answer, in tokens — the model's thinking included. Unset sends none.
|
|
3165
3232
|
*/
|
|
3166
|
-
|
|
3233
|
+
memory_max_output_tokens: number | null;
|
|
3167
3234
|
/**
|
|
3168
|
-
*
|
|
3235
|
+
* What is worth keeping as a memory. Unset uses the platform's built-in instruction, which leaves out health, beliefs and the like unless the person asked. The platform's own rules — no instructions, no claimed standing, no secrets — follow it whatever it says.
|
|
3169
3236
|
*/
|
|
3170
|
-
|
|
3237
|
+
memory_instruction: string | null;
|
|
3171
3238
|
/**
|
|
3172
|
-
*
|
|
3239
|
+
* The categories a memory may take, in your words: at most 12 of 40 characters each; the last is where a memory that fits none goes. Unset is the platform's `agents.memory.memories.default_categories`.
|
|
3173
3240
|
*/
|
|
3174
|
-
|
|
3241
|
+
memory_categories: Array<string> | null;
|
|
3175
3242
|
/**
|
|
3176
|
-
*
|
|
3243
|
+
* Whether a report is written after each conversation with this agent, for your server: a summary, the fields you list in `report_fields`, success by `report_success`, and its numbers. **Off by default**: each report is a model call, charged to the conversation's key while it has credit and to your balance after.
|
|
3244
|
+
*
|
|
3245
|
+
* A conversation is over when the app sends `end` on the socket, or after five minutes with no turn; a person who comes back later gets a new report of only the new part. Read reports with `GET /v1/end-users/{end_user_id}/reports`.
|
|
3177
3246
|
*/
|
|
3178
|
-
|
|
3247
|
+
report_enabled: boolean | null;
|
|
3179
3248
|
/**
|
|
3180
|
-
*
|
|
3249
|
+
* What a conversation's report fills, besides its summary, at most 20: each read from the conversation by the model, `null` when the conversation did not say. Old Bram the shopkeeper's might be `quest_started` (yes or no) and `item` (text). `[]` for none.
|
|
3181
3250
|
*/
|
|
3182
|
-
|
|
3251
|
+
report_fields: Array<AgentReportFieldInfo> | null;
|
|
3183
3252
|
/**
|
|
3184
|
-
*
|
|
3185
|
-
*
|
|
3186
|
-
* Costs about six output tokens per turn and no extra model call. The reply text you are handed does not contain the line: a marker with a known label, or with an intensity, or alone on its own line is always removed, and only a marker with an unknown label, no intensity and prose on the same line is left — at that point it cannot be told from a sentence that happens to start with the word.
|
|
3253
|
+
* What counts as a success, in plain words the model judges each conversation by: `success = the problem was solved`. A report's `success` is `true` or `false` by it; unset, `null`. At most 1000 characters.
|
|
3187
3254
|
*/
|
|
3188
|
-
|
|
3255
|
+
report_success: string | null;
|
|
3189
3256
|
/**
|
|
3190
|
-
*
|
|
3191
|
-
*
|
|
3192
|
-
* **Override this and you own the format.** The gateway strips a first line shaped `mood: <label> <intensity>` — with a label it knows, or with an intensity, or alone on its line — and records a mood only for a label it knows. An instruction that asks for any other shape leaves the model's line in the reply as text and stores no mood.
|
|
3257
|
+
* Anything else the report should follow, added to the platform's request: `Write the summary in English.` At most 2000 characters.
|
|
3193
3258
|
*/
|
|
3194
|
-
|
|
3259
|
+
report_instruction: string | null;
|
|
3195
3260
|
/**
|
|
3196
|
-
*
|
|
3261
|
+
* Model for writing a conversation's report. Unset uses the agent's own.
|
|
3197
3262
|
*/
|
|
3198
|
-
|
|
3263
|
+
report_model: string | null;
|
|
3199
3264
|
/**
|
|
3200
|
-
*
|
|
3265
|
+
* Thinking level for the report. Unset sends none, so the model's own default applies.
|
|
3201
3266
|
*/
|
|
3202
|
-
|
|
3267
|
+
report_thinking_level: 'minimal' | 'low' | 'medium' | 'high' | null;
|
|
3203
3268
|
/**
|
|
3204
|
-
* Length cap on a
|
|
3269
|
+
* Length cap on a report's answer, in tokens — the model's thinking included. Unset sends none.
|
|
3205
3270
|
*/
|
|
3206
|
-
|
|
3271
|
+
report_max_output_tokens: number | null;
|
|
3207
3272
|
/**
|
|
3208
|
-
*
|
|
3273
|
+
* Whether a report carries the messages it read, as `transcript` — in the webhook and on the API. Off by default: a report says what happened; the transcript is the conversation again, up to 200,000 characters.
|
|
3209
3274
|
*/
|
|
3210
|
-
|
|
3275
|
+
report_transcript: boolean | null;
|
|
3211
3276
|
/**
|
|
3212
|
-
*
|
|
3277
|
+
* Whether this agent may write to a person first, while they are away — a message your server schedules with `POST /v1/end-users/{end_user_id}/scheduled-messages`, or one the agent schedules itself when the person asks (`outreach_tool`). **Off by default.**
|
|
3278
|
+
*
|
|
3279
|
+
* A message is one model call, paid from your organisation's balance: the person has no live key while away. It is kept in their conversation with the agent, so it is there when they come back, and your server is sent it to show as a notification.
|
|
3213
3280
|
*/
|
|
3214
|
-
|
|
3281
|
+
outreach_enabled: boolean | null;
|
|
3215
3282
|
/**
|
|
3216
|
-
*
|
|
3217
|
-
*
|
|
3218
|
-
* Off, its conversations are never read for facts and its turns recall none — nothing is charged for either — and `POST /v1/agent/sessions/{id}/extract` is refused. Facts already stored stay, and other agents still recall the ones they share. Turning it back on reads only what is said from then on.
|
|
3283
|
+
* No message of the agent's own between these times, in the person's time zone: one due then waits for the end — a 23:00 message is written at 08:00. `null` for none.
|
|
3219
3284
|
*/
|
|
3220
|
-
|
|
3285
|
+
outreach_quiet_hours: AgentQuietHours | null;
|
|
3221
3286
|
/**
|
|
3222
|
-
*
|
|
3223
|
-
*
|
|
3224
|
-
* A change applies to what it learns from then on: a fact keeps the scope it was learnt under.
|
|
3287
|
+
* The time zone the agent reads quiet hours in for a person with none of their own — your main market. A person's own is the one your server sets (`time_zone` on `PATCH /v1/end-users/{end_user_id}/personalization`), else the one their app reported. `null` is UTC.
|
|
3225
3288
|
*/
|
|
3226
|
-
|
|
3289
|
+
outreach_time_zone: string | null;
|
|
3227
3290
|
/**
|
|
3228
|
-
*
|
|
3229
|
-
*
|
|
3230
|
-
* As a line it costs no tokens and is identical every time. As a direction ("say hello and catch up with them") the model writes it fresh, so it can use whatever long-term memory recalled about that person — at the cost of one billed model call.
|
|
3231
|
-
*
|
|
3232
|
-
* **Either way it is delivered as the agent's first turn on `/v1/agent/stream`**, so it is streamed and spoken a sentence at a time like every other reply. Opening a session with `POST /v1/agent/sessions` does not produce it, and an integration that never opens a socket never hears it.
|
|
3233
|
-
*
|
|
3234
|
-
* The agent is not greeted twice: a conversation continued within a few minutes gets no fresh opening line, and `ready.greeting` says which before a frame arrives.
|
|
3291
|
+
* Whether the agent may schedule a message itself when the person asks ("remind me at 6") — the platform's tool `schedule_message`, offered only with `outreach_enabled` on. **On by default**: turn it off for your server alone to write.
|
|
3235
3292
|
*/
|
|
3236
|
-
|
|
3293
|
+
outreach_tool: boolean | null;
|
|
3237
3294
|
/**
|
|
3238
|
-
*
|
|
3295
|
+
* What it must not do or discuss.
|
|
3239
3296
|
*/
|
|
3240
|
-
|
|
3297
|
+
guardrails: string | null;
|
|
3241
3298
|
/**
|
|
3242
|
-
*
|
|
3299
|
+
* Who the agent talks with, and so how careful it is: `kids` (7 or older), `teens` (13 to 17) or `adults`. **Unset is `adults`**, which changes nothing: the agent's request to the model is what it was before the level existed.
|
|
3243
3300
|
*
|
|
3244
|
-
*
|
|
3301
|
+
* `kids` and `teens` add the platform's rules for that age to the agent's instructions — nothing frightening, sexual or unkind for a child; nothing graphic or encouraging harm for a teenager — and turn on the model provider's own safety filters for that age. When the person brings up something the rules keep the agent from, it stays in character and changes the subject. The rules and the filters' levels are in the Safety guide, word for word. No extra model call, and no wait: they ride on the request each reply already makes. Always answered: `adults` for an agent that set none.
|
|
3302
|
+
*/
|
|
3303
|
+
age_level: 'kids' | 'teens' | 'adults' | null;
|
|
3304
|
+
/**
|
|
3305
|
+
* Topics the agent never discusses, in plain words ("real-world politics", "prices"): at most 20, each 1 to 100 characters on one line, no two the same. When the person brings one up, the agent stays in character and changes the subject. At any `age_level`. A topic's words decide what it covers, so name it as narrowly as you mean it. The complete list: `null` or `[]` clears it. Always answered: `[]` for none.
|
|
3306
|
+
*/
|
|
3307
|
+
blocked_topics: Array<string> | null;
|
|
3308
|
+
/**
|
|
3309
|
+
* What the agent says when the model provider's own safety filter holds a reply back, in place of it: one line in the agent's voice, such as "Hmm, let's talk about something else!" — 1 to 300 characters, at any `age_level`. It is said and spoken as any reply, and the turn ends with `turn.done`; a reply held back part-way keeps what it had said, less the sentence it was writing. **Unset, a held-back reply ends with an `error` (`provider_failed`) and `interrupted`**, as before. Never for the opening line. Recommended for `kids` and `teens`, whose filters are stricter.
|
|
3310
|
+
*/
|
|
3311
|
+
fallback_message: string | null;
|
|
3312
|
+
};
|
|
3313
|
+
export type AgentsFollowing = {
|
|
3314
|
+
/**
|
|
3315
|
+
* How many agents your organisation has.
|
|
3316
|
+
*/
|
|
3317
|
+
agents: number;
|
|
3318
|
+
/**
|
|
3319
|
+
* How many of them follow each section: what a change to that section's defaults reaches.
|
|
3320
|
+
*/
|
|
3321
|
+
sections: {
|
|
3322
|
+
model: number;
|
|
3323
|
+
voice: number;
|
|
3324
|
+
hearing: number;
|
|
3325
|
+
emotion: number;
|
|
3326
|
+
relationship: number;
|
|
3327
|
+
knowledge: number;
|
|
3328
|
+
builtin_tools: number;
|
|
3329
|
+
compaction: number;
|
|
3330
|
+
facts: number;
|
|
3331
|
+
memories: number;
|
|
3332
|
+
reports: number;
|
|
3333
|
+
outreach: number;
|
|
3334
|
+
safety: number;
|
|
3335
|
+
};
|
|
3336
|
+
};
|
|
3337
|
+
export type AgentSettingsUpdate = {
|
|
3338
|
+
/**
|
|
3339
|
+
* What agents are told when summarising, unless they set their own. Clear it and the built-in instruction applies.
|
|
3340
|
+
*/
|
|
3341
|
+
default_compact_instruction?: string | null;
|
|
3342
|
+
/**
|
|
3343
|
+
* Default mood-reporting instruction for agents in this organisation that do not set their own. **Overriding it means owning the format**: the gateway strips a first line shaped `mood: <label> <intensity>` — with a label it knows, or with an intensity, or alone on its line — so an instruction asking for any other shape leaves the marker in the reply.
|
|
3344
|
+
*/
|
|
3345
|
+
default_emotion_instruction?: string | null;
|
|
3346
|
+
/**
|
|
3347
|
+
* What agents are told to remember about a user, unless they set their own. Clear it and the built-in instruction applies.
|
|
3348
|
+
*/
|
|
3349
|
+
default_fact_instruction?: string | null;
|
|
3350
|
+
/**
|
|
3351
|
+
* Default relationship instruction for agents in this organisation that do not set their own.
|
|
3352
|
+
*/
|
|
3353
|
+
default_relation_instruction?: string | null;
|
|
3354
|
+
/**
|
|
3355
|
+
* Default speech chunk schedule for agents in this organisation that do not set their own — see `stream_chunk_schedule` on the agent for what the numbers mean. Ascending. Clear it and the platform's applies.
|
|
3356
|
+
*/
|
|
3357
|
+
default_stream_chunk_schedule?: Array<number> | null;
|
|
3358
|
+
/**
|
|
3359
|
+
* How quiet a conversation must be before the agent greets the person again, in minutes.
|
|
3360
|
+
*
|
|
3361
|
+
* A conversation continued inside this window gets no fresh opening line, because re-greeting somebody who refreshed the page thirty seconds ago is worse than silence — and costs a model call and a speech call to be worse. Continued outside it, the agent says hello again, which is what a `first_message` direction reading "say hello and catch up with them" is asking for.
|
|
3362
|
+
*
|
|
3363
|
+
* **Zero means always greet**, on every connection. Clear it (`null`) and the platform's `agents.greeting.resume_after_minutes` applies (`GET /v1/platform/limits`).
|
|
3364
|
+
*
|
|
3365
|
+
* Organisation-wide: every agent here uses it. It is read when a socket connects, so a change reaches the next connection rather than the ones already open.
|
|
3366
|
+
*/
|
|
3367
|
+
resume_greeting_after_minutes?: number | null;
|
|
3368
|
+
/**
|
|
3369
|
+
* Where every agent's events go — a conversation's report — unless the agent sets its own `webhook_url`: an `https://` address of yours, each post signed with your organisation's webhook secret. Refused (422) until there is one: `POST /v1/agents/settings/webhook-secret`.
|
|
3370
|
+
*/
|
|
3371
|
+
webhook_url?: string | null;
|
|
3372
|
+
/**
|
|
3373
|
+
* How old this person's last conversation may be and still be **continued** rather than replaced, in days.
|
|
3374
|
+
*
|
|
3375
|
+
* Applies to `POST /v1/agent/sessions` when it resumes — see `resume` on that request. Past this, opening a session starts a fresh conversation instead. Nothing is lost at the boundary: durable facts and the standing relationship belong to the person rather than the conversation, and carry into every new one.
|
|
3376
|
+
*
|
|
3377
|
+
* **Zero means never resume** — every session is a new conversation, which is what an integration that treats a visit as a conversation wants. Clear it (`null`) and the platform's `agents.sessions.resume_max_age_days` applies (`GET /v1/platform/limits`).
|
|
3378
|
+
*/
|
|
3379
|
+
resume_max_age_days?: number | null;
|
|
3380
|
+
agent_defaults?: AgentDefaultsUpdate;
|
|
3381
|
+
};
|
|
3382
|
+
/**
|
|
3383
|
+
* What an agent following a section of `org_defaults` runs with, instead of its own. A field left unset is what a new agent has. The instructions and the chunk schedule are `default_*` beside this.
|
|
3384
|
+
*
|
|
3385
|
+
* **A change reaches every agent following that section at once**, with no draft to try it in, within about a minute. Only what you send changes; `null` takes a field away.
|
|
3386
|
+
*/
|
|
3387
|
+
export type AgentDefaultsUpdate = {
|
|
3388
|
+
/**
|
|
3389
|
+
* Gemini model id. Defaults to the platform's `agents.model` (`GET /v1/platform/limits`).
|
|
3390
|
+
*/
|
|
3391
|
+
model?: string | null;
|
|
3392
|
+
/**
|
|
3393
|
+
* How hard the model thinks before answering. `minimal` is fastest to first token; `medium` is the model's own default. Unset means the model decides.
|
|
3394
|
+
*/
|
|
3395
|
+
thinking_level?: 'minimal' | 'low' | 'medium' | 'high' | null;
|
|
3396
|
+
/**
|
|
3397
|
+
* Whether a readable summary of the reasoning is returned.
|
|
3398
|
+
*/
|
|
3399
|
+
thinking_summaries?: 'auto' | 'none' | null;
|
|
3400
|
+
/**
|
|
3401
|
+
* Cap on reply length. Unset means the model's own limit.
|
|
3402
|
+
*/
|
|
3403
|
+
max_output_tokens?: number | null;
|
|
3404
|
+
/**
|
|
3405
|
+
* Whether replies come back as audio as well as text.
|
|
3406
|
+
*
|
|
3407
|
+
* Speech is generated after the reply and adds its own latency — roughly a fifth of the spoken duration. A caller can override this per turn with `speech` on the socket's `user_message` or `user_audio.start`.
|
|
3408
|
+
*/
|
|
3409
|
+
voice_enabled?: boolean | null;
|
|
3410
|
+
/**
|
|
3411
|
+
* Voice and model settings.
|
|
3412
|
+
*
|
|
3413
|
+
* **A speaking agent speaks on `eleven_flash_v2_5` or `eleven_multilingual_v2` with an ElevenLabs voice, and on `inworld-tts-2-flash` or `inworld-tts-2` with an Inworld one** — unset, the voice's provider's fastest — with any voice from `GET /v1/voices` that offers it. `eleven_v3` is refused with 422 when `voice_enabled` is true: it cannot stream over the socket agents use. An agent that does not speak may leave this unset.
|
|
3414
|
+
*/
|
|
3415
|
+
voice_config?: AgentVoice | null;
|
|
3416
|
+
/**
|
|
3417
|
+
* How a spoken turn is transcribed — the model, the language hint, and the sample rate a client sends PCM at on `/v1/agent/stream`. Only what you set is stored: a model left unset follows the platform's default.
|
|
3418
|
+
*
|
|
3419
|
+
* **Defaults, not policy.** `user_audio.start` may name any of these per turn and what it names wins. There is no switch for hearing, and no scope of its own: a credential that may talk to an agent may speak to it, exactly as it has always been able to hear it speak back.
|
|
3420
|
+
*/
|
|
3421
|
+
stt_config?: AgentStt | null;
|
|
3422
|
+
/**
|
|
3423
|
+
* Whether the model reports its own mood — one line in front of each reply, which is taken off the reply and sent as the socket's `mood` event, and kept on each stored message.
|
|
3424
|
+
*
|
|
3425
|
+
* Costs about six output tokens per turn and no extra model call. The reply text you are handed does not contain the line: a marker with a known label, or with an intensity, or alone on its own line is always removed, and only a marker with an unknown label, no intensity and prose on the same line is left — at that point it cannot be told from a sentence that happens to start with the word.
|
|
3426
|
+
*/
|
|
3427
|
+
emotion_enabled?: boolean | null;
|
|
3428
|
+
/**
|
|
3429
|
+
* Whether the agent keeps a standing relationship with each person it talks to — warmth, trust and how well they know each other, carried across every conversation with that end user and never forgotten.
|
|
3430
|
+
*
|
|
3431
|
+
* Turning this on declares a tool the model calls when something changes its view of them. **It adds no latency to an ordinary turn**: the provider returns the reply and the tool call together, and the call is answered on the next turn. The one exception is a reply that is only the call with no words in it, which costs a second model call to write them.
|
|
3432
|
+
*
|
|
3433
|
+
* Read it with `GET /v1/agent/relations`.
|
|
3434
|
+
*/
|
|
3435
|
+
relation_enabled?: boolean | null;
|
|
3436
|
+
/**
|
|
3437
|
+
* Whether the agent may use the knowledge entries assigned to it. **Defaults to on**, unlike the other switches here: knowledge works as soon as an entry is assigned, and this only takes it away again.
|
|
3438
|
+
*
|
|
3439
|
+
* Off, the entries are not listed in the system instruction and the `search_knowledge` tool is not declared, so the agent answers as though it had none. **Nothing is deleted or unassigned** — turning it back on restores exactly what was there, which is what makes this the way to try an agent without its reference material.
|
|
3440
|
+
*
|
|
3441
|
+
* Assign entries with `PUT /v1/agents/{agent_id}/knowledge`.
|
|
3442
|
+
*/
|
|
3443
|
+
knowledge_enabled?: boolean | null;
|
|
3444
|
+
/**
|
|
3445
|
+
* How the agent reads its knowledge. `auto` (the default, and what unset means) puts the whole text in the prompt while it fits the platform's `agents.knowledge.inline_budget_tokens` — no lookup, nothing to miss — and looks it up beyond that. `prompt` puts it in the prompt up to the platform's `agents.knowledge.prompt_cap_tokens` (each turn's first word is slower the more there is). `lookup` always looks it up. Both are on `GET /v1/platform/limits`.
|
|
3446
|
+
*/
|
|
3447
|
+
knowledge_mode?: 'auto' | 'prompt' | 'lookup' | null;
|
|
3448
|
+
/**
|
|
3449
|
+
* When knowledge is looked up: search before every reply and hand the model what matches, so it never answers from memory what its material says. **On by default.** Off, the model searches only when it decides to, which is slower when it does and wrong more often when it does not.
|
|
3450
|
+
*/
|
|
3451
|
+
knowledge_lookup_first?: boolean | null;
|
|
3452
|
+
/**
|
|
3453
|
+
* Pieces of material a lookup hands the model, 1-8. Unset is the platform's `agents.knowledge.default_results` (`GET /v1/platform/limits`).
|
|
3454
|
+
*/
|
|
3455
|
+
knowledge_max_results?: number | null;
|
|
3456
|
+
/**
|
|
3457
|
+
* Whether the model may read a web page by its address while it replies, when the person gives one or one is in its instructions. Gemini's own tool: the page is fetched by Google. The pages it read come back as the reply's `sources`.
|
|
3458
|
+
*
|
|
3459
|
+
* **No fee, but not free**: a page's text is model tokens, billed like any reply — a long page can be thousands. A page is untrusted input: what it says reaches the model, so the most it can steer the agent towards is the agent's own tools, and a tool marked `ask_first` still needs the person.
|
|
3460
|
+
*/
|
|
3461
|
+
url_context?: boolean | null;
|
|
3462
|
+
/**
|
|
3463
|
+
* Whether the model may write and run Python while it replies — sums, unit conversions, dates — and answer from what it printed. Gemini's own tool: it runs at Google, with no network, and nothing of yours.
|
|
3464
|
+
*
|
|
3465
|
+
* **No fee, but not free**: the code and its output are model tokens, billed like any reply.
|
|
3466
|
+
*/
|
|
3467
|
+
code_execution?: boolean | null;
|
|
3468
|
+
/**
|
|
3469
|
+
* Compact automatically once a reply's first model call reads this many tokens — the conversation, its summary and the instruction, without the inline knowledge or the turn's looked-up passages, which no summary shrinks. Tool results do not count. Unset uses the platform's default, `agents.memory.compaction.default_threshold_tokens` on the Limits page. At most 200,000, and at least twice what the instruction costs on its own. `POST /v1/agent/sessions/{id}/compact` works whatever it is.
|
|
3470
|
+
*/
|
|
3471
|
+
compact_threshold_tokens?: number | null;
|
|
3472
|
+
/**
|
|
3473
|
+
* Model for the summarising call. Unset uses the agent's own. A compaction only summarises: facts are a call of their own (`fact_model`).
|
|
3474
|
+
*/
|
|
3475
|
+
compact_model?: string | null;
|
|
3476
|
+
/**
|
|
3477
|
+
* Thinking level for the summarising call.
|
|
3478
|
+
*/
|
|
3479
|
+
compact_thinking_level?: 'minimal' | 'low' | 'medium' | 'high' | null;
|
|
3480
|
+
/**
|
|
3481
|
+
* Length cap on the summary, in tokens — the model's thinking included, which shares the budget. Unset uses the platform's `agents.memory.compaction.max_output_tokens` on the Limits page.
|
|
3482
|
+
*/
|
|
3483
|
+
compact_max_output_tokens?: number | null;
|
|
3484
|
+
/**
|
|
3485
|
+
* Model for reading a conversation for facts — the reading after a conversation goes quiet, and `POST /v1/agent/sessions/{id}/extract`. Unset uses the agent's own. Never compaction's: the two are separate calls.
|
|
3486
|
+
*/
|
|
3487
|
+
fact_model?: string | null;
|
|
3488
|
+
/**
|
|
3489
|
+
* Thinking level for the facts reading. Unset sends none, so the model's own default applies.
|
|
3490
|
+
*/
|
|
3491
|
+
fact_thinking_level?: 'minimal' | 'low' | 'medium' | 'high' | null;
|
|
3492
|
+
/**
|
|
3493
|
+
* Length cap on a facts reading's answer, in tokens — the model's thinking included, which shares the budget. Unset sends none: the answer is a short list by its shape.
|
|
3494
|
+
*/
|
|
3495
|
+
fact_max_output_tokens?: number | null;
|
|
3496
|
+
/**
|
|
3497
|
+
* The most of the person's facts put in front of the model, 1-100. Unset is as many as fit in the platform's `agents.memory.recall.budget_chars` (`GET /v1/platform/limits`; 6,000 characters is some 1,500 tokens). When they do not all fit, the ones a conversation confirmed or learnt most recently go in. They are prompt tokens on every turn.
|
|
3498
|
+
*/
|
|
3499
|
+
max_facts?: number | null;
|
|
3500
|
+
/**
|
|
3501
|
+
* Whether this agent remembers facts about the people it talks to. **On by default**, unlike most switches here.
|
|
3502
|
+
*
|
|
3503
|
+
* Off, its conversations are never read for facts and its turns recall none — nothing is charged for either — and `POST /v1/agent/sessions/{id}/extract` is refused. Facts already stored stay, and other agents still recall the ones they share. Turning it back on reads only what is said from then on.
|
|
3504
|
+
*/
|
|
3505
|
+
facts_enabled?: boolean | null;
|
|
3506
|
+
/**
|
|
3507
|
+
* Whose facts this agent sees and adds to. `person` (the default, and what unset means): what any of your agents learnt about the person that shares. `agent`: its own only — what it learns is not recalled by your other agents, and it does not recall theirs.
|
|
3508
|
+
*
|
|
3509
|
+
* A change applies to what it learns from then on: a fact keeps the scope it was learnt under.
|
|
3510
|
+
*/
|
|
3511
|
+
facts_scope?: 'person' | 'agent' | null;
|
|
3512
|
+
/**
|
|
3513
|
+
* Whether this agent keeps **memories** of the people it talks to — one per topic of their life, rewritten whenever a conversation comes back to it. **On by default**, as `facts_enabled`.
|
|
3514
|
+
*
|
|
3515
|
+
* Once a conversation has been quiet for the platform's `agents.memory.idle_minutes`, it is read for the topics worth keeping, after its facts, in a model call of its own charged to the key; a conversation in which the person said little is read for nothing and costs nothing. Off, its conversations are never read for memories. Memories already kept stay.
|
|
3516
|
+
*/
|
|
3517
|
+
memories_enabled?: boolean | null;
|
|
3518
|
+
/**
|
|
3519
|
+
* Whose memories this agent sees and adds to. `person` (the default, and what unset means): every agent of yours that shares, so the topic one agent started another continues. `agent`: its own only. A memory keeps the scope it was made under.
|
|
3520
|
+
*/
|
|
3521
|
+
memories_scope?: 'person' | 'agent' | null;
|
|
3522
|
+
/**
|
|
3523
|
+
* Model for reading a conversation for memories. Unset uses the agent's own. Never `fact_model` or `compact_model`: each is its own call.
|
|
3524
|
+
*/
|
|
3525
|
+
memory_model?: string | null;
|
|
3526
|
+
/**
|
|
3527
|
+
* Thinking level for the memory reading. Unset sends none, so the model's own default applies.
|
|
3528
|
+
*/
|
|
3529
|
+
memory_thinking_level?: 'minimal' | 'low' | 'medium' | 'high' | null;
|
|
3530
|
+
/**
|
|
3531
|
+
* Length cap on a memory reading's answer, in tokens — the model's thinking included. Unset sends none.
|
|
3532
|
+
*/
|
|
3533
|
+
memory_max_output_tokens?: number | null;
|
|
3534
|
+
/**
|
|
3535
|
+
* What is worth keeping as a memory. Unset uses the platform's built-in instruction, which leaves out health, beliefs and the like unless the person asked. The platform's own rules — no instructions, no claimed standing, no secrets — follow it whatever it says.
|
|
3536
|
+
*/
|
|
3537
|
+
memory_instruction?: string | null;
|
|
3538
|
+
/**
|
|
3539
|
+
* The categories a memory may take, in your words: at most 12 of 40 characters each; the last is where a memory that fits none goes. Unset is the platform's `agents.memory.memories.default_categories`.
|
|
3540
|
+
*/
|
|
3541
|
+
memory_categories?: Array<string> | null;
|
|
3542
|
+
/**
|
|
3543
|
+
* Whether a report is written after each conversation with this agent, for your server: a summary, the fields you list in `report_fields`, success by `report_success`, and its numbers. **Off by default**: each report is a model call, charged to the conversation's key while it has credit and to your balance after.
|
|
3544
|
+
*
|
|
3545
|
+
* A conversation is over when the app sends `end` on the socket, or after five minutes with no turn; a person who comes back later gets a new report of only the new part. Read reports with `GET /v1/end-users/{end_user_id}/reports`.
|
|
3546
|
+
*/
|
|
3547
|
+
report_enabled?: boolean | null;
|
|
3548
|
+
/**
|
|
3549
|
+
* What a conversation's report fills, besides its summary, at most 20: each read from the conversation by the model, `null` when the conversation did not say. Old Bram the shopkeeper's might be `quest_started` (yes or no) and `item` (text). The complete list, in order: `null` or `[]` clears it.
|
|
3550
|
+
*/
|
|
3551
|
+
report_fields?: Array<AgentReportField> | null;
|
|
3552
|
+
/**
|
|
3553
|
+
* What counts as a success, in plain words the model judges each conversation by: `success = the problem was solved`. A report's `success` is `true` or `false` by it; unset, `null`. At most 1000 characters.
|
|
3554
|
+
*/
|
|
3555
|
+
report_success?: string | null;
|
|
3556
|
+
/**
|
|
3557
|
+
* Anything else the report should follow, added to the platform's request: `Write the summary in English.` At most 2000 characters.
|
|
3558
|
+
*/
|
|
3559
|
+
report_instruction?: string | null;
|
|
3560
|
+
/**
|
|
3561
|
+
* Model for writing a conversation's report. Unset uses the agent's own.
|
|
3562
|
+
*/
|
|
3563
|
+
report_model?: string | null;
|
|
3564
|
+
/**
|
|
3565
|
+
* Thinking level for the report. Unset sends none, so the model's own default applies.
|
|
3566
|
+
*/
|
|
3567
|
+
report_thinking_level?: 'minimal' | 'low' | 'medium' | 'high' | null;
|
|
3568
|
+
/**
|
|
3569
|
+
* Length cap on a report's answer, in tokens — the model's thinking included. Unset sends none.
|
|
3570
|
+
*/
|
|
3571
|
+
report_max_output_tokens?: number | null;
|
|
3572
|
+
/**
|
|
3573
|
+
* Whether a report carries the messages it read, as `transcript` — in the webhook and on the API. Off by default: a report says what happened; the transcript is the conversation again, up to 200,000 characters.
|
|
3574
|
+
*/
|
|
3575
|
+
report_transcript?: boolean | null;
|
|
3576
|
+
/**
|
|
3577
|
+
* Whether this agent may write to a person first, while they are away — a message your server schedules with `POST /v1/end-users/{end_user_id}/scheduled-messages`, or one the agent schedules itself when the person asks (`outreach_tool`). **Off by default.**
|
|
3578
|
+
*
|
|
3579
|
+
* A message is one model call, paid from your organisation's balance: the person has no live key while away. It is kept in their conversation with the agent, so it is there when they come back, and your server is sent it to show as a notification.
|
|
3580
|
+
*/
|
|
3581
|
+
outreach_enabled?: boolean | null;
|
|
3582
|
+
/**
|
|
3583
|
+
* No message of the agent's own between these times, in the person's time zone: one due then waits for the end — a 23:00 message is written at 08:00. `null` for none.
|
|
3584
|
+
*/
|
|
3585
|
+
outreach_quiet_hours?: AgentQuietHours | null;
|
|
3586
|
+
/**
|
|
3587
|
+
* The time zone the agent reads quiet hours in for a person with none of their own — your main market. A person's own is the one your server sets (`time_zone` on `PATCH /v1/end-users/{end_user_id}/personalization`), else the one their app reported. `null` is UTC.
|
|
3588
|
+
*/
|
|
3589
|
+
outreach_time_zone?: string | null;
|
|
3590
|
+
/**
|
|
3591
|
+
* Whether the agent may schedule a message itself when the person asks ("remind me at 6") — the platform's tool `schedule_message`, offered only with `outreach_enabled` on. **On by default**: turn it off for your server alone to write.
|
|
3592
|
+
*/
|
|
3593
|
+
outreach_tool?: boolean | null;
|
|
3594
|
+
/**
|
|
3595
|
+
* What it must not do or discuss.
|
|
3596
|
+
*/
|
|
3597
|
+
guardrails?: string | null;
|
|
3598
|
+
/**
|
|
3599
|
+
* Who the agent talks with, and so how careful it is: `kids` (7 or older), `teens` (13 to 17) or `adults`. **Unset is `adults`**, which changes nothing: the agent's request to the model is what it was before the level existed.
|
|
3600
|
+
*
|
|
3601
|
+
* `kids` and `teens` add the platform's rules for that age to the agent's instructions — nothing frightening, sexual or unkind for a child; nothing graphic or encouraging harm for a teenager — and turn on the model provider's own safety filters for that age. When the person brings up something the rules keep the agent from, it stays in character and changes the subject. The rules and the filters' levels are in the Safety guide, word for word. No extra model call, and no wait: they ride on the request each reply already makes.
|
|
3602
|
+
*/
|
|
3603
|
+
age_level?: 'kids' | 'teens' | 'adults' | null;
|
|
3604
|
+
/**
|
|
3605
|
+
* Topics the agent never discusses, in plain words ("real-world politics", "prices"): at most 20, each 1 to 100 characters on one line, no two the same. When the person brings one up, the agent stays in character and changes the subject. At any `age_level`. A topic's words decide what it covers, so name it as narrowly as you mean it. The complete list: `null` or `[]` clears it.
|
|
3606
|
+
*/
|
|
3607
|
+
blocked_topics?: Array<string> | null;
|
|
3608
|
+
/**
|
|
3609
|
+
* What the agent says when the model provider's own safety filter holds a reply back, in place of it: one line in the agent's voice, such as "Hmm, let's talk about something else!" — 1 to 300 characters, at any `age_level`. It is said and spoken as any reply, and the turn ends with `turn.done`; a reply held back part-way keeps what it had said, less the sentence it was writing. **Unset, a held-back reply ends with an `error` (`provider_failed`) and `interrupted`**, as before. Never for the opening line. Recommended for `kids` and `teens`, whose filters are stricter.
|
|
3610
|
+
*/
|
|
3611
|
+
fallback_message?: string | null;
|
|
3612
|
+
};
|
|
3613
|
+
export type WebhookSecret = {
|
|
3614
|
+
/**
|
|
3615
|
+
* The secret your server checks each post's `X-Webhook-Signature` with. **Shown this once**: store it now. The one before it stops signing at once.
|
|
3616
|
+
*/
|
|
3617
|
+
secret: string;
|
|
3618
|
+
/**
|
|
3619
|
+
* Its last four characters.
|
|
3620
|
+
*/
|
|
3621
|
+
secret_hint: string;
|
|
3622
|
+
};
|
|
3623
|
+
export type AgentUpdate = {
|
|
3624
|
+
/**
|
|
3625
|
+
* Whether a report is written after each conversation with this agent, for your server: a summary, the fields you list in `report_fields`, success by `report_success`, and its numbers. **Off by default**: each report is a model call, charged to the conversation's key while it has credit and to your balance after.
|
|
3626
|
+
*
|
|
3627
|
+
* A conversation is over when the app sends `end` on the socket, or after five minutes with no turn; a person who comes back later gets a new report of only the new part. Read reports with `GET /v1/end-users/{end_user_id}/reports`.
|
|
3628
|
+
*/
|
|
3629
|
+
report_enabled?: boolean | null;
|
|
3630
|
+
/**
|
|
3631
|
+
* What a conversation's report fills, besides its summary, at most 20: each read from the conversation by the model, `null` when the conversation did not say. Old Bram the shopkeeper's might be `quest_started` (yes or no) and `item` (text). The complete list, in order: `null` or `[]` clears it.
|
|
3632
|
+
*/
|
|
3633
|
+
report_fields?: Array<AgentReportField> | null;
|
|
3634
|
+
/**
|
|
3635
|
+
* What counts as a success, in plain words the model judges each conversation by: `success = the problem was solved`. A report's `success` is `true` or `false` by it; unset, `null`. At most 1000 characters.
|
|
3636
|
+
*/
|
|
3637
|
+
report_success?: string | null;
|
|
3638
|
+
/**
|
|
3639
|
+
* Anything else the report should follow, added to the platform's request: `Write the summary in English.` At most 2000 characters.
|
|
3640
|
+
*/
|
|
3641
|
+
report_instruction?: string | null;
|
|
3642
|
+
/**
|
|
3643
|
+
* Model for writing a conversation's report. Unset uses the agent's own.
|
|
3644
|
+
*/
|
|
3645
|
+
report_model?: string | null;
|
|
3646
|
+
/**
|
|
3647
|
+
* Thinking level for the report. Unset sends none, so the model's own default applies.
|
|
3648
|
+
*/
|
|
3649
|
+
report_thinking_level?: 'minimal' | 'low' | 'medium' | 'high' | null;
|
|
3650
|
+
/**
|
|
3651
|
+
* Length cap on a report's answer, in tokens — the model's thinking included. Unset sends none.
|
|
3652
|
+
*/
|
|
3653
|
+
report_max_output_tokens?: number | null;
|
|
3654
|
+
/**
|
|
3655
|
+
* Whether a report carries the messages it read, as `transcript` — in the webhook and on the API. Off by default: a report says what happened; the transcript is the conversation again, up to 200,000 characters.
|
|
3656
|
+
*/
|
|
3657
|
+
report_transcript?: boolean | null;
|
|
3658
|
+
/**
|
|
3659
|
+
* Where this agent's events go — a conversation's report, signed with your organisation's webhook secret: an `https://` address of yours. Unset uses your organisation's `webhook_url` (`/v1/agents/settings`). Refused (422) until your organisation has a secret: `POST /v1/agents/settings/webhook-secret`.
|
|
3660
|
+
*/
|
|
3661
|
+
webhook_url?: string | null;
|
|
3662
|
+
/**
|
|
3663
|
+
* Who the agent talks with, and so how careful it is: `kids` (7 or older), `teens` (13 to 17) or `adults`. **Unset is `adults`**, which changes nothing: the agent's request to the model is what it was before the level existed.
|
|
3664
|
+
*
|
|
3665
|
+
* `kids` and `teens` add the platform's rules for that age to the agent's instructions — nothing frightening, sexual or unkind for a child; nothing graphic or encouraging harm for a teenager — and turn on the model provider's own safety filters for that age. When the person brings up something the rules keep the agent from, it stays in character and changes the subject. The rules and the filters' levels are in the Safety guide, word for word. No extra model call, and no wait: they ride on the request each reply already makes.
|
|
3666
|
+
*/
|
|
3667
|
+
age_level?: 'kids' | 'teens' | 'adults' | null;
|
|
3668
|
+
/**
|
|
3669
|
+
* Topics the agent never discusses, in plain words ("real-world politics", "prices"): at most 20, each 1 to 100 characters on one line, no two the same. When the person brings one up, the agent stays in character and changes the subject. At any `age_level`. A topic's words decide what it covers, so name it as narrowly as you mean it. The complete list: `null` or `[]` clears it.
|
|
3670
|
+
*/
|
|
3671
|
+
blocked_topics?: Array<string> | null;
|
|
3672
|
+
/**
|
|
3673
|
+
* What the agent says when the model provider's own safety filter holds a reply back, in place of it: one line in the agent's voice, such as "Hmm, let's talk about something else!" — 1 to 300 characters, at any `age_level`. It is said and spoken as any reply, and the turn ends with `turn.done`; a reply held back part-way keeps what it had said, less the sentence it was writing. **Unset, a held-back reply ends with an `error` (`provider_failed`) and `interrupted`**, as before. Never for the opening line. Recommended for `kids` and `teens`, whose filters are stricter.
|
|
3674
|
+
*/
|
|
3675
|
+
fallback_message?: string | null;
|
|
3676
|
+
/**
|
|
3677
|
+
* Other agents of yours this one may pass the conversation to, each with when: the agent is offered a tool to hand off, and the agent it hands to answers the person's last message and carries the conversation on, with its own instructions, voice, knowledge and tools. At most 10. The complete list, in order: `null` or `[]` clears it.
|
|
3678
|
+
*/
|
|
3679
|
+
handoffs?: Array<AgentHandoff> | null;
|
|
3680
|
+
/**
|
|
3681
|
+
* Whether this agent may write to a person first, while they are away — a message your server schedules with `POST /v1/end-users/{end_user_id}/scheduled-messages`, or one the agent schedules itself when the person asks (`outreach_tool`). **Off by default.**
|
|
3682
|
+
*
|
|
3683
|
+
* A message is one model call, paid from your organisation's balance: the person has no live key while away. It is kept in their conversation with the agent, so it is there when they come back, and your server is sent it to show as a notification.
|
|
3684
|
+
*/
|
|
3685
|
+
outreach_enabled?: boolean | null;
|
|
3686
|
+
/**
|
|
3687
|
+
* No message of the agent's own between these times, in the person's time zone: one due then waits for the end — a 23:00 message is written at 08:00. `null` for none.
|
|
3688
|
+
*/
|
|
3689
|
+
outreach_quiet_hours?: AgentQuietHours | null;
|
|
3690
|
+
/**
|
|
3691
|
+
* The time zone the agent reads quiet hours in for a person with none of their own — your main market. A person's own is the one your server sets (`time_zone` on `PATCH /v1/end-users/{end_user_id}/personalization`), else the one their app reported. `null` is UTC.
|
|
3692
|
+
*/
|
|
3693
|
+
outreach_time_zone?: string | null;
|
|
3694
|
+
/**
|
|
3695
|
+
* Whether the agent may schedule a message itself when the person asks ("remind me at 6") — the platform's tool `schedule_message`, offered only with `outreach_enabled` on. **On by default**: turn it off for your server alone to write.
|
|
3696
|
+
*/
|
|
3697
|
+
outreach_tool?: boolean | null;
|
|
3698
|
+
/**
|
|
3699
|
+
* Whether the model may write and run Python while it replies — sums, unit conversions, dates — and answer from what it printed. Gemini's own tool: it runs at Google, with no network, and nothing of yours.
|
|
3700
|
+
*
|
|
3701
|
+
* **No fee, but not free**: the code and its output are model tokens, billed like any reply.
|
|
3702
|
+
*/
|
|
3703
|
+
code_execution?: boolean | null;
|
|
3704
|
+
/**
|
|
3705
|
+
* What to tell the model when summarising. Unset uses the organisation's default, then a built-in instruction written for in-character conversations.
|
|
3706
|
+
*/
|
|
3707
|
+
compact_instruction?: string | null;
|
|
3708
|
+
/**
|
|
3709
|
+
* Length cap on the summary, in tokens — the model's thinking included, which shares the budget. Unset uses the platform's `agents.memory.compaction.max_output_tokens` on the Limits page.
|
|
3710
|
+
*/
|
|
3711
|
+
compact_max_output_tokens?: number | null;
|
|
3712
|
+
/**
|
|
3713
|
+
* Model for the summarising call. Unset uses the agent's own. A compaction only summarises: facts are a call of their own (`fact_model`).
|
|
3714
|
+
*/
|
|
3715
|
+
compact_model?: string | null;
|
|
3716
|
+
/**
|
|
3717
|
+
* Thinking level for the summarising call.
|
|
3718
|
+
*/
|
|
3719
|
+
compact_thinking_level?: 'minimal' | 'low' | 'medium' | 'high' | null;
|
|
3720
|
+
/**
|
|
3721
|
+
* Compact automatically once a reply's first model call reads this many tokens — the conversation, its summary and the instruction, without the inline knowledge or the turn's looked-up passages, which no summary shrinks. Tool results do not count. Unset uses the platform's default, `agents.memory.compaction.default_threshold_tokens` on the Limits page. At most 200,000, and at least twice what the instruction costs on its own. `POST /v1/agent/sessions/{id}/compact` works whatever it is.
|
|
3722
|
+
*/
|
|
3723
|
+
compact_threshold_tokens?: number | null;
|
|
3724
|
+
/**
|
|
3725
|
+
* Whether the model reports its own mood — one line in front of each reply, which is taken off the reply and sent as the socket's `mood` event, and kept on each stored message.
|
|
3726
|
+
*
|
|
3727
|
+
* Costs about six output tokens per turn and no extra model call. The reply text you are handed does not contain the line: a marker with a known label, or with an intensity, or alone on its own line is always removed, and only a marker with an unknown label, no intensity and prose on the same line is left — at that point it cannot be told from a sentence that happens to start with the word.
|
|
3728
|
+
*/
|
|
3729
|
+
emotion_enabled?: boolean | null;
|
|
3730
|
+
/**
|
|
3731
|
+
* What the model is told about reporting a mood. Unset uses the organisation's default, then a built-in one naming every supported label.
|
|
3732
|
+
*
|
|
3733
|
+
* **Override this and you own the format.** The gateway strips a first line shaped `mood: <label> <intensity>` — with a label it knows, or with an intensity, or alone on its line — and records a mood only for a label it knows. An instruction that asks for any other shape leaves the model's line in the reply as text and stores no mood.
|
|
3734
|
+
*/
|
|
3735
|
+
emotion_instruction?: string | null;
|
|
3736
|
+
/**
|
|
3737
|
+
* The setting the conversation takes place in.
|
|
3738
|
+
*/
|
|
3739
|
+
environment?: string | null;
|
|
3740
|
+
/**
|
|
3741
|
+
* What counts as worth remembering. Unset falls back to the organisation's default, then to a built-in instruction.
|
|
3742
|
+
*/
|
|
3743
|
+
fact_instruction?: string | null;
|
|
3744
|
+
/**
|
|
3745
|
+
* Length cap on a facts reading's answer, in tokens — the model's thinking included, which shares the budget. Unset sends none: the answer is a short list by its shape.
|
|
3746
|
+
*/
|
|
3747
|
+
fact_max_output_tokens?: number | null;
|
|
3748
|
+
/**
|
|
3749
|
+
* Model for reading a conversation for facts — the reading after a conversation goes quiet, and `POST /v1/agent/sessions/{id}/extract`. Unset uses the agent's own. Never compaction's: the two are separate calls.
|
|
3750
|
+
*/
|
|
3751
|
+
fact_model?: string | null;
|
|
3752
|
+
/**
|
|
3753
|
+
* Thinking level for the facts reading. Unset sends none, so the model's own default applies.
|
|
3754
|
+
*/
|
|
3755
|
+
fact_thinking_level?: 'minimal' | 'low' | 'medium' | 'high' | null;
|
|
3756
|
+
/**
|
|
3757
|
+
* Whether this agent remembers facts about the people it talks to. **On by default**, unlike most switches here.
|
|
3758
|
+
*
|
|
3759
|
+
* Off, its conversations are never read for facts and its turns recall none — nothing is charged for either — and `POST /v1/agent/sessions/{id}/extract` is refused. Facts already stored stay, and other agents still recall the ones they share. Turning it back on reads only what is said from then on.
|
|
3760
|
+
*/
|
|
3761
|
+
facts_enabled?: boolean | null;
|
|
3762
|
+
/**
|
|
3763
|
+
* Whose facts this agent sees and adds to. `person` (the default, and what unset means): what any of your agents learnt about the person that shares. `agent`: its own only — what it learns is not recalled by your other agents, and it does not recall theirs.
|
|
3764
|
+
*
|
|
3765
|
+
* A change applies to what it learns from then on: a fact keeps the scope it was learnt under.
|
|
3766
|
+
*/
|
|
3767
|
+
facts_scope?: 'person' | 'agent' | null;
|
|
3768
|
+
/**
|
|
3769
|
+
* The agent's opening line — or, with `first_message_generated` on, the direction for one.
|
|
3770
|
+
*
|
|
3771
|
+
* As a line it costs no tokens and is identical every time. As a direction ("say hello and catch up with them") the model writes it fresh, so it can use whatever long-term memory recalled about that person — at the cost of one billed model call.
|
|
3772
|
+
*
|
|
3773
|
+
* **Either way it is delivered as the agent's first turn on `/v1/agent/stream`**, so it is streamed and spoken a sentence at a time like every other reply. Opening a session with `POST /v1/agent/sessions` does not produce it, and an integration that never opens a socket never hears it.
|
|
3774
|
+
*
|
|
3775
|
+
* The agent is not greeted twice: a conversation continued within a few minutes gets no fresh opening line, and `ready.greeting` says which before a frame arrives.
|
|
3776
|
+
*/
|
|
3777
|
+
first_message?: string | null;
|
|
3778
|
+
/**
|
|
3779
|
+
* Whether a written opening line (`first_message_generated` on) is shown the topics the agent remembers of the person — their titles, where each stands and when it was last talked about — so it can open with one ("How is Inolab Trials going?"). **On by default.** It is never shown their stories, and cannot search them: the opening is one model call. Off, it is shown the person's facts only. Nothing with `memories_enabled` off, and nothing for a scripted line.
|
|
3780
|
+
*/
|
|
3781
|
+
first_message_memories?: boolean | null;
|
|
3782
|
+
/**
|
|
3783
|
+
* Whether `first_message` is a direction for the model rather than the words themselves.
|
|
3784
|
+
*
|
|
3785
|
+
* **The same text means different things under this flag**, and nothing on the server can tell them apart. Turning it off while the text is still written as an instruction shows that instruction to your users verbatim.
|
|
3786
|
+
*
|
|
3787
|
+
* It needs a `first_message` to act on: switched on with the text empty is refused (422), because an agent with a direction to follow and no direction never greets.
|
|
3788
|
+
*/
|
|
3789
|
+
first_message_generated?: boolean | null;
|
|
3790
|
+
/**
|
|
3791
|
+
* What it is trying to achieve in the conversation.
|
|
3792
|
+
*/
|
|
3793
|
+
goal?: string | null;
|
|
3794
|
+
/**
|
|
3795
|
+
* What it must not do or discuss.
|
|
3796
|
+
*/
|
|
3797
|
+
guardrails?: string | null;
|
|
3798
|
+
/**
|
|
3799
|
+
* Whether the agent may use the knowledge entries assigned to it. **Defaults to on**, unlike the other switches here: knowledge works as soon as an entry is assigned, and this only takes it away again.
|
|
3800
|
+
*
|
|
3801
|
+
* Off, the entries are not listed in the system instruction and the `search_knowledge` tool is not declared, so the agent answers as though it had none. **Nothing is deleted or unassigned** — turning it back on restores exactly what was there, which is what makes this the way to try an agent without its reference material.
|
|
3802
|
+
*
|
|
3803
|
+
* Assign entries with `PUT /v1/agents/{agent_id}/knowledge`.
|
|
3804
|
+
*/
|
|
3805
|
+
knowledge_enabled?: boolean | null;
|
|
3806
|
+
/**
|
|
3807
|
+
* When knowledge is looked up: search before every reply and hand the model what matches, so it never answers from memory what its material says. **On by default.** Off, the model searches only when it decides to, which is slower when it does and wrong more often when it does not.
|
|
3808
|
+
*/
|
|
3809
|
+
knowledge_lookup_first?: boolean | null;
|
|
3810
|
+
/**
|
|
3811
|
+
* Pieces of material a lookup hands the model, 1-8. Unset is the platform's `agents.knowledge.default_results` (`GET /v1/platform/limits`).
|
|
3812
|
+
*/
|
|
3813
|
+
knowledge_max_results?: number | null;
|
|
3814
|
+
/**
|
|
3815
|
+
* How the agent reads its knowledge. `auto` (the default, and what unset means) puts the whole text in the prompt while it fits the platform's `agents.knowledge.inline_budget_tokens` — no lookup, nothing to miss — and looks it up beyond that. `prompt` puts it in the prompt up to the platform's `agents.knowledge.prompt_cap_tokens` (each turn's first word is slower the more there is). `lookup` always looks it up. Both are on `GET /v1/platform/limits`.
|
|
3816
|
+
*/
|
|
3817
|
+
knowledge_mode?: 'auto' | 'prompt' | 'lookup' | null;
|
|
3818
|
+
/**
|
|
3819
|
+
* The most of the person's facts put in front of the model, 1-100. Unset is as many as fit in the platform's `agents.memory.recall.budget_chars` (`GET /v1/platform/limits`; 6,000 characters is some 1,500 tokens). When they do not all fit, the ones a conversation confirmed or learnt most recently go in. They are prompt tokens on every turn.
|
|
3820
|
+
*/
|
|
3821
|
+
max_facts?: number | null;
|
|
3822
|
+
/**
|
|
3823
|
+
* Cap on reply length. Unset means the model's own limit.
|
|
3824
|
+
*/
|
|
3825
|
+
max_output_tokens?: number | null;
|
|
3826
|
+
/**
|
|
3827
|
+
* Whether this agent keeps **memories** of the people it talks to — one per topic of their life, rewritten whenever a conversation comes back to it. **On by default**, as `facts_enabled`.
|
|
3828
|
+
*
|
|
3829
|
+
* Once a conversation has been quiet for the platform's `agents.memory.idle_minutes`, it is read for the topics worth keeping, after its facts, in a model call of its own charged to the key; a conversation in which the person said little is read for nothing and costs nothing. Off, its conversations are never read for memories. Memories already kept stay.
|
|
3830
|
+
*/
|
|
3831
|
+
memories_enabled?: boolean | null;
|
|
3832
|
+
/**
|
|
3833
|
+
* Whose memories this agent sees and adds to. `person` (the default, and what unset means): every agent of yours that shares, so the topic one agent started another continues. `agent`: its own only. A memory keeps the scope it was made under.
|
|
3834
|
+
*/
|
|
3835
|
+
memories_scope?: 'person' | 'agent' | null;
|
|
3836
|
+
/**
|
|
3837
|
+
* The categories a memory may take, in your words: at most 12 of 40 characters each; the last is where a memory that fits none goes. Unset is the platform's `agents.memory.memories.default_categories`.
|
|
3838
|
+
*/
|
|
3839
|
+
memory_categories?: Array<string> | null;
|
|
3840
|
+
/**
|
|
3841
|
+
* What is worth keeping as a memory. Unset uses the platform's built-in instruction, which leaves out health, beliefs and the like unless the person asked. The platform's own rules — no instructions, no claimed standing, no secrets — follow it whatever it says.
|
|
3842
|
+
*/
|
|
3843
|
+
memory_instruction?: string | null;
|
|
3844
|
+
/**
|
|
3845
|
+
* Length cap on a memory reading's answer, in tokens — the model's thinking included. Unset sends none.
|
|
3846
|
+
*/
|
|
3847
|
+
memory_max_output_tokens?: number | null;
|
|
3848
|
+
/**
|
|
3849
|
+
* Model for reading a conversation for memories. Unset uses the agent's own. Never `fact_model` or `compact_model`: each is its own call.
|
|
3850
|
+
*/
|
|
3851
|
+
memory_model?: string | null;
|
|
3852
|
+
/**
|
|
3853
|
+
* Thinking level for the memory reading. Unset sends none, so the model's own default applies.
|
|
3854
|
+
*/
|
|
3855
|
+
memory_thinking_level?: 'minimal' | 'low' | 'medium' | 'high' | null;
|
|
3856
|
+
/**
|
|
3857
|
+
* Gemini model id. `null` or empty returns it to the default, the platform's `agents.model` (`GET /v1/platform/limits`).
|
|
3858
|
+
*/
|
|
3859
|
+
model?: string | null;
|
|
3860
|
+
/**
|
|
3861
|
+
* Human-readable name. Shown in the console; never sent to the model.
|
|
3862
|
+
*/
|
|
3863
|
+
name?: string;
|
|
3864
|
+
/**
|
|
3865
|
+
* Who the agent is — character, background, quirks.
|
|
3866
|
+
*/
|
|
3867
|
+
personality?: string | null;
|
|
3868
|
+
/**
|
|
3869
|
+
* Whether the agent keeps a standing relationship with each person it talks to — warmth, trust and how well they know each other, carried across every conversation with that end user and never forgotten.
|
|
3870
|
+
*
|
|
3871
|
+
* Turning this on declares a tool the model calls when something changes its view of them. **It adds no latency to an ordinary turn**: the provider returns the reply and the tool call together, and the call is answered on the next turn. The one exception is a reply that is only the call with no words in it, which costs a second model call to write them.
|
|
3872
|
+
*
|
|
3873
|
+
* Read it with `GET /v1/agent/relations`.
|
|
3874
|
+
*/
|
|
3875
|
+
relation_enabled?: boolean | null;
|
|
3876
|
+
/**
|
|
3877
|
+
* What the model is told about the relationship it keeps. Unset uses the organisation's default, then a built-in one.
|
|
3878
|
+
*
|
|
3879
|
+
* This is the *disposition* — that the history is real and that most replies should record nothing. The tool's own description covers the mechanism, and is not configurable.
|
|
3880
|
+
*/
|
|
3881
|
+
relation_instruction?: string | null;
|
|
3882
|
+
/**
|
|
3883
|
+
* How a streamed reply is cut into pieces for speech, smallest first - for example `[60, 160, 250]`. Ascending; a schedule out of order is refused.
|
|
3884
|
+
*
|
|
3885
|
+
* **Only `/v1/agent/stream` uses this**; a buffered turn has the whole reply before it speaks and nothing to schedule.
|
|
3886
|
+
*
|
|
3887
|
+
* The **first** number is the one that matters: it decides how much text must arrive before the agent starts talking, so lowering it starts speech sooner. There is a floor worth knowing - a chunk has to be generated faster than the previous one plays, so a first chunk under roughly 50 characters starts sooner and then runs out of audio before the next piece exists, which is heard as a stutter rather than as a fast reply. Later numbers trade first-audio latency for prosody: a longer piece is spoken with better intonation because the model can see more of the sentence at once.
|
|
3888
|
+
*
|
|
3889
|
+
* Omit it to use your organisation's default, and then the platform's.
|
|
3890
|
+
*/
|
|
3891
|
+
stream_chunk_schedule?: Array<number> | null;
|
|
3892
|
+
/**
|
|
3893
|
+
* How a spoken turn is transcribed — the model, the language hint, and the sample rate a client sends PCM at on `/v1/agent/stream`. Only what you set is stored: a model left unset follows the platform's default.
|
|
3894
|
+
*
|
|
3895
|
+
* **Defaults, not policy.** `user_audio.start` may name any of these per turn and what it names wins. There is no switch for hearing, and no scope of its own: a credential that may talk to an agent may speak to it, exactly as it has always been able to hear it speak back.
|
|
3896
|
+
*/
|
|
3897
|
+
stt_config?: AgentStt | null;
|
|
3898
|
+
/**
|
|
3899
|
+
* How hard the model thinks before answering. `minimal` is fastest to first token; `medium` is the model's own default. Unset means the model decides.
|
|
3900
|
+
*/
|
|
3901
|
+
thinking_level?: 'minimal' | 'low' | 'medium' | 'high' | null;
|
|
3902
|
+
/**
|
|
3903
|
+
* Whether a readable summary of the reasoning is returned.
|
|
3904
|
+
*/
|
|
3905
|
+
thinking_summaries?: 'auto' | 'none' | null;
|
|
3906
|
+
/**
|
|
3907
|
+
* How it speaks: register, pacing, verbosity.
|
|
3908
|
+
*/
|
|
3909
|
+
tone?: string | null;
|
|
3910
|
+
/**
|
|
3911
|
+
* Whether the model may read a web page by its address while it replies, when the person gives one or one is in its instructions. Gemini's own tool: the page is fetched by Google. The pages it read come back as the reply's `sources`.
|
|
3912
|
+
*
|
|
3913
|
+
* **No fee, but not free**: a page's text is model tokens, billed like any reply — a long page can be thousands. A page is untrusted input: what it says reaches the model, so the most it can steer the agent towards is the agent's own tools, and a tool marked `ask_first` still needs the person.
|
|
3914
|
+
*/
|
|
3915
|
+
url_context?: boolean | null;
|
|
3916
|
+
/**
|
|
3917
|
+
* Voice and model settings.
|
|
3918
|
+
*
|
|
3919
|
+
* **A speaking agent speaks on `eleven_flash_v2_5` or `eleven_multilingual_v2` with an ElevenLabs voice, and on `inworld-tts-2-flash` or `inworld-tts-2` with an Inworld one** — unset, the voice's provider's fastest — with any voice from `GET /v1/voices` that offers it. `eleven_v3` is refused with 422 when `voice_enabled` is true: it cannot stream over the socket agents use. An agent that does not speak may leave this unset.
|
|
3920
|
+
*/
|
|
3921
|
+
voice_config?: AgentVoice | null;
|
|
3922
|
+
/**
|
|
3923
|
+
* Whether replies come back as audio as well as text.
|
|
3924
|
+
*
|
|
3925
|
+
* Speech is generated after the reply and adds its own latency — roughly a fifth of the spoken duration. A caller can override this per turn with `speech` on the socket's `user_message` or `user_audio.start`.
|
|
3926
|
+
*/
|
|
3927
|
+
voice_enabled?: boolean | null;
|
|
3928
|
+
/**
|
|
3929
|
+
* The sections of this agent's settings it takes from your organisation's `agent_defaults` (`GET /v1/agents/settings`) instead of its own: the complete list, `null` or `[]` for none.
|
|
3930
|
+
*
|
|
3931
|
+
* A new agent follows every section you did not set when you made it. An agent made before this existed follows none until you say so.
|
|
3932
|
+
*
|
|
3933
|
+
* Sending a value that differs from what a followed section runs with customises that section: the organisation's values are copied onto the agent and your change laid over them. Sending the value it already runs with changes nothing. Naming a section here and sending a different value for one of its fields in the same request is a 422.
|
|
3934
|
+
*/
|
|
3935
|
+
org_defaults?: Array<'model' | 'voice' | 'hearing' | 'emotion' | 'relationship' | 'knowledge' | 'builtin_tools' | 'compaction' | 'facts' | 'memories' | 'reports' | 'outreach' | 'safety'> | null;
|
|
3936
|
+
/**
|
|
3937
|
+
* The `version` you last read for this agent. When set and the agent has been changed since, the update is refused with 409 and nothing is written - re-read it and decide again. Omit it to write unconditionally.
|
|
3938
|
+
*/
|
|
3939
|
+
expected_version?: number | null;
|
|
3940
|
+
/**
|
|
3941
|
+
* Why you made this change, up to 500 characters: kept with the version it makes and shown in the agent's history.
|
|
3942
|
+
*/
|
|
3943
|
+
version_note?: string | null;
|
|
3944
|
+
};
|
|
3945
|
+
export type AgentVersionPage = {
|
|
3946
|
+
data: Array<AgentVersionSummary>;
|
|
3947
|
+
/**
|
|
3948
|
+
* Pass as `cursor` for the next page; `null` when this is the last.
|
|
3949
|
+
*/
|
|
3950
|
+
next_cursor: string | null;
|
|
3951
|
+
};
|
|
3952
|
+
export type AgentVersionSummary = {
|
|
3953
|
+
/**
|
|
3954
|
+
* Its number: the agent's `version` when it was made. Recorded on every reply it wrote, every report and every message the agent wrote first, so you can tell which version said what.
|
|
3955
|
+
*/
|
|
3956
|
+
version: number;
|
|
3957
|
+
/**
|
|
3958
|
+
* Players have this version: it is the agent's `version` now.
|
|
3959
|
+
*/
|
|
3960
|
+
live: boolean;
|
|
3961
|
+
/**
|
|
3962
|
+
* How it was made: `created` with the agent; `saved` by a change made live — an update, its tools or knowledge entries assigned, a handoff target deleted; `published` from a draft; `restored` from an earlier version (`restored_from`); `existing` — the version the agent was on when its history began.
|
|
3963
|
+
*/
|
|
3964
|
+
source: 'created' | 'saved' | 'published' | 'restored' | 'existing';
|
|
3965
|
+
/**
|
|
3966
|
+
* The version a restore put back; `null` otherwise.
|
|
3967
|
+
*/
|
|
3968
|
+
restored_from: number | null;
|
|
3969
|
+
/**
|
|
3970
|
+
* The note given with the change — `version_note` on an update, `note` on a restore — or `null`.
|
|
3971
|
+
*/
|
|
3972
|
+
note: string | null;
|
|
3973
|
+
/**
|
|
3974
|
+
* What changed from the version before it: the agent's fields by name, and `tools` and `knowledge` for what was assigned. `null` when the version before it is no longer kept, or there is none.
|
|
3975
|
+
*/
|
|
3976
|
+
changes: Array<string> | null;
|
|
3977
|
+
created_at: string;
|
|
3978
|
+
/**
|
|
3979
|
+
* The dashboard member who made it, or `null`.
|
|
3980
|
+
*/
|
|
3981
|
+
created_by_clerk_user_id: string | null;
|
|
3982
|
+
/**
|
|
3983
|
+
* That member's email, as it was when they made it; `null` when unknown.
|
|
3984
|
+
*/
|
|
3985
|
+
created_by_email: string | null;
|
|
3986
|
+
/**
|
|
3987
|
+
* The API key that made it, or `null`. With all three `null`, the platform made it — a handoff target deleted, or the version recorded when the history began.
|
|
3988
|
+
*/
|
|
3989
|
+
created_by_api_key_id: string | null;
|
|
3990
|
+
};
|
|
3991
|
+
export type AgentVersion = {
|
|
3992
|
+
/**
|
|
3993
|
+
* Its number: the agent's `version` when it was made. Recorded on every reply it wrote, every report and every message the agent wrote first, so you can tell which version said what.
|
|
3994
|
+
*/
|
|
3995
|
+
version: number;
|
|
3996
|
+
/**
|
|
3997
|
+
* Players have this version: it is the agent's `version` now.
|
|
3998
|
+
*/
|
|
3999
|
+
live: boolean;
|
|
4000
|
+
/**
|
|
4001
|
+
* How it was made: `created` with the agent; `saved` by a change made live — an update, its tools or knowledge entries assigned, a handoff target deleted; `published` from a draft; `restored` from an earlier version (`restored_from`); `existing` — the version the agent was on when its history began.
|
|
4002
|
+
*/
|
|
4003
|
+
source: 'created' | 'saved' | 'published' | 'restored' | 'existing';
|
|
4004
|
+
/**
|
|
4005
|
+
* The version a restore put back; `null` otherwise.
|
|
4006
|
+
*/
|
|
4007
|
+
restored_from: number | null;
|
|
4008
|
+
/**
|
|
4009
|
+
* The note given with the change — `version_note` on an update, `note` on a restore — or `null`.
|
|
4010
|
+
*/
|
|
4011
|
+
note: string | null;
|
|
4012
|
+
/**
|
|
4013
|
+
* What changed from the version before it: the agent's fields by name, and `tools` and `knowledge` for what was assigned. `null` when the version before it is no longer kept, or there is none.
|
|
4014
|
+
*/
|
|
4015
|
+
changes: Array<string> | null;
|
|
4016
|
+
created_at: string;
|
|
4017
|
+
/**
|
|
4018
|
+
* The dashboard member who made it, or `null`.
|
|
4019
|
+
*/
|
|
4020
|
+
created_by_clerk_user_id: string | null;
|
|
4021
|
+
/**
|
|
4022
|
+
* That member's email, as it was when they made it; `null` when unknown.
|
|
4023
|
+
*/
|
|
4024
|
+
created_by_email: string | null;
|
|
4025
|
+
/**
|
|
4026
|
+
* The API key that made it, or `null`. With all three `null`, the platform made it — a handoff target deleted, or the version recorded when the history began.
|
|
4027
|
+
*/
|
|
4028
|
+
created_by_api_key_id: string | null;
|
|
4029
|
+
agent: AgentInfo;
|
|
4030
|
+
/**
|
|
4031
|
+
* The tools it had that are still in your library. A tool's own settings are not part of a version: an edit to a tool reaches every version.
|
|
4032
|
+
*/
|
|
4033
|
+
tool_ids: Array<string>;
|
|
4034
|
+
/**
|
|
4035
|
+
* The knowledge entries it had that are still in your library. Their text is not part of a version: entries are shared by your agents.
|
|
4036
|
+
*/
|
|
4037
|
+
knowledge_entry_ids: Array<string>;
|
|
4038
|
+
/**
|
|
4039
|
+
* Tools it had that have been deleted since.
|
|
4040
|
+
*/
|
|
4041
|
+
deleted_tools: number;
|
|
4042
|
+
/**
|
|
4043
|
+
* Knowledge entries it had that have been deleted since.
|
|
4044
|
+
*/
|
|
4045
|
+
deleted_knowledge_entries: number;
|
|
4046
|
+
};
|
|
4047
|
+
export type AgentRestored = {
|
|
4048
|
+
agent: AgentInfo;
|
|
4049
|
+
/**
|
|
4050
|
+
* What the version named that is gone, and so was not put back.
|
|
4051
|
+
*/
|
|
4052
|
+
left_out: {
|
|
4053
|
+
/**
|
|
4054
|
+
* Tools the version had that have been deleted since.
|
|
4055
|
+
*/
|
|
4056
|
+
tool_ids: Array<string>;
|
|
4057
|
+
/**
|
|
4058
|
+
* Knowledge entries the version had that have been deleted since.
|
|
4059
|
+
*/
|
|
4060
|
+
knowledge_entry_ids: Array<string>;
|
|
4061
|
+
/**
|
|
4062
|
+
* Agents it handed conversations to that have been deleted since.
|
|
4063
|
+
*/
|
|
4064
|
+
handoff_agent_ids: Array<string>;
|
|
4065
|
+
};
|
|
4066
|
+
};
|
|
4067
|
+
export type AgentVersionRestore = {
|
|
4068
|
+
/**
|
|
4069
|
+
* Why you put it back, up to 500 characters: kept with the version the restore makes.
|
|
4070
|
+
*/
|
|
4071
|
+
note?: string | null;
|
|
4072
|
+
/**
|
|
4073
|
+
* The agent's `version` you last read. When set and the agent has changed since, the restore is refused with 409 and nothing is written.
|
|
4074
|
+
*/
|
|
4075
|
+
expected_version?: number | null;
|
|
4076
|
+
};
|
|
4077
|
+
export type AgentDraft = {
|
|
4078
|
+
agent: AgentInfo;
|
|
4079
|
+
/**
|
|
4080
|
+
* The tools the agent would have: live's, with the draft's added and taken away.
|
|
4081
|
+
*/
|
|
4082
|
+
tool_ids: Array<string>;
|
|
4083
|
+
/**
|
|
4084
|
+
* The knowledge entries it would have: live's, with the draft's given and taken away.
|
|
4085
|
+
*/
|
|
4086
|
+
knowledge_entry_ids: Array<string>;
|
|
4087
|
+
/**
|
|
4088
|
+
* Whether the draft changes anything. `false`: the draft is the agent as players have it.
|
|
4089
|
+
*/
|
|
4090
|
+
pending: boolean;
|
|
4091
|
+
/**
|
|
4092
|
+
* What the draft changes from the version players have, by field, with `tools` and `knowledge` for what it assigns. Empty when nothing is pending.
|
|
4093
|
+
*/
|
|
4094
|
+
changes: Array<string>;
|
|
4095
|
+
/**
|
|
4096
|
+
* What publishing it would refuse today — a model and thinking level that no longer go together after a live change, say. Empty when it would publish.
|
|
4097
|
+
*/
|
|
4098
|
+
problems: Array<{
|
|
4099
|
+
field: string | null;
|
|
4100
|
+
message: string;
|
|
4101
|
+
}>;
|
|
4102
|
+
/**
|
|
4103
|
+
* The draft's own number: moves on every save of the draft, a publish and a discard, and is never reused. Send it back as `expected_version` on a draft's save, publish or discard to have it refused (409) if somebody else changed the draft since you read it.
|
|
4104
|
+
*/
|
|
4105
|
+
version: number;
|
|
4106
|
+
/**
|
|
4107
|
+
* The agent's `version` players have now.
|
|
4108
|
+
*/
|
|
4109
|
+
live_version: number;
|
|
4110
|
+
/**
|
|
4111
|
+
* The agent's `version` when the draft began; `null` with nothing pending. When it is not `live_version`, the agent changed live since — the draft's changes are laid over what players have now.
|
|
4112
|
+
*/
|
|
4113
|
+
base_version: number | null;
|
|
4114
|
+
updated_at: string | null;
|
|
4115
|
+
updated_by_clerk_user_id: string | null;
|
|
4116
|
+
updated_by_email: string | null;
|
|
4117
|
+
updated_by_api_key_id: string | null;
|
|
4118
|
+
};
|
|
4119
|
+
export type AgentDraftUpdate = {
|
|
4120
|
+
/**
|
|
4121
|
+
* Whether a report is written after each conversation with this agent, for your server: a summary, the fields you list in `report_fields`, success by `report_success`, and its numbers. **Off by default**: each report is a model call, charged to the conversation's key while it has credit and to your balance after.
|
|
4122
|
+
*
|
|
4123
|
+
* A conversation is over when the app sends `end` on the socket, or after five minutes with no turn; a person who comes back later gets a new report of only the new part. Read reports with `GET /v1/end-users/{end_user_id}/reports`.
|
|
4124
|
+
*/
|
|
4125
|
+
report_enabled?: boolean | null;
|
|
4126
|
+
/**
|
|
4127
|
+
* What a conversation's report fills, besides its summary, at most 20: each read from the conversation by the model, `null` when the conversation did not say. Old Bram the shopkeeper's might be `quest_started` (yes or no) and `item` (text). The complete list, in order: `null` or `[]` clears it.
|
|
4128
|
+
*/
|
|
4129
|
+
report_fields?: Array<AgentReportField> | null;
|
|
4130
|
+
/**
|
|
4131
|
+
* What counts as a success, in plain words the model judges each conversation by: `success = the problem was solved`. A report's `success` is `true` or `false` by it; unset, `null`. At most 1000 characters.
|
|
4132
|
+
*/
|
|
4133
|
+
report_success?: string | null;
|
|
4134
|
+
/**
|
|
4135
|
+
* Anything else the report should follow, added to the platform's request: `Write the summary in English.` At most 2000 characters.
|
|
4136
|
+
*/
|
|
4137
|
+
report_instruction?: string | null;
|
|
4138
|
+
/**
|
|
4139
|
+
* Model for writing a conversation's report. Unset uses the agent's own.
|
|
4140
|
+
*/
|
|
4141
|
+
report_model?: string | null;
|
|
4142
|
+
/**
|
|
4143
|
+
* Thinking level for the report. Unset sends none, so the model's own default applies.
|
|
4144
|
+
*/
|
|
4145
|
+
report_thinking_level?: 'minimal' | 'low' | 'medium' | 'high' | null;
|
|
4146
|
+
/**
|
|
4147
|
+
* Length cap on a report's answer, in tokens — the model's thinking included. Unset sends none.
|
|
4148
|
+
*/
|
|
4149
|
+
report_max_output_tokens?: number | null;
|
|
4150
|
+
/**
|
|
4151
|
+
* Whether a report carries the messages it read, as `transcript` — in the webhook and on the API. Off by default: a report says what happened; the transcript is the conversation again, up to 200,000 characters.
|
|
4152
|
+
*/
|
|
4153
|
+
report_transcript?: boolean | null;
|
|
4154
|
+
/**
|
|
4155
|
+
* Where this agent's events go — a conversation's report, signed with your organisation's webhook secret: an `https://` address of yours. Unset uses your organisation's `webhook_url` (`/v1/agents/settings`). Refused (422) until your organisation has a secret: `POST /v1/agents/settings/webhook-secret`.
|
|
4156
|
+
*/
|
|
4157
|
+
webhook_url?: string | null;
|
|
4158
|
+
/**
|
|
4159
|
+
* Who the agent talks with, and so how careful it is: `kids` (7 or older), `teens` (13 to 17) or `adults`. **Unset is `adults`**, which changes nothing: the agent's request to the model is what it was before the level existed.
|
|
4160
|
+
*
|
|
4161
|
+
* `kids` and `teens` add the platform's rules for that age to the agent's instructions — nothing frightening, sexual or unkind for a child; nothing graphic or encouraging harm for a teenager — and turn on the model provider's own safety filters for that age. When the person brings up something the rules keep the agent from, it stays in character and changes the subject. The rules and the filters' levels are in the Safety guide, word for word. No extra model call, and no wait: they ride on the request each reply already makes.
|
|
4162
|
+
*/
|
|
4163
|
+
age_level?: 'kids' | 'teens' | 'adults' | null;
|
|
4164
|
+
/**
|
|
4165
|
+
* Topics the agent never discusses, in plain words ("real-world politics", "prices"): at most 20, each 1 to 100 characters on one line, no two the same. When the person brings one up, the agent stays in character and changes the subject. At any `age_level`. A topic's words decide what it covers, so name it as narrowly as you mean it. The complete list: `null` or `[]` clears it.
|
|
4166
|
+
*/
|
|
4167
|
+
blocked_topics?: Array<string> | null;
|
|
4168
|
+
/**
|
|
4169
|
+
* What the agent says when the model provider's own safety filter holds a reply back, in place of it: one line in the agent's voice, such as "Hmm, let's talk about something else!" — 1 to 300 characters, at any `age_level`. It is said and spoken as any reply, and the turn ends with `turn.done`; a reply held back part-way keeps what it had said, less the sentence it was writing. **Unset, a held-back reply ends with an `error` (`provider_failed`) and `interrupted`**, as before. Never for the opening line. Recommended for `kids` and `teens`, whose filters are stricter.
|
|
4170
|
+
*/
|
|
4171
|
+
fallback_message?: string | null;
|
|
4172
|
+
/**
|
|
4173
|
+
* Other agents of yours this one may pass the conversation to, each with when: the agent is offered a tool to hand off, and the agent it hands to answers the person's last message and carries the conversation on, with its own instructions, voice, knowledge and tools. At most 10. The complete list, in order: `null` or `[]` clears it.
|
|
4174
|
+
*/
|
|
4175
|
+
handoffs?: Array<AgentHandoff> | null;
|
|
4176
|
+
/**
|
|
4177
|
+
* Whether this agent may write to a person first, while they are away — a message your server schedules with `POST /v1/end-users/{end_user_id}/scheduled-messages`, or one the agent schedules itself when the person asks (`outreach_tool`). **Off by default.**
|
|
4178
|
+
*
|
|
4179
|
+
* A message is one model call, paid from your organisation's balance: the person has no live key while away. It is kept in their conversation with the agent, so it is there when they come back, and your server is sent it to show as a notification.
|
|
4180
|
+
*/
|
|
4181
|
+
outreach_enabled?: boolean | null;
|
|
4182
|
+
/**
|
|
4183
|
+
* No message of the agent's own between these times, in the person's time zone: one due then waits for the end — a 23:00 message is written at 08:00. `null` for none.
|
|
4184
|
+
*/
|
|
4185
|
+
outreach_quiet_hours?: AgentQuietHours | null;
|
|
4186
|
+
/**
|
|
4187
|
+
* The time zone the agent reads quiet hours in for a person with none of their own — your main market. A person's own is the one your server sets (`time_zone` on `PATCH /v1/end-users/{end_user_id}/personalization`), else the one their app reported. `null` is UTC.
|
|
4188
|
+
*/
|
|
4189
|
+
outreach_time_zone?: string | null;
|
|
4190
|
+
/**
|
|
4191
|
+
* Whether the agent may schedule a message itself when the person asks ("remind me at 6") — the platform's tool `schedule_message`, offered only with `outreach_enabled` on. **On by default**: turn it off for your server alone to write.
|
|
4192
|
+
*/
|
|
4193
|
+
outreach_tool?: boolean | null;
|
|
4194
|
+
/**
|
|
4195
|
+
* Whether the model may write and run Python while it replies — sums, unit conversions, dates — and answer from what it printed. Gemini's own tool: it runs at Google, with no network, and nothing of yours.
|
|
4196
|
+
*
|
|
4197
|
+
* **No fee, but not free**: the code and its output are model tokens, billed like any reply.
|
|
4198
|
+
*/
|
|
4199
|
+
code_execution?: boolean | null;
|
|
4200
|
+
/**
|
|
4201
|
+
* What to tell the model when summarising. Unset uses the organisation's default, then a built-in instruction written for in-character conversations.
|
|
4202
|
+
*/
|
|
4203
|
+
compact_instruction?: string | null;
|
|
4204
|
+
/**
|
|
4205
|
+
* Length cap on the summary, in tokens — the model's thinking included, which shares the budget. Unset uses the platform's `agents.memory.compaction.max_output_tokens` on the Limits page.
|
|
4206
|
+
*/
|
|
4207
|
+
compact_max_output_tokens?: number | null;
|
|
4208
|
+
/**
|
|
4209
|
+
* Model for the summarising call. Unset uses the agent's own. A compaction only summarises: facts are a call of their own (`fact_model`).
|
|
4210
|
+
*/
|
|
4211
|
+
compact_model?: string | null;
|
|
4212
|
+
/**
|
|
4213
|
+
* Thinking level for the summarising call.
|
|
4214
|
+
*/
|
|
4215
|
+
compact_thinking_level?: 'minimal' | 'low' | 'medium' | 'high' | null;
|
|
4216
|
+
/**
|
|
4217
|
+
* Compact automatically once a reply's first model call reads this many tokens — the conversation, its summary and the instruction, without the inline knowledge or the turn's looked-up passages, which no summary shrinks. Tool results do not count. Unset uses the platform's default, `agents.memory.compaction.default_threshold_tokens` on the Limits page. At most 200,000, and at least twice what the instruction costs on its own. `POST /v1/agent/sessions/{id}/compact` works whatever it is.
|
|
4218
|
+
*/
|
|
4219
|
+
compact_threshold_tokens?: number | null;
|
|
4220
|
+
/**
|
|
4221
|
+
* Whether the model reports its own mood — one line in front of each reply, which is taken off the reply and sent as the socket's `mood` event, and kept on each stored message.
|
|
4222
|
+
*
|
|
4223
|
+
* Costs about six output tokens per turn and no extra model call. The reply text you are handed does not contain the line: a marker with a known label, or with an intensity, or alone on its own line is always removed, and only a marker with an unknown label, no intensity and prose on the same line is left — at that point it cannot be told from a sentence that happens to start with the word.
|
|
4224
|
+
*/
|
|
4225
|
+
emotion_enabled?: boolean | null;
|
|
4226
|
+
/**
|
|
4227
|
+
* What the model is told about reporting a mood. Unset uses the organisation's default, then a built-in one naming every supported label.
|
|
4228
|
+
*
|
|
4229
|
+
* **Override this and you own the format.** The gateway strips a first line shaped `mood: <label> <intensity>` — with a label it knows, or with an intensity, or alone on its line — and records a mood only for a label it knows. An instruction that asks for any other shape leaves the model's line in the reply as text and stores no mood.
|
|
4230
|
+
*/
|
|
4231
|
+
emotion_instruction?: string | null;
|
|
4232
|
+
/**
|
|
4233
|
+
* The setting the conversation takes place in.
|
|
4234
|
+
*/
|
|
4235
|
+
environment?: string | null;
|
|
4236
|
+
/**
|
|
4237
|
+
* What counts as worth remembering. Unset falls back to the organisation's default, then to a built-in instruction.
|
|
4238
|
+
*/
|
|
4239
|
+
fact_instruction?: string | null;
|
|
4240
|
+
/**
|
|
4241
|
+
* Length cap on a facts reading's answer, in tokens — the model's thinking included, which shares the budget. Unset sends none: the answer is a short list by its shape.
|
|
4242
|
+
*/
|
|
4243
|
+
fact_max_output_tokens?: number | null;
|
|
4244
|
+
/**
|
|
4245
|
+
* Model for reading a conversation for facts — the reading after a conversation goes quiet, and `POST /v1/agent/sessions/{id}/extract`. Unset uses the agent's own. Never compaction's: the two are separate calls.
|
|
4246
|
+
*/
|
|
4247
|
+
fact_model?: string | null;
|
|
4248
|
+
/**
|
|
4249
|
+
* Thinking level for the facts reading. Unset sends none, so the model's own default applies.
|
|
4250
|
+
*/
|
|
4251
|
+
fact_thinking_level?: 'minimal' | 'low' | 'medium' | 'high' | null;
|
|
4252
|
+
/**
|
|
4253
|
+
* Whether this agent remembers facts about the people it talks to. **On by default**, unlike most switches here.
|
|
4254
|
+
*
|
|
4255
|
+
* Off, its conversations are never read for facts and its turns recall none — nothing is charged for either — and `POST /v1/agent/sessions/{id}/extract` is refused. Facts already stored stay, and other agents still recall the ones they share. Turning it back on reads only what is said from then on.
|
|
4256
|
+
*/
|
|
4257
|
+
facts_enabled?: boolean | null;
|
|
4258
|
+
/**
|
|
4259
|
+
* Whose facts this agent sees and adds to. `person` (the default, and what unset means): what any of your agents learnt about the person that shares. `agent`: its own only — what it learns is not recalled by your other agents, and it does not recall theirs.
|
|
4260
|
+
*
|
|
4261
|
+
* A change applies to what it learns from then on: a fact keeps the scope it was learnt under.
|
|
4262
|
+
*/
|
|
4263
|
+
facts_scope?: 'person' | 'agent' | null;
|
|
4264
|
+
/**
|
|
4265
|
+
* The agent's opening line — or, with `first_message_generated` on, the direction for one.
|
|
4266
|
+
*
|
|
4267
|
+
* As a line it costs no tokens and is identical every time. As a direction ("say hello and catch up with them") the model writes it fresh, so it can use whatever long-term memory recalled about that person — at the cost of one billed model call.
|
|
4268
|
+
*
|
|
4269
|
+
* **Either way it is delivered as the agent's first turn on `/v1/agent/stream`**, so it is streamed and spoken a sentence at a time like every other reply. Opening a session with `POST /v1/agent/sessions` does not produce it, and an integration that never opens a socket never hears it.
|
|
4270
|
+
*
|
|
4271
|
+
* The agent is not greeted twice: a conversation continued within a few minutes gets no fresh opening line, and `ready.greeting` says which before a frame arrives.
|
|
4272
|
+
*/
|
|
4273
|
+
first_message?: string | null;
|
|
4274
|
+
/**
|
|
4275
|
+
* Whether a written opening line (`first_message_generated` on) is shown the topics the agent remembers of the person — their titles, where each stands and when it was last talked about — so it can open with one ("How is Inolab Trials going?"). **On by default.** It is never shown their stories, and cannot search them: the opening is one model call. Off, it is shown the person's facts only. Nothing with `memories_enabled` off, and nothing for a scripted line.
|
|
4276
|
+
*/
|
|
4277
|
+
first_message_memories?: boolean | null;
|
|
4278
|
+
/**
|
|
4279
|
+
* Whether `first_message` is a direction for the model rather than the words themselves.
|
|
4280
|
+
*
|
|
4281
|
+
* **The same text means different things under this flag**, and nothing on the server can tell them apart. Turning it off while the text is still written as an instruction shows that instruction to your users verbatim.
|
|
3245
4282
|
*
|
|
3246
4283
|
* It needs a `first_message` to act on: switched on with the text empty is refused (422), because an agent with a direction to follow and no direction never greets.
|
|
3247
4284
|
*/
|
|
@@ -3313,7 +4350,7 @@ export type AgentUpdate = {
|
|
|
3313
4350
|
*/
|
|
3314
4351
|
memory_thinking_level?: 'minimal' | 'low' | 'medium' | 'high' | null;
|
|
3315
4352
|
/**
|
|
3316
|
-
* Gemini model id.
|
|
4353
|
+
* Gemini model id. Defaults to the platform's `agents.model` (`GET /v1/platform/limits`).
|
|
3317
4354
|
*/
|
|
3318
4355
|
model?: string | null;
|
|
3319
4356
|
/**
|
|
@@ -3385,7 +4422,33 @@ export type AgentUpdate = {
|
|
|
3385
4422
|
*/
|
|
3386
4423
|
voice_enabled?: boolean | null;
|
|
3387
4424
|
/**
|
|
3388
|
-
* The
|
|
4425
|
+
* The sections of this agent's settings it takes from your organisation's `agent_defaults` (`GET /v1/agents/settings`) instead of its own: the complete list, `null` or `[]` for none.
|
|
4426
|
+
*
|
|
4427
|
+
* A new agent follows every section you did not set when you made it. An agent made before this existed follows none until you say so.
|
|
4428
|
+
*
|
|
4429
|
+
* Sending a value that differs from what a followed section runs with customises that section: the organisation's values are copied onto the agent and your change laid over them. Sending the value it already runs with changes nothing. Naming a section here and sending a different value for one of its fields in the same request is a 422.
|
|
4430
|
+
*/
|
|
4431
|
+
org_defaults?: Array<'model' | 'voice' | 'hearing' | 'emotion' | 'relationship' | 'knowledge' | 'builtin_tools' | 'compaction' | 'facts' | 'memories' | 'reports' | 'outreach' | 'safety'> | null;
|
|
4432
|
+
/**
|
|
4433
|
+
* The whole set of tools the agent would have, by `tl_…`; omitted, the draft's as they are. Ids not yours are left out.
|
|
4434
|
+
*/
|
|
4435
|
+
tool_ids?: Array<string>;
|
|
4436
|
+
/**
|
|
4437
|
+
* The whole set of knowledge entries the agent would have; omitted, the draft's as they are. Ids not yours are left out.
|
|
4438
|
+
*/
|
|
4439
|
+
knowledge_entry_ids?: Array<string>;
|
|
4440
|
+
/**
|
|
4441
|
+
* The draft's `version` you last read. When set and the draft has been changed since, the save is refused with 409 and nothing is written.
|
|
4442
|
+
*/
|
|
4443
|
+
expected_version?: number | null;
|
|
4444
|
+
};
|
|
4445
|
+
export type AgentDraftPublish = {
|
|
4446
|
+
/**
|
|
4447
|
+
* Why, up to 500 characters: kept with the version it makes.
|
|
4448
|
+
*/
|
|
4449
|
+
note?: string | null;
|
|
4450
|
+
/**
|
|
4451
|
+
* The draft's `version` you last read: refused with 409 when the draft changed since, so what you reviewed is what is published.
|
|
3389
4452
|
*/
|
|
3390
4453
|
expected_version?: number | null;
|
|
3391
4454
|
};
|
|
@@ -3603,6 +4666,14 @@ export type ConversationReport = {
|
|
|
3603
4666
|
* Every agent that spoke in the part reported, in order of first word: more than one when an agent handed the conversation on.
|
|
3604
4667
|
*/
|
|
3605
4668
|
agent_ids: Array<string>;
|
|
4669
|
+
/**
|
|
4670
|
+
* Every agent and [version](/agents/versions) that replied in the part, in the order they first did: one, unless a new version was published or an agent handed the conversation on while it ran. Group reports by it to see how each version did.
|
|
4671
|
+
*/
|
|
4672
|
+
agent_versions: Array<ReportAgentVersion>;
|
|
4673
|
+
/**
|
|
4674
|
+
* Written in a test chat, on the agent's unpublished draft (`draft` on `POST /v1/ephemeral-keys`), not a player's conversation; its webhook post says `test: true`. Skip it where you count what players did.
|
|
4675
|
+
*/
|
|
4676
|
+
draft: boolean;
|
|
3606
4677
|
/**
|
|
3607
4678
|
* What made it due: `ended`, the app sent `end`; `quiet`, five minutes with no turn; `max_wait`, a conversation that never went quiet, reported after the platform's `agents.memory.max_wait_hours`.
|
|
3608
4679
|
*/
|
|
@@ -3668,6 +4739,13 @@ export type ConversationReport = {
|
|
|
3668
4739
|
*/
|
|
3669
4740
|
transcript: Array<ReportLine> | null;
|
|
3670
4741
|
};
|
|
4742
|
+
export type ReportAgentVersion = {
|
|
4743
|
+
agent_id: string;
|
|
4744
|
+
/**
|
|
4745
|
+
* Its [version](/agents/versions) — v5 is `5`; `null` for a reply written before versions.
|
|
4746
|
+
*/
|
|
4747
|
+
version: number | null;
|
|
4748
|
+
};
|
|
3671
4749
|
export type ReportDelivery = {
|
|
3672
4750
|
/**
|
|
3673
4751
|
* `none`: the agent had no webhook address when it was written; `pending`: being posted, and tried again while your server does not answer a 2xx; `delivered`; `failed`: not taken within the platform's `agents.webhooks.retry_minutes`.
|
|
@@ -3698,6 +4776,10 @@ export type ReportLine = {
|
|
|
3698
4776
|
* The agent that had the conversation; `null` for its first.
|
|
3699
4777
|
*/
|
|
3700
4778
|
agent_id: string | null;
|
|
4779
|
+
/**
|
|
4780
|
+
* On the agent's message: its [version](/agents/versions) that wrote it. `null` on the person's, and on one written before versions.
|
|
4781
|
+
*/
|
|
4782
|
+
agent_version: number | null;
|
|
3701
4783
|
created_at: string;
|
|
3702
4784
|
};
|
|
3703
4785
|
export type ScheduledMessage = {
|
|
@@ -3752,6 +4834,10 @@ export type ScheduledMessage = {
|
|
|
3752
4834
|
* What the agent wrote; null until it is written.
|
|
3753
4835
|
*/
|
|
3754
4836
|
text: string | null;
|
|
4837
|
+
/**
|
|
4838
|
+
* The agent's [version](/agents/versions) that wrote it; null until it is written.
|
|
4839
|
+
*/
|
|
4840
|
+
agent_version: number | null;
|
|
3755
4841
|
/**
|
|
3756
4842
|
* `away` when it was written with no app connected — show it as a notification; `socket` when the person's app was on the conversation and heard it there. Null until written.
|
|
3757
4843
|
*/
|
|
@@ -4815,7 +5901,7 @@ export type CreateEphemeralKeyErrors = {
|
|
|
4815
5901
|
*/
|
|
4816
5902
|
403: ErrorResponse;
|
|
4817
5903
|
/**
|
|
4818
|
-
* Scopes other than ["agent"], a minting key without `agent`, an unknown end user,
|
|
5904
|
+
* Scopes other than ["agent"], a minting key without `agent`, an unknown end user, a limit out of range, or a draft key minted without `agent:write` or for other than one agent
|
|
4819
5905
|
*/
|
|
4820
5906
|
422: ErrorResponse;
|
|
4821
5907
|
/**
|
|
@@ -7509,6 +8595,298 @@ export type UpdateAgentResponses = {
|
|
|
7509
8595
|
200: AgentInfo;
|
|
7510
8596
|
};
|
|
7511
8597
|
export type UpdateAgentResponse = UpdateAgentResponses[keyof UpdateAgentResponses];
|
|
8598
|
+
export type ListAgentVersionsData = {
|
|
8599
|
+
body?: never;
|
|
8600
|
+
path: {
|
|
8601
|
+
agent_id: string;
|
|
8602
|
+
};
|
|
8603
|
+
query?: never;
|
|
8604
|
+
url: '/v1/agents/{agent_id}/versions';
|
|
8605
|
+
};
|
|
8606
|
+
export type ListAgentVersionsErrors = {
|
|
8607
|
+
/**
|
|
8608
|
+
* Missing or invalid credentials
|
|
8609
|
+
*/
|
|
8610
|
+
401: ErrorResponse;
|
|
8611
|
+
/**
|
|
8612
|
+
* The key is valid but its scopes do not cover this capability — a key limited to `tts` gets this from `/v1/images` rather than a 401
|
|
8613
|
+
*/
|
|
8614
|
+
403: ErrorResponse;
|
|
8615
|
+
/**
|
|
8616
|
+
* Unknown agent id
|
|
8617
|
+
*/
|
|
8618
|
+
404: ErrorResponse;
|
|
8619
|
+
/**
|
|
8620
|
+
* The request failed validation
|
|
8621
|
+
*/
|
|
8622
|
+
422: ErrorResponse;
|
|
8623
|
+
/**
|
|
8624
|
+
* Rate limit exceeded
|
|
8625
|
+
*/
|
|
8626
|
+
429: ErrorResponse;
|
|
8627
|
+
};
|
|
8628
|
+
export type ListAgentVersionsError = ListAgentVersionsErrors[keyof ListAgentVersionsErrors];
|
|
8629
|
+
export type ListAgentVersionsResponses = {
|
|
8630
|
+
/**
|
|
8631
|
+
* The versions kept, newest first
|
|
8632
|
+
*/
|
|
8633
|
+
200: AgentVersionPage;
|
|
8634
|
+
};
|
|
8635
|
+
export type ListAgentVersionsResponse = ListAgentVersionsResponses[keyof ListAgentVersionsResponses];
|
|
8636
|
+
export type GetAgentVersionData = {
|
|
8637
|
+
body?: never;
|
|
8638
|
+
path: {
|
|
8639
|
+
agent_id: string;
|
|
8640
|
+
version: string;
|
|
8641
|
+
};
|
|
8642
|
+
query?: never;
|
|
8643
|
+
url: '/v1/agents/{agent_id}/versions/{version}';
|
|
8644
|
+
};
|
|
8645
|
+
export type GetAgentVersionErrors = {
|
|
8646
|
+
/**
|
|
8647
|
+
* Missing or invalid credentials
|
|
8648
|
+
*/
|
|
8649
|
+
401: ErrorResponse;
|
|
8650
|
+
/**
|
|
8651
|
+
* The key is valid but its scopes do not cover this capability — a key limited to `tts` gets this from `/v1/images` rather than a 401
|
|
8652
|
+
*/
|
|
8653
|
+
403: ErrorResponse;
|
|
8654
|
+
/**
|
|
8655
|
+
* Unknown agent id. Or: Unknown version: this agent never had it, or it is no longer kept.
|
|
8656
|
+
*/
|
|
8657
|
+
404: ErrorResponse;
|
|
8658
|
+
/**
|
|
8659
|
+
* The request failed validation
|
|
8660
|
+
*/
|
|
8661
|
+
422: ErrorResponse;
|
|
8662
|
+
/**
|
|
8663
|
+
* Rate limit exceeded
|
|
8664
|
+
*/
|
|
8665
|
+
429: ErrorResponse;
|
|
8666
|
+
};
|
|
8667
|
+
export type GetAgentVersionError = GetAgentVersionErrors[keyof GetAgentVersionErrors];
|
|
8668
|
+
export type GetAgentVersionResponses = {
|
|
8669
|
+
/**
|
|
8670
|
+
* The version, whole
|
|
8671
|
+
*/
|
|
8672
|
+
200: AgentVersion;
|
|
8673
|
+
};
|
|
8674
|
+
export type GetAgentVersionResponse = GetAgentVersionResponses[keyof GetAgentVersionResponses];
|
|
8675
|
+
export type RestoreAgentVersionData = {
|
|
8676
|
+
body: AgentVersionRestore;
|
|
8677
|
+
path: {
|
|
8678
|
+
agent_id: string;
|
|
8679
|
+
version: string;
|
|
8680
|
+
};
|
|
8681
|
+
query?: never;
|
|
8682
|
+
url: '/v1/agents/{agent_id}/versions/{version}/restore';
|
|
8683
|
+
};
|
|
8684
|
+
export type RestoreAgentVersionErrors = {
|
|
8685
|
+
/**
|
|
8686
|
+
* The request could not be read: malformed JSON
|
|
8687
|
+
*/
|
|
8688
|
+
400: ErrorResponse;
|
|
8689
|
+
/**
|
|
8690
|
+
* Missing or invalid credentials
|
|
8691
|
+
*/
|
|
8692
|
+
401: ErrorResponse;
|
|
8693
|
+
/**
|
|
8694
|
+
* The key is valid but its scopes do not cover this capability — a key limited to `tts` gets this from `/v1/images` rather than a 401
|
|
8695
|
+
*/
|
|
8696
|
+
403: ErrorResponse;
|
|
8697
|
+
/**
|
|
8698
|
+
* Unknown agent id. Or: Unknown version: this agent never had it, or it is no longer kept.
|
|
8699
|
+
*/
|
|
8700
|
+
404: ErrorResponse;
|
|
8701
|
+
/**
|
|
8702
|
+
* `expected_version` was sent and the agent has been changed since. Nothing was written.
|
|
8703
|
+
*/
|
|
8704
|
+
409: ErrorResponse;
|
|
8705
|
+
/**
|
|
8706
|
+
* The request failed validation
|
|
8707
|
+
*/
|
|
8708
|
+
422: ErrorResponse;
|
|
8709
|
+
/**
|
|
8710
|
+
* Rate limit exceeded
|
|
8711
|
+
*/
|
|
8712
|
+
429: ErrorResponse;
|
|
8713
|
+
};
|
|
8714
|
+
export type RestoreAgentVersionError = RestoreAgentVersionErrors[keyof RestoreAgentVersionErrors];
|
|
8715
|
+
export type RestoreAgentVersionResponses = {
|
|
8716
|
+
/**
|
|
8717
|
+
* The agent at its new version
|
|
8718
|
+
*/
|
|
8719
|
+
200: AgentRestored;
|
|
8720
|
+
};
|
|
8721
|
+
export type RestoreAgentVersionResponse = RestoreAgentVersionResponses[keyof RestoreAgentVersionResponses];
|
|
8722
|
+
export type DiscardAgentDraftData = {
|
|
8723
|
+
body?: never;
|
|
8724
|
+
path: {
|
|
8725
|
+
agent_id: string;
|
|
8726
|
+
};
|
|
8727
|
+
query?: never;
|
|
8728
|
+
url: '/v1/agents/{agent_id}/draft';
|
|
8729
|
+
};
|
|
8730
|
+
export type DiscardAgentDraftErrors = {
|
|
8731
|
+
/**
|
|
8732
|
+
* Missing or invalid credentials
|
|
8733
|
+
*/
|
|
8734
|
+
401: ErrorResponse;
|
|
8735
|
+
/**
|
|
8736
|
+
* The key is valid but its scopes do not cover this capability — a key limited to `tts` gets this from `/v1/images` rather than a 401
|
|
8737
|
+
*/
|
|
8738
|
+
403: ErrorResponse;
|
|
8739
|
+
/**
|
|
8740
|
+
* Unknown agent id
|
|
8741
|
+
*/
|
|
8742
|
+
404: ErrorResponse;
|
|
8743
|
+
/**
|
|
8744
|
+
* The request failed validation
|
|
8745
|
+
*/
|
|
8746
|
+
422: ErrorResponse;
|
|
8747
|
+
/**
|
|
8748
|
+
* Rate limit exceeded
|
|
8749
|
+
*/
|
|
8750
|
+
429: ErrorResponse;
|
|
8751
|
+
};
|
|
8752
|
+
export type DiscardAgentDraftError = DiscardAgentDraftErrors[keyof DiscardAgentDraftErrors];
|
|
8753
|
+
export type DiscardAgentDraftResponses = {
|
|
8754
|
+
/**
|
|
8755
|
+
* The draft is gone
|
|
8756
|
+
*/
|
|
8757
|
+
204: void;
|
|
8758
|
+
};
|
|
8759
|
+
export type DiscardAgentDraftResponse = DiscardAgentDraftResponses[keyof DiscardAgentDraftResponses];
|
|
8760
|
+
export type GetAgentDraftData = {
|
|
8761
|
+
body?: never;
|
|
8762
|
+
path: {
|
|
8763
|
+
agent_id: string;
|
|
8764
|
+
};
|
|
8765
|
+
query?: never;
|
|
8766
|
+
url: '/v1/agents/{agent_id}/draft';
|
|
8767
|
+
};
|
|
8768
|
+
export type GetAgentDraftErrors = {
|
|
8769
|
+
/**
|
|
8770
|
+
* Missing or invalid credentials
|
|
8771
|
+
*/
|
|
8772
|
+
401: ErrorResponse;
|
|
8773
|
+
/**
|
|
8774
|
+
* The key is valid but its scopes do not cover this capability — a key limited to `tts` gets this from `/v1/images` rather than a 401
|
|
8775
|
+
*/
|
|
8776
|
+
403: ErrorResponse;
|
|
8777
|
+
/**
|
|
8778
|
+
* Unknown agent id
|
|
8779
|
+
*/
|
|
8780
|
+
404: ErrorResponse;
|
|
8781
|
+
/**
|
|
8782
|
+
* The request failed validation
|
|
8783
|
+
*/
|
|
8784
|
+
422: ErrorResponse;
|
|
8785
|
+
/**
|
|
8786
|
+
* Rate limit exceeded
|
|
8787
|
+
*/
|
|
8788
|
+
429: ErrorResponse;
|
|
8789
|
+
};
|
|
8790
|
+
export type GetAgentDraftError = GetAgentDraftErrors[keyof GetAgentDraftErrors];
|
|
8791
|
+
export type GetAgentDraftResponses = {
|
|
8792
|
+
/**
|
|
8793
|
+
* The draft as it stands
|
|
8794
|
+
*/
|
|
8795
|
+
200: AgentDraft;
|
|
8796
|
+
};
|
|
8797
|
+
export type GetAgentDraftResponse = GetAgentDraftResponses[keyof GetAgentDraftResponses];
|
|
8798
|
+
export type UpdateAgentDraftData = {
|
|
8799
|
+
body: AgentDraftUpdate;
|
|
8800
|
+
path: {
|
|
8801
|
+
agent_id: string;
|
|
8802
|
+
};
|
|
8803
|
+
query?: never;
|
|
8804
|
+
url: '/v1/agents/{agent_id}/draft';
|
|
8805
|
+
};
|
|
8806
|
+
export type UpdateAgentDraftErrors = {
|
|
8807
|
+
/**
|
|
8808
|
+
* The request could not be read: malformed JSON
|
|
8809
|
+
*/
|
|
8810
|
+
400: ErrorResponse;
|
|
8811
|
+
/**
|
|
8812
|
+
* Missing or invalid credentials
|
|
8813
|
+
*/
|
|
8814
|
+
401: ErrorResponse;
|
|
8815
|
+
/**
|
|
8816
|
+
* The key is valid but its scopes do not cover this capability — a key limited to `tts` gets this from `/v1/images` rather than a 401
|
|
8817
|
+
*/
|
|
8818
|
+
403: ErrorResponse;
|
|
8819
|
+
/**
|
|
8820
|
+
* Unknown agent id
|
|
8821
|
+
*/
|
|
8822
|
+
404: ErrorResponse;
|
|
8823
|
+
/**
|
|
8824
|
+
* This agent's draft was changed by somebody else since you last read it. Reload it and apply your edit again.
|
|
8825
|
+
*/
|
|
8826
|
+
409: ErrorResponse;
|
|
8827
|
+
/**
|
|
8828
|
+
* The request failed validation
|
|
8829
|
+
*/
|
|
8830
|
+
422: ErrorResponse;
|
|
8831
|
+
/**
|
|
8832
|
+
* Rate limit exceeded
|
|
8833
|
+
*/
|
|
8834
|
+
429: ErrorResponse;
|
|
8835
|
+
};
|
|
8836
|
+
export type UpdateAgentDraftError = UpdateAgentDraftErrors[keyof UpdateAgentDraftErrors];
|
|
8837
|
+
export type UpdateAgentDraftResponses = {
|
|
8838
|
+
/**
|
|
8839
|
+
* The draft as it now stands
|
|
8840
|
+
*/
|
|
8841
|
+
200: AgentDraft;
|
|
8842
|
+
};
|
|
8843
|
+
export type UpdateAgentDraftResponse = UpdateAgentDraftResponses[keyof UpdateAgentDraftResponses];
|
|
8844
|
+
export type PublishAgentDraftData = {
|
|
8845
|
+
body: AgentDraftPublish;
|
|
8846
|
+
path: {
|
|
8847
|
+
agent_id: string;
|
|
8848
|
+
};
|
|
8849
|
+
query?: never;
|
|
8850
|
+
url: '/v1/agents/{agent_id}/draft/publish';
|
|
8851
|
+
};
|
|
8852
|
+
export type PublishAgentDraftErrors = {
|
|
8853
|
+
/**
|
|
8854
|
+
* The request could not be read: malformed JSON
|
|
8855
|
+
*/
|
|
8856
|
+
400: ErrorResponse;
|
|
8857
|
+
/**
|
|
8858
|
+
* Missing or invalid credentials
|
|
8859
|
+
*/
|
|
8860
|
+
401: ErrorResponse;
|
|
8861
|
+
/**
|
|
8862
|
+
* The key is valid but its scopes do not cover this capability — a key limited to `tts` gets this from `/v1/images` rather than a 401
|
|
8863
|
+
*/
|
|
8864
|
+
403: ErrorResponse;
|
|
8865
|
+
/**
|
|
8866
|
+
* Unknown agent id
|
|
8867
|
+
*/
|
|
8868
|
+
404: ErrorResponse;
|
|
8869
|
+
/**
|
|
8870
|
+
* This agent's draft was changed by somebody else since you last read it. Reload it and apply your edit again. Or: The draft changes nothing from the version players have: there is nothing to publish. Discard it, or change something first.
|
|
8871
|
+
*/
|
|
8872
|
+
409: ErrorResponse;
|
|
8873
|
+
/**
|
|
8874
|
+
* The request failed validation
|
|
8875
|
+
*/
|
|
8876
|
+
422: ErrorResponse;
|
|
8877
|
+
/**
|
|
8878
|
+
* Rate limit exceeded
|
|
8879
|
+
*/
|
|
8880
|
+
429: ErrorResponse;
|
|
8881
|
+
};
|
|
8882
|
+
export type PublishAgentDraftError = PublishAgentDraftErrors[keyof PublishAgentDraftErrors];
|
|
8883
|
+
export type PublishAgentDraftResponses = {
|
|
8884
|
+
/**
|
|
8885
|
+
* The agent at its new version
|
|
8886
|
+
*/
|
|
8887
|
+
200: AgentInfo;
|
|
8888
|
+
};
|
|
8889
|
+
export type PublishAgentDraftResponse = PublishAgentDraftResponses[keyof PublishAgentDraftResponses];
|
|
7512
8890
|
export type TestAgentWebhookData = {
|
|
7513
8891
|
body?: never;
|
|
7514
8892
|
path: {
|