@amigo-ai/sdk 0.8.0 → 0.10.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 +36 -0
- package/dist/types/generated/api-types.d.ts +18 -16
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -44,6 +44,14 @@ async function example() {
|
|
|
44
44
|
example()
|
|
45
45
|
```
|
|
46
46
|
|
|
47
|
+
## Examples
|
|
48
|
+
|
|
49
|
+
- **Conversation management**:
|
|
50
|
+
- [Basic conversation](examples/conversation/basic-conversation.ts)
|
|
51
|
+
- [Streaming conversation events](examples/conversation/conversation-events.ts)
|
|
52
|
+
- **User management**:
|
|
53
|
+
- [User management examples](examples/user/user-management.ts)
|
|
54
|
+
|
|
47
55
|
## Configuration
|
|
48
56
|
|
|
49
57
|
The SDK requires the following configuration parameters:
|
|
@@ -68,6 +76,34 @@ For detailed instructions on generating API keys, see the [Authentication Guide]
|
|
|
68
76
|
|
|
69
77
|
This SDK auto-generates its types from the latest Amigo OpenAPI schema. As a result, only the latest published SDK version is guaranteed to match the current API. If you pin to an older version, it may not include the newest endpoints or fields.
|
|
70
78
|
|
|
79
|
+
## Generated types
|
|
80
|
+
|
|
81
|
+
The SDK ships with TypeScript types generated from the latest OpenAPI schema and re-exports them for convenience.
|
|
82
|
+
|
|
83
|
+
- **Importing types**:
|
|
84
|
+
|
|
85
|
+
```typescript
|
|
86
|
+
import type { components, operations, paths } from '@amigo-ai/sdk'
|
|
87
|
+
|
|
88
|
+
// Example: response types
|
|
89
|
+
type Conversation = components['schemas']['Conversation']
|
|
90
|
+
|
|
91
|
+
// Example: operation params
|
|
92
|
+
type GetConversationsParams = operations['getConversations']['parameters']['query']
|
|
93
|
+
```
|
|
94
|
+
|
|
95
|
+
## Retries
|
|
96
|
+
|
|
97
|
+
The HTTP client includes sensible, configurable retries:
|
|
98
|
+
|
|
99
|
+
- **Defaults**:
|
|
100
|
+
- max attempts: 3
|
|
101
|
+
- backoff base: 250ms (exponential with full jitter)
|
|
102
|
+
- max delay per attempt: 30s
|
|
103
|
+
- retry on status: {408, 429, 500, 502, 503, 504}
|
|
104
|
+
- retry on methods: {GET}
|
|
105
|
+
- special-case: POST is retried on 429 when `Retry-After` is present
|
|
106
|
+
|
|
71
107
|
## Error Handling
|
|
72
108
|
|
|
73
109
|
The SDK provides typed error handling:
|
|
@@ -3231,9 +3231,9 @@ export interface components {
|
|
|
3231
3231
|
};
|
|
3232
3232
|
};
|
|
3233
3233
|
/** @enum {string} */
|
|
3234
|
-
LLMLoadBalancingSetType: "o4-mini-2025-04-16" | "gpt-
|
|
3234
|
+
LLMLoadBalancingSetType: "o4-mini-2025-04-16" | "gpt-5-2025-08-07" | "gpt-5-mini-2025-08-07" | "gpt-5-nano-2025-08-07" | "gpt-5-chat-2025-08-07" | "claude-sonnet-4-20250514";
|
|
3235
3235
|
/** @enum {string} */
|
|
3236
|
-
LLMType: "openai_o4-mini-2025-04-16" | "openai_gpt-
|
|
3236
|
+
LLMType: "openai_o4-mini-2025-04-16" | "openai_gpt-5-2025-08-07" | "openai_gpt-5-mini-2025-08-07" | "openai_gpt-5-nano-2025-08-07" | "openai_gpt-5-chat-2025-08-07" | "azure_o4-mini-2025-04-16" | "azure_gpt-4.1-2025-04-14" | "azure_gpt-4.1-mini-2025-04-14" | "azure_gpt-5-2025-08-07" | "azure_gpt-5-mini-2025-08-07" | "azure_gpt-5-nano-2025-08-07" | "azure_gpt-5-chat-2025-08-07" | "google_claude-sonnet-4@20250514" | "aws_claude-sonnet-4-20250514" | "anthropic_claude-sonnet-4-20250514" | "google_gemini-2.5-pro" | "google_gemini-2.5-flash";
|
|
3237
3237
|
/** MP3UserMessageAudioConfig */
|
|
3238
3238
|
MP3UserMessageAudioConfig: {
|
|
3239
3239
|
/**
|
|
@@ -5240,13 +5240,14 @@ export interface components {
|
|
|
5240
5240
|
[key: string]: unknown;
|
|
5241
5241
|
};
|
|
5242
5242
|
/**
|
|
5243
|
-
* Tool
|
|
5244
|
-
* @description
|
|
5243
|
+
* Tool Repo
|
|
5244
|
+
* @description Whether this tool is published from the main repository or the team-specific repository.
|
|
5245
|
+
* @enum {string}
|
|
5245
5246
|
*/
|
|
5246
|
-
|
|
5247
|
+
tool_repo: "main" | "team";
|
|
5247
5248
|
/**
|
|
5248
5249
|
* Tool Commit Hash
|
|
5249
|
-
* @description The commit hash of the tool within the
|
|
5250
|
+
* @description The commit hash of the tool within the repository.
|
|
5250
5251
|
*/
|
|
5251
5252
|
tool_commit_hash: string;
|
|
5252
5253
|
/**
|
|
@@ -5960,6 +5961,7 @@ export interface components {
|
|
|
5960
5961
|
amigo_lib__pydantic__base_model__StrippedNonemptyString__1: string;
|
|
5961
5962
|
amigo_lib__pydantic__base_model__StrippedNonemptyString__2: string;
|
|
5962
5963
|
amigo_lib__pydantic__base_model__StrippedNonemptyString__3: string;
|
|
5964
|
+
amigo_lib__pydantic__base_model__StrippedNonemptyString__4: string;
|
|
5963
5965
|
src__app__amigo__service__conversation__Action: components["schemas"]["SelectDynamicBehaviorAgentActionEvent"] | components["schemas"]["CheckIfActiveMemoryNeededAgentActionEvent"] | components["schemas"]["ExtractActiveMemoriesAgentActionEvent"] | components["schemas"]["NavigateStateMachineAgentActionEvent"] | components["schemas"]["EngageUserAgentActionEvent"];
|
|
5964
5966
|
/** Response */
|
|
5965
5967
|
admin__ping_server__Response: {
|
|
@@ -6475,7 +6477,7 @@ export interface components {
|
|
|
6475
6477
|
/** Request */
|
|
6476
6478
|
organization__create_agent__Request: {
|
|
6477
6479
|
/** @description The name of the new agent. */
|
|
6478
|
-
agent_name: components["schemas"]["
|
|
6480
|
+
agent_name: components["schemas"]["amigo_lib__pydantic__base_model__StrippedNonemptyString__3"];
|
|
6479
6481
|
};
|
|
6480
6482
|
/** Response */
|
|
6481
6483
|
organization__create_agent__Response: {
|
|
@@ -6488,7 +6490,7 @@ export interface components {
|
|
|
6488
6490
|
/** Request */
|
|
6489
6491
|
organization__create_agent_version__Request: {
|
|
6490
6492
|
/** @description The agent's initials. */
|
|
6491
|
-
initials?: components["schemas"]["
|
|
6493
|
+
initials?: components["schemas"]["amigo_lib__pydantic__base_model__StrippedNonemptyString__4"] | null;
|
|
6492
6494
|
/** @description Information about the agent's identity. */
|
|
6493
6495
|
identity?: components["schemas"]["Identity-Input"] | null;
|
|
6494
6496
|
/** @description A description of the agent's background. */
|
|
@@ -6625,7 +6627,7 @@ export interface components {
|
|
|
6625
6627
|
onboarding_instructions: components["schemas"]["amigo_lib__pydantic__base_model__StrippedNonemptyString__1"][];
|
|
6626
6628
|
/** @description The name of the Azure DevOps team to create (if it doesn't exist) for this organization. All orgs with the same Azure DevOps team name will share access to the same Azure DevOps resources, namely
|
|
6627
6629
|
* the source code for tools. */
|
|
6628
|
-
azure_devops_team_name: components["schemas"]["
|
|
6630
|
+
azure_devops_team_name: components["schemas"]["amigo_lib__pydantic__base_model__StrippedNonemptyString__2"];
|
|
6629
6631
|
};
|
|
6630
6632
|
/** Preferences */
|
|
6631
6633
|
organization__create_organization__Request__Preferences: {
|
|
@@ -6663,7 +6665,7 @@ export interface components {
|
|
|
6663
6665
|
/** Request */
|
|
6664
6666
|
organization__create_service_hierarchical_state_machine__Request: {
|
|
6665
6667
|
/** @description The name of the new state machine. */
|
|
6666
|
-
state_machine_name: components["schemas"]["
|
|
6668
|
+
state_machine_name: components["schemas"]["amigo_lib__pydantic__base_model__StrippedNonemptyString__3"];
|
|
6667
6669
|
};
|
|
6668
6670
|
/** Response */
|
|
6669
6671
|
organization__create_service_hierarchical_state_machine__Response: {
|
|
@@ -7049,7 +7051,7 @@ export interface components {
|
|
|
7049
7051
|
/** Request */
|
|
7050
7052
|
role__create_role__Request: {
|
|
7051
7053
|
/** @description The name of the role to create. The role must have a max length of 256 characters. */
|
|
7052
|
-
role_name: components["schemas"]["
|
|
7054
|
+
role_name: components["schemas"]["amigo_lib__pydantic__base_model__StrippedNonemptyString__3"];
|
|
7053
7055
|
/** @description A description about the role. */
|
|
7054
7056
|
description: components["schemas"]["amigo_lib__pydantic__base_model__StrippedNonemptyString__1"];
|
|
7055
7057
|
/**
|
|
@@ -7948,12 +7950,12 @@ export interface components {
|
|
|
7948
7950
|
/** Request */
|
|
7949
7951
|
tool__publish_tool_version__Request: {
|
|
7950
7952
|
/**
|
|
7951
|
-
*
|
|
7952
|
-
* @description The
|
|
7953
|
-
*
|
|
7953
|
+
* Repo
|
|
7954
|
+
* @description The repo to publish the tool version from. If `team`, then it's published from the repo of the organization's Azure DevOps team. If `main`, then it's published
|
|
7955
|
+
* from the `tools-main` repo.
|
|
7954
7956
|
* @enum {string}
|
|
7955
7957
|
*/
|
|
7956
|
-
|
|
7958
|
+
repo: "main" | "team";
|
|
7957
7959
|
/**
|
|
7958
7960
|
* Project Path
|
|
7959
7961
|
* @description The directory in the tools repo that contains the `pyproject.toml` file corresponding to the tool version to publish.
|
|
@@ -8480,7 +8482,7 @@ export interface operations {
|
|
|
8480
8482
|
};
|
|
8481
8483
|
content?: never;
|
|
8482
8484
|
};
|
|
8483
|
-
/** @description The current environment does not support this endpoint. */
|
|
8485
|
+
/** @description The current environment or organization does not support this endpoint. */
|
|
8484
8486
|
400: {
|
|
8485
8487
|
headers: {
|
|
8486
8488
|
[name: string]: unknown;
|