@crestal/nation-sdk 0.8.37 → 0.8.39

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.
@@ -1,69 +0,0 @@
1
- # AgentCreate
2
-
3
- Agent create model.
4
-
5
- ## Properties
6
-
7
- Name | Type | Description | Notes
8
- ------------ | ------------- | ------------- | -------------
9
- **name** | **string** | | [default to undefined]
10
- **picture** | **string** | | [optional] [default to undefined]
11
- **purpose** | **string** | | [optional] [default to undefined]
12
- **personality** | **string** | | [optional] [default to undefined]
13
- **principles** | **string** | | [optional] [default to undefined]
14
- **model** | **string** | LLM of the agent | [optional] [default to 'gpt-5-mini']
15
- **prompt** | **string** | | [optional] [default to undefined]
16
- **prompt_append** | **string** | | [optional] [default to undefined]
17
- **temperature** | **number** | | [optional] [default to undefined]
18
- **frequency_penalty** | **number** | | [optional] [default to undefined]
19
- **presence_penalty** | **number** | | [optional] [default to undefined]
20
- **wallet_provider** | **string** | | [optional] [default to undefined]
21
- **readonly_wallet_address** | **string** | | [optional] [default to undefined]
22
- **network_id** | **string** | | [optional] [default to undefined]
23
- **skills** | **{ [key: string]: any; }** | | [optional] [default to undefined]
24
- **short_term_memory_strategy** | **string** | | [optional] [default to undefined]
25
- **autonomous** | [**Array<AgentAutonomous>**](AgentAutonomous.md) | | [optional] [default to undefined]
26
- **telegram_entrypoint_enabled** | **boolean** | | [optional] [default to undefined]
27
- **telegram_entrypoint_prompt** | **string** | | [optional] [default to undefined]
28
- **telegram_config** | **{ [key: string]: any; }** | | [optional] [default to undefined]
29
- **xmtp_entrypoint_prompt** | **string** | | [optional] [default to undefined]
30
- **upstream_id** | **string** | | [optional] [default to undefined]
31
- **upstream_extra** | **{ [key: string]: any; }** | | [optional] [default to undefined]
32
- **id** | **string** | Unique identifier for the agent. Must be URL-safe, containing only lowercase letters, numbers, and hyphens | [optional] [default to undefined]
33
- **owner** | **string** | | [optional] [default to undefined]
34
-
35
- ## Example
36
-
37
- ```typescript
38
- import { AgentCreate } from '@crestal/nation-sdk';
39
-
40
- const instance: AgentCreate = {
41
- name,
42
- picture,
43
- purpose,
44
- personality,
45
- principles,
46
- model,
47
- prompt,
48
- prompt_append,
49
- temperature,
50
- frequency_penalty,
51
- presence_penalty,
52
- wallet_provider,
53
- readonly_wallet_address,
54
- network_id,
55
- skills,
56
- short_term_memory_strategy,
57
- autonomous,
58
- telegram_entrypoint_enabled,
59
- telegram_entrypoint_prompt,
60
- telegram_config,
61
- xmtp_entrypoint_prompt,
62
- upstream_id,
63
- upstream_extra,
64
- id,
65
- owner,
66
- };
67
- ```
68
-
69
- [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
@@ -1,27 +0,0 @@
1
- # AgentGenerateRequest
2
-
3
- Request model for agent generation.
4
-
5
- ## Properties
6
-
7
- Name | Type | Description | Notes
8
- ------------ | ------------- | ------------- | -------------
9
- **prompt** | **string** | Natural language description of the agent\'s desired capabilities | [default to undefined]
10
- **existing_agent** | [**AgentCreate**](AgentCreate.md) | | [optional] [default to undefined]
11
- **project_id** | **string** | | [optional] [default to undefined]
12
- **deploy** | **boolean** | | [optional] [default to undefined]
13
-
14
- ## Example
15
-
16
- ```typescript
17
- import { AgentGenerateRequest } from '@crestal/nation-sdk';
18
-
19
- const instance: AgentGenerateRequest = {
20
- prompt,
21
- existing_agent,
22
- project_id,
23
- deploy,
24
- };
25
- ```
26
-
27
- [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
@@ -1,31 +0,0 @@
1
- # AgentGenerateResponse
2
-
3
- Response model for agent generation.
4
-
5
- ## Properties
6
-
7
- Name | Type | Description | Notes
8
- ------------ | ------------- | ------------- | -------------
9
- **agent** | **{ [key: string]: any; }** | The generated agent schema | [default to undefined]
10
- **project_id** | **string** | Project ID for this conversation session | [default to undefined]
11
- **summary** | **string** | Human-readable summary of the generated agent | [default to undefined]
12
- **tags** | **Array<{ [key: string]: number; }>** | Generated tags for the agent as ID objects: [{\'id\': 1}, {\'id\': 2}] | [optional] [default to undefined]
13
- **autonomous_tasks** | **Array<{ [key: string]: any; }>** | | [optional] [default to undefined]
14
- **activated_skills** | **Array<string>** | | [optional] [default to undefined]
15
-
16
- ## Example
17
-
18
- ```typescript
19
- import { AgentGenerateResponse } from '@crestal/nation-sdk';
20
-
21
- const instance: AgentGenerateResponse = {
22
- agent,
23
- project_id,
24
- summary,
25
- tags,
26
- autonomous_tasks,
27
- activated_skills,
28
- };
29
- ```
30
-
31
- [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
@@ -1,35 +0,0 @@
1
- # GenerationDetailResponse
2
-
3
- Response model for single generation detail.
4
-
5
- ## Properties
6
-
7
- Name | Type | Description | Notes
8
- ------------ | ------------- | ------------- | -------------
9
- **project_id** | **string** | Project ID | [default to undefined]
10
- **user_id** | **string** | | [optional] [default to undefined]
11
- **created_at** | **string** | | [optional] [default to undefined]
12
- **last_activity** | **string** | | [optional] [default to undefined]
13
- **message_count** | **number** | Number of messages in conversation | [default to undefined]
14
- **last_message** | **{ [key: string]: any; }** | | [optional] [default to undefined]
15
- **first_message** | **{ [key: string]: any; }** | | [optional] [default to undefined]
16
- **conversation_history** | **Array<{ [key: string]: any; }>** | Full conversation history | [default to undefined]
17
-
18
- ## Example
19
-
20
- ```typescript
21
- import { GenerationDetailResponse } from '@crestal/nation-sdk';
22
-
23
- const instance: GenerationDetailResponse = {
24
- project_id,
25
- user_id,
26
- created_at,
27
- last_activity,
28
- message_count,
29
- last_message,
30
- first_message,
31
- conversation_history,
32
- };
33
- ```
34
-
35
- [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
@@ -1,21 +0,0 @@
1
- # GenerationsListResponse
2
-
3
- Response model for generations list.
4
-
5
- ## Properties
6
-
7
- Name | Type | Description | Notes
8
- ------------ | ------------- | ------------- | -------------
9
- **projects** | **Array<{ [key: string]: any; }>** | List of recent projects with their conversation history | [default to undefined]
10
-
11
- ## Example
12
-
13
- ```typescript
14
- import { GenerationsListResponse } from '@crestal/nation-sdk';
15
-
16
- const instance: GenerationsListResponse = {
17
- projects,
18
- };
19
- ```
20
-
21
- [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
@@ -1,167 +0,0 @@
1
- # GeneratorApi
2
-
3
- All URIs are relative to *http://localhost*
4
-
5
- |Method | HTTP request | Description|
6
- |------------- | ------------- | -------------|
7
- |[**generateAgent**](#generateagent) | **POST** /generator/agent/generate | Generate Agent from Natural Language Prompt|
8
- |[**getGenerationHistory**](#getgenerationhistory) | **GET** /generator/agent/generations/{project_id} | Get Generation Detail by Project ID|
9
- |[**getGenerations**](#getgenerations) | **GET** /generator/agent/generations | Get Generations List by User|
10
-
11
- # **generateAgent**
12
- > AgentGenerateResponse generateAgent(agentGenerateRequest)
13
-
14
- Generate an agent schema from a natural language prompt. Converts plain English descriptions into complete, validated agent configurations. Automatically identifies required skills, sets up configurations, detects autonomous task patterns, and ensures everything works correctly with intelligent error correction. **Autonomous Task Detection:** The API can automatically detect scheduling patterns in prompts like: - \"Buy 0.1 ETH every hour\" → Creates 60-minute autonomous task with CDP trade skill - \"Check portfolio daily\" → Creates 24-hour autonomous task with portfolio skills - \"Post tweet every 30 minutes\" → Creates 30-minute autonomous task with Twitter skill **Request Body:** * `prompt` - Natural language description of the agent\'s desired capabilities and schedule * `existing_agent` - Optional existing agent to update (preserves current setup while adding capabilities) * `user_id` - Required user ID for logging and rate limiting * `project_id` - Optional project ID for conversation history **Returns:** * `AgentGenerateResponse` - Contains agent schema, autonomous tasks, activated skills, project ID, and summary **Response Fields:** * `agent` - Complete agent schema with skills and autonomous configurations * `autonomous_tasks` - List of autonomous tasks detected and configured * `activated_skills` - List of skills that were activated based on the prompt * `project_id` - Project ID for conversation tracking * `summary` - Human-readable summary of the generated agent * `tags` - Generated tags for categorization **Raises:** * `HTTPException`: - 400: Invalid request (missing user_id, invalid prompt format or length) - 500: Agent generation failed after retries
15
-
16
- ### Example
17
-
18
- ```typescript
19
- import {
20
- GeneratorApi,
21
- Configuration,
22
- AgentGenerateRequest
23
- } from '@crestal/nation-sdk';
24
-
25
- const configuration = new Configuration();
26
- const apiInstance = new GeneratorApi(configuration);
27
-
28
- let agentGenerateRequest: AgentGenerateRequest; //
29
-
30
- const { status, data } = await apiInstance.generateAgent(
31
- agentGenerateRequest
32
- );
33
- ```
34
-
35
- ### Parameters
36
-
37
- |Name | Type | Description | Notes|
38
- |------------- | ------------- | ------------- | -------------|
39
- | **agentGenerateRequest** | **AgentGenerateRequest**| | |
40
-
41
-
42
- ### Return type
43
-
44
- **AgentGenerateResponse**
45
-
46
- ### Authorization
47
-
48
- [HTTPBearer](../README.md#HTTPBearer)
49
-
50
- ### HTTP request headers
51
-
52
- - **Content-Type**: application/json
53
- - **Accept**: application/json
54
-
55
-
56
- ### HTTP response details
57
- | Status code | Description | Response headers |
58
- |-------------|-------------|------------------|
59
- |**200** | Successful Response | - |
60
- |**422** | Validation Error | - |
61
-
62
- [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)
63
-
64
- # **getGenerationHistory**
65
- > GenerationDetailResponse getGenerationHistory()
66
-
67
- Get specific project conversation history. **Path Parameters:** * `project_id` - Project ID to get conversation history for **Query Parameters:** * `user_id` - Optional user ID for access validation **Returns:** * `GenerationDetailResponse` - Contains full conversation history for the project **Raises:** * `HTTPException`: - 404: Project not found or access denied - 500: Failed to retrieve generation detail
68
-
69
- ### Example
70
-
71
- ```typescript
72
- import {
73
- GeneratorApi,
74
- Configuration
75
- } from '@crestal/nation-sdk';
76
-
77
- const configuration = new Configuration();
78
- const apiInstance = new GeneratorApi(configuration);
79
-
80
- let projectId: string; // (default to undefined)
81
-
82
- const { status, data } = await apiInstance.getGenerationHistory(
83
- projectId
84
- );
85
- ```
86
-
87
- ### Parameters
88
-
89
- |Name | Type | Description | Notes|
90
- |------------- | ------------- | ------------- | -------------|
91
- | **projectId** | [**string**] | | defaults to undefined|
92
-
93
-
94
- ### Return type
95
-
96
- **GenerationDetailResponse**
97
-
98
- ### Authorization
99
-
100
- [HTTPBearer](../README.md#HTTPBearer)
101
-
102
- ### HTTP request headers
103
-
104
- - **Content-Type**: Not defined
105
- - **Accept**: application/json
106
-
107
-
108
- ### HTTP response details
109
- | Status code | Description | Response headers |
110
- |-------------|-------------|------------------|
111
- |**200** | Successful Response | - |
112
- |**422** | Validation Error | - |
113
-
114
- [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)
115
-
116
- # **getGenerations**
117
- > GenerationsListResponse getGenerations()
118
-
119
- Get all projects/generations for a user. **Query Parameters:** * `user_id` - Optional user ID to filter projects * `limit` - Maximum number of recent projects to return (default: 50, max: 100) **Returns:** * `GenerationsListResponse` - Contains list of projects with their conversation history **Raises:** * `HTTPException`: - 400: Invalid parameters - 500: Failed to retrieve generations
120
-
121
- ### Example
122
-
123
- ```typescript
124
- import {
125
- GeneratorApi,
126
- Configuration
127
- } from '@crestal/nation-sdk';
128
-
129
- const configuration = new Configuration();
130
- const apiInstance = new GeneratorApi(configuration);
131
-
132
- let limit: number; // (optional) (default to 50)
133
-
134
- const { status, data } = await apiInstance.getGenerations(
135
- limit
136
- );
137
- ```
138
-
139
- ### Parameters
140
-
141
- |Name | Type | Description | Notes|
142
- |------------- | ------------- | ------------- | -------------|
143
- | **limit** | [**number**] | | (optional) defaults to 50|
144
-
145
-
146
- ### Return type
147
-
148
- **GenerationsListResponse**
149
-
150
- ### Authorization
151
-
152
- [HTTPBearer](../README.md#HTTPBearer)
153
-
154
- ### HTTP request headers
155
-
156
- - **Content-Type**: Not defined
157
- - **Accept**: application/json
158
-
159
-
160
- ### HTTP response details
161
- | Status code | Description | Response headers |
162
- |-------------|-------------|------------------|
163
- |**200** | Successful Response | - |
164
- |**422** | Validation Error | - |
165
-
166
- [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)
167
-