Skip to content

Commit 63788cb

Browse files
feat: add agent builder support and enhance project members API
Adds support for agent builder with simplified agent configuration using agent IDs, refactors agent settings structure for better type safety, and extends project members API with additional user information fields. Key changes: - Add agent builder support with string agent ID alternative to complex configuration - Restructure Agent type to union of complex config or simple string ID - Rename AgentV1SettingsAgentListenProvider to AgentV1SettingsAgentContextListenProvider - Add scopes, first_name, and last_name fields to project members response - Add comprehensive JSDoc comments to Listen V1/V2 and Speak V1 type definitions - Remove deprecated context7.json configuration file 🌿 Generated with Fern
1 parent ba4dfad commit 63788cb

32 files changed

Lines changed: 143 additions & 79 deletions

.fern/metadata.json

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
{
2-
"cliVersion": "4.3.0",
2+
"cliVersion": "4.34.1",
33
"generatorName": "fernapi/fern-typescript-node-sdk",
44
"generatorVersion": "3.53.3",
55
"generatorConfig": {
@@ -9,10 +9,8 @@
99
"skipResponseValidation": true,
1010
"includeApiReference": true,
1111
"shouldGenerateWebsocketClients": true,
12-
"enableForwardCompatibleEnums": true,
13-
"packageJson": {
14-
"name": "@deepgram/sdk"
15-
}
12+
"enableForwardCompatibleEnums": true
1613
},
17-
"sdkVersion": "5.0.0"
14+
"originGitCommit": "aa3f3e3dced2b6d6c98cc8cf01ade234be6d8e98",
15+
"sdkVersion": "6.0.0"
1816
}

changelog.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
## 6.0.0 - 2026-03-18
2+
* The Agent configuration type has been restructured as a union type that accepts either a detailed configuration object or a simple agent ID string for use with the agent builder. This change simplifies agent setup when using pre-built agents but requires updating existing code that accesses nested Agent properties. The AgentV1SettingsAgentListenProvider type has been renamed to AgentV1SettingsAgentContextListenProvider. Project members API now includes additional fields: scopes, first_name, and last_name.
3+

context7.json

Lines changed: 0 additions & 4 deletions
This file was deleted.

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@deepgram/sdk",
3-
"version": "5.0.0",
3+
"version": "6.0.0",
44
"private": false,
55
"repository": {
66
"type": "git",

src/BaseClient.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -52,8 +52,8 @@ export function normalizeClientOptions<T extends BaseClientOptions = BaseClientO
5252
{
5353
"X-Fern-Language": "JavaScript",
5454
"X-Fern-SDK-Name": "@deepgram/sdk",
55-
"X-Fern-SDK-Version": "4.11.4",
56-
"User-Agent": "@deepgram/sdk/4.11.4",
55+
"X-Fern-SDK-Version": "6.0.0",
56+
"User-Agent": "@deepgram/sdk/6.0.0",
5757
"X-Fern-Runtime": core.RUNTIME.type,
5858
"X-Fern-Runtime-Version": core.RUNTIME.version,
5959
},

src/api/resources/agent/resources/v1/types/AgentV1Settings.ts

Lines changed: 37 additions & 57 deletions
Original file line numberDiff line numberDiff line change
@@ -82,62 +82,42 @@ export namespace AgentV1Settings {
8282
}
8383
}
8484

85-
export interface Agent {
86-
/** Deprecated. Use `listen.provider.language` and `speak.provider.language` fields instead. */
87-
language?: string | undefined;
88-
/** Conversation context including the history of messages and function calls */
89-
context?: Agent.Context | undefined;
90-
listen?: Agent.Listen | undefined;
91-
think?: Agent.Think | undefined;
92-
speak?: Agent.Speak | undefined;
93-
/** Optional message that agent will speak at the start */
94-
greeting?: string | undefined;
95-
}
96-
97-
export namespace Agent {
85+
export type Agent =
86+
| {
87+
language?: string | undefined;
88+
context?:
89+
| {
90+
messages?:
91+
| (
92+
| {
93+
type: "History";
94+
role: "user" | "assistant" | string;
95+
content: string;
96+
}
97+
| {
98+
type: "History";
99+
function_calls: {
100+
id: string;
101+
name: string;
102+
client_side: boolean;
103+
arguments: string;
104+
response: string;
105+
}[];
106+
}
107+
)[]
108+
| undefined;
109+
}
110+
| undefined;
111+
listen?:
112+
| {
113+
provider?: Deepgram.agent.AgentV1SettingsAgentContextListenProvider | undefined;
114+
}
115+
| undefined;
116+
think?: (Deepgram.ThinkSettingsV1 | Deepgram.ThinkSettingsV1[]) | undefined;
117+
speak?: (Deepgram.SpeakSettingsV1 | Deepgram.SpeakSettingsV1[]) | undefined;
118+
greeting?: string | undefined;
119+
}
98120
/**
99-
* Conversation context including the history of messages and function calls
100-
*/
101-
export interface Context {
102-
/** Conversation history as a list of messages and function calls */
103-
messages?: Context.Messages.Item[] | undefined;
104-
}
105-
106-
export namespace Context {
107-
export type Messages = Messages.Item[];
108-
109-
export namespace Messages {
110-
/**
111-
* A message here is either a conversational message or a function call
112-
*/
113-
export type Item =
114-
/**
115-
* Conversation text as part of the conversation history */
116-
| {
117-
type: "History";
118-
role: "user" | "assistant" | string;
119-
content: string;
120-
}
121-
/**
122-
* Client-side or server-side function call request and response as part of the conversation history */
123-
| {
124-
type: "History";
125-
function_calls: {
126-
id: string;
127-
name: string;
128-
client_side: boolean;
129-
arguments: string;
130-
response: string;
131-
}[];
132-
};
133-
}
134-
}
135-
136-
export interface Listen {
137-
provider?: Deepgram.agent.AgentV1SettingsAgentListenProvider | undefined;
138-
}
139-
140-
export type Think = Deepgram.ThinkSettingsV1 | Deepgram.ThinkSettingsV1[];
141-
export type Speak = Deepgram.SpeakSettingsV1 | Deepgram.SpeakSettingsV1[];
142-
}
121+
* The ID of an agent created using the agent builder */
122+
| string;
143123
}

src/api/resources/agent/resources/v1/types/AgentV1SettingsAgentListenProvider.ts renamed to src/api/resources/agent/resources/v1/types/AgentV1SettingsAgentContextListenProvider.ts

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -2,11 +2,11 @@
22

33
import type * as Deepgram from "../../../../../index.js";
44

5-
export type AgentV1SettingsAgentListenProvider =
6-
| Deepgram.agent.AgentV1SettingsAgentListenProvider.V1
7-
| Deepgram.agent.AgentV1SettingsAgentListenProvider.V2;
5+
export type AgentV1SettingsAgentContextListenProvider =
6+
| Deepgram.agent.AgentV1SettingsAgentContextListenProvider.V1
7+
| Deepgram.agent.AgentV1SettingsAgentContextListenProvider.V2;
88

9-
export namespace AgentV1SettingsAgentListenProvider {
9+
export namespace AgentV1SettingsAgentContextListenProvider {
1010
export interface V1 {
1111
version: "v1";
1212
/** Provider type for speech-to-text */
@@ -15,7 +15,6 @@ export namespace AgentV1SettingsAgentListenProvider {
1515
model?: string | undefined;
1616
/** Language code to use for speech-to-text. Can be a BCP-47 language tag (e.g. `en`), or `multi` for code-switching transcription */
1717
language?: string | undefined;
18-
/** Prompt keyterm recognition to improve Keyword Recall Rate */
1918
keyterms?: string[] | undefined;
2019
/** Applies smart formatting to improve transcript readability */
2120
smart_format?: boolean | undefined;
@@ -27,7 +26,8 @@ export namespace AgentV1SettingsAgentListenProvider {
2726
type: "deepgram";
2827
/** Model to use for speech to text using the V2 API (e.g. flux-general-en) */
2928
model: string;
30-
/** Prompt keyterm recognition to improve Keyword Recall Rate */
3129
keyterms?: string[] | undefined;
30+
eot_threshold?: Deepgram.ListenV2EotThreshold | undefined;
31+
eager_eot_threshold?: Deepgram.ListenV2EagerEotThreshold | undefined;
3232
}
3333
}

src/api/resources/agent/resources/v1/types/index.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ export * from "./AgentV1PromptUpdated.js";
1212
export * from "./AgentV1ReceiveFunctionCallResponse.js";
1313
export * from "./AgentV1SendFunctionCallResponse.js";
1414
export * from "./AgentV1Settings.js";
15-
export * from "./AgentV1SettingsAgentListenProvider.js";
15+
export * from "./AgentV1SettingsAgentContextListenProvider.js";
1616
export * from "./AgentV1SettingsApplied.js";
1717
export * from "./AgentV1SpeakUpdated.js";
1818
export * from "./AgentV1ThinkUpdated.js";

src/api/types/ListProjectMembersV1Response.ts

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,11 @@ export namespace ListProjectMembersV1Response {
1111
export interface Item {
1212
/** The unique identifier of the member */
1313
member_id?: string | undefined;
14+
/** The API scopes of the member */
15+
scopes?: string[] | undefined;
1416
email?: string | undefined;
17+
first_name?: string | undefined;
18+
last_name?: string | undefined;
1519
}
1620
}
1721
}

src/api/types/ListenV1Callback.ts

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,6 @@
11
// This file was auto-generated by Fern from our API Definition.
22

3+
/**
4+
* URL to which we'll make the callback request
5+
*/
36
export type ListenV1Callback = unknown;

0 commit comments

Comments
 (0)