airia 0.1.14__py3-none-any.whl → 0.1.16__py3-none-any.whl

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,401 +1,554 @@
1
- """
2
- Pydantic models for pipeline configuration API responses.
1
+ """Types for the get_pipeline_config API response.
3
2
 
4
- This module defines comprehensive data structures for pipeline configuration exports,
5
- including all components like agents, models, tools, data sources, and deployment settings.
3
+ This module defines comprehensive data structures for pipeline configuration
4
+ responses, including pipeline definitions, versions, steps, deployments, and
5
+ all associated metadata required for pipeline management and execution.
6
6
  """
7
7
 
8
+ from __future__ import annotations
9
+
10
+ from datetime import datetime
8
11
  from typing import Any, Dict, List, Optional
9
12
 
10
13
  from pydantic import BaseModel, Field
11
14
 
12
15
 
13
- class Metadata(BaseModel):
14
- """Pipeline metadata and export configuration.
16
+ class PipelineStepPosition(BaseModel):
17
+ """Represents the graphical position of a pipeline step within a visual representation of a pipeline.
15
18
 
16
- Contains version information, export settings, and descriptive metadata
17
- about the pipeline configuration.
19
+ Used for positioning pipeline steps in the visual pipeline editor interface.
18
20
 
19
21
  Attributes:
20
- id: Unique identifier for the pipeline metadata
21
- export_version: Version of the export format
22
- tagline: Optional tagline describing the pipeline
23
- agent_description: Optional description of the agent
24
- industry: Optional industry classification
25
- tasks: Optional description of tasks the pipeline performs
26
- credential_export_option: Export option for credentials
27
- data_source_export_option: Export option for data sources
28
- version_information: Information about the pipeline version
29
- state: Current state of the pipeline
22
+ x: The X-coordinate of the pipeline step in a 2D space
23
+ y: The Y-coordinate of the pipeline step in a 2D space
30
24
  """
31
25
 
32
- id: str
33
- export_version: str = Field(alias="exportVersion")
34
- tagline: Optional[str] = None
35
- agent_description: Optional[str] = Field(alias="agentDescription", default=None)
36
- industry: Optional[str] = None
37
- tasks: Optional[str] = None
38
- credential_export_option: str = Field(alias="credentialExportOption")
39
- data_source_export_option: str = Field(alias="dataSourceExportOption")
40
- version_information: str = Field(alias="versionInformation")
41
- state: str
26
+ x: float = Field(description="The X-coordinate of the pipeline step in a 2D space")
27
+ y: float = Field(description="The Y-coordinate of the pipeline step in a 2D space")
42
28
 
43
29
 
44
- class Agent(BaseModel):
45
- """AI agent configuration and workflow definition.
30
+ class PipelineStepHandle(BaseModel):
31
+ """Represents a handle for a pipeline step.
46
32
 
47
- Represents the core agent that executes the pipeline, including its
48
- identity, industry specialization, and step-by-step workflow configuration.
33
+ Handles are connection points on pipeline steps that allow data flow between
34
+ steps. They can be either source handles (output) or target handles (input).
49
35
 
50
36
  Attributes:
51
- name: Display name of the agent
52
- execution_name: Name used during execution
53
- agent_description: Optional description of the agent's capabilities
54
- video_link: Optional link to demonstration video
55
- industry: Optional industry the agent specializes in
56
- sub_industries: List of sub-industry specializations
57
- agent_details: Dictionary containing additional agent configuration
58
- id: Unique identifier for the agent
59
- agent_icon: Optional icon identifier or URL
60
- steps: List of workflow steps the agent executes
37
+ pipeline_step_id: The PipelineStepId this handle belongs to
38
+ uuid: The UUID of the handle
39
+ type: The type of the handle (source or target)
40
+ label: The label of the handle for display purposes
41
+ tooltip: The tooltip text shown when hovering over the handle
42
+ x: The X-coordinate of the handle within the pipeline step
43
+ y: The Y-coordinate of the handle within the pipeline step
61
44
  """
62
45
 
63
- name: str
64
- execution_name: str = Field(alias="executionName")
65
- agent_description: Optional[str] = Field(alias="agentDescription", default=None)
66
- video_link: Optional[str] = Field(alias="videoLink", default=None)
67
- industry: Optional[str] = None
68
- sub_industries: List[str] = Field(alias="subIndustries", default_factory=list)
69
- agent_details: Dict[str, Any] = Field(alias="agentDetails", default_factory=dict)
70
- id: str
71
- agent_icon: Optional[str] = Field(alias="agentIcon", default=None)
72
- steps: List[Dict[str, Any]]
46
+ pipeline_step_id: str = Field(
47
+ alias="pipelineStepId", description="The PipelineStepId this handle belongs to"
48
+ )
49
+ uuid: str = Field(description="The UUID of the handle")
50
+ type: str = Field(description="The type of the handle (source or target)")
51
+ label: Optional[str] = Field(default=None, description="The label of the handle")
52
+ tooltip: Optional[str] = Field(
53
+ default=None, description="The tooltip of the handle"
54
+ )
55
+ x: Optional[float] = Field(
56
+ default=None, description="The X-coordinate of the pipeline step in a 2D space"
57
+ )
58
+ y: Optional[float] = Field(
59
+ default=None, description="The Y-coordinate of the pipeline step in a 2D space"
60
+ )
61
+
73
62
 
63
+ class PipelineStepDependency(BaseModel):
64
+ """Represents a dependency between pipeline steps.
74
65
 
75
- class PromptMessage(BaseModel):
76
- """Individual message within a prompt template.
66
+ Dependencies define the flow of data between pipeline steps by connecting
67
+ output handles of parent steps to input handles of child steps.
77
68
 
78
69
  Attributes:
79
- text: The message content
80
- order: Order of the message in the prompt sequence
70
+ pipeline_step_id: The PipelineStepId this dependency belongs to
71
+ parent_id: The UUID of the parent pipeline step that provides input
72
+ parent_handle_id: The UUID of the parent handle (source output)
73
+ handle_id: The UUID of this handle (target input)
81
74
  """
82
75
 
83
- text: str
84
- order: int
76
+ pipeline_step_id: str = Field(
77
+ alias="pipelineStepId", description="The PipelineStepId this handle belongs to"
78
+ )
79
+ parent_id: str = Field(
80
+ alias="parentId", description="The UUID of the parent pipeline step"
81
+ )
82
+ parent_handle_id: str = Field(
83
+ alias="parentHandleId", description="The UUID of the parent handle (source)"
84
+ )
85
+ handle_id: str = Field(
86
+ alias="handleId", description="The UUID of this handle (target)"
87
+ )
88
+
85
89
 
90
+ class PipelineStep(BaseModel):
91
+ """Represents a step within a pipeline.
86
92
 
87
- class Prompt(BaseModel):
88
- """Prompt template configuration.
93
+ Pipeline steps are individual processing units that perform specific tasks
94
+ within a pipeline workflow. Each step has a type, position, and connection
95
+ points for data flow.
89
96
 
90
97
  Attributes:
91
- name: Name of the prompt template
92
- version_change_description: Description of changes in this version
93
- prompt_message_list: List of messages in the prompt
94
- id: Unique identifier for the prompt
98
+ position: The graphical position of this step within the pipeline editor
99
+ position_id: The identifier of the position for layout management
100
+ handles: The connection points (handles) of this step for data flow
101
+ dependencies_object: The input dependencies of this step from other steps
102
+ step_type: The type of processing this step performs
103
+ pipeline_version_id: The Pipeline Version Id this step belongs to
104
+ step_title: The human-readable title/name of the step
95
105
  """
96
106
 
97
- name: str
98
- version_change_description: str = Field(alias="versionChangeDescription")
99
- prompt_message_list: List[PromptMessage] = Field(alias="promptMessageList")
100
- id: str
107
+ position: Optional[PipelineStepPosition] = Field(
108
+ default=None, description="The position of this step within the pipeline"
109
+ )
110
+ position_id: Optional[str] = Field(
111
+ alias="positionId", default=None, description="The identifier of the position"
112
+ )
113
+ handles: Optional[List[PipelineStepHandle]] = Field(
114
+ default=None, description="The handles of this step within the pipeline"
115
+ )
116
+ dependencies_object: Optional[List[PipelineStepDependency]] = Field(
117
+ alias="dependenciesObject",
118
+ default=None,
119
+ description="The dependencies of this step within the pipeline",
120
+ )
121
+ step_type: str = Field(alias="stepType", description="The type of this step")
122
+ pipeline_version_id: str = Field(
123
+ alias="pipelineVersionId", description="The Pipeline Version Id"
124
+ )
125
+ step_title: str = Field(alias="stepTitle", description="The Step Title")
126
+
101
127
 
128
+ class PipelineVersion(BaseModel):
129
+ """Represents a specific version of a pipeline.
102
130
 
103
- class CredentialData(BaseModel):
104
- """Individual credential key-value pair.
131
+ Pipeline versions allow for iteration and deployment management of pipelines.
132
+ Each version contains a complete definition of the pipeline structure and steps.
105
133
 
106
134
  Attributes:
107
- key: The credential key name
108
- value: The credential value
135
+ pipeline_id: The identifier of the parent pipeline this version belongs to
136
+ major_version: The major version number for significant changes
137
+ minor_version: The minor version number for incremental changes
138
+ version_number: The complete version number in string format (e.g., "1.2")
139
+ is_draft_version: Whether this is a draft version or a released production version
140
+ is_latest: Whether this version is the latest/current version of the pipeline
141
+ steps: The list of processing steps that make up this pipeline version
142
+ alignment: The UI alignment setting for pipeline visualization
109
143
  """
110
144
 
111
- key: str
112
- value: str
145
+ pipeline_id: str = Field(
146
+ alias="pipelineId", description="The identifier of the parent pipeline"
147
+ )
148
+ major_version: int = Field(
149
+ alias="majorVersion", description="The major version number"
150
+ )
151
+ minor_version: int = Field(
152
+ alias="minorVersion", description="The minor version number"
153
+ )
154
+ version_number: str = Field(
155
+ alias="versionNumber", description="The version number in string format"
156
+ )
157
+ is_draft_version: bool = Field(
158
+ alias="isDraftVersion",
159
+ description="Whether the version is a draft or a major production version",
160
+ )
161
+ is_latest: bool = Field(
162
+ alias="isLatest",
163
+ description="Whether this version is the latest version of the pipeline",
164
+ )
165
+ steps: Optional[List[PipelineStep]] = Field(
166
+ default=None, description="The list of steps that make up the pipeline"
167
+ )
168
+ alignment: str = Field(description="The alignment of the pipeline in UI")
169
+
113
170
 
171
+ class PipelineExecutionStats(BaseModel):
172
+ """Represents the execution statistics for a pipeline.
114
173
 
115
- class CredentialsDefinition(BaseModel):
116
- """Credentials configuration and authentication settings.
174
+ Tracks the historical performance and reliability metrics of pipeline executions
175
+ to provide insights into pipeline health and success rates.
117
176
 
118
177
  Attributes:
119
- name: Name of the credentials definition
120
- credential_type: Type of credentials (API key, OAuth, etc.)
121
- source_type: Source where credentials are stored
122
- credential_data_list: List of credential key-value pairs
123
- id: Unique identifier for the credentials definition
178
+ success_count: The total number of successful executions
179
+ failure_count: The total number of failed executions
124
180
  """
125
181
 
126
- name: str
127
- credential_type: str = Field(alias="credentialType")
128
- source_type: str = Field(alias="sourceType")
129
- credential_data_list: List[CredentialData] = Field(alias="credentialDataList")
130
- id: str
182
+ success_count: int = Field(
183
+ alias="successCount", description="The total number of successful executions"
184
+ )
185
+ failure_count: int = Field(
186
+ alias="failureCount", description="The total number of failed executions"
187
+ )
188
+
131
189
 
190
+ class AgentDetailsEntry(BaseModel):
191
+ """Represents a single agent details entry.
132
192
 
133
- class HeaderDefinition(BaseModel):
134
- """HTTP header definition for API requests.
193
+ Agent details entries define configurable parameters and metadata for
194
+ agent behavior, including input types, default values, and available options.
135
195
 
136
196
  Attributes:
137
- key: Header name
138
- value: Header value
197
+ type: The input type (e.g., text, select, multiselect, number)
198
+ name: The parameter name for this configuration entry
199
+ value: The current value of this parameter
200
+ options: Available options for select or multiselect input types
139
201
  """
140
202
 
141
- key: str
142
- value: str
203
+ type: str = Field(description="The input type")
204
+ name: str = Field(description="The input name")
205
+ value: Any = Field(description="The input value")
206
+ options: Optional[List[str]] = Field(
207
+ default=None, description="The options for select or multiselect"
208
+ )
209
+
143
210
 
211
+ class AboutDeploymentMetadata(BaseModel):
212
+ """Represents metadata about a deployment for the About tab.
144
213
 
145
- class ParameterDefinition(BaseModel):
146
- """Parameter definition for tool configuration.
214
+ Contains versioned metadata that appears in the About section of a deployment,
215
+ including educational and descriptive content.
147
216
 
148
217
  Attributes:
149
- name: Name of the parameter
150
- parameter_type: Type of the parameter (string, integer, etc.)
151
- parameter_description: Description of the parameter's purpose
152
- default: Default value for the parameter
153
- valid_options: List of valid options for the parameter
154
- id: Unique identifier for the parameter definition
218
+ version: The version of the About Deployment metadata schema
219
+ video_url: The URL of the instructional or demonstration video
155
220
  """
156
221
 
157
- name: str
158
- parameter_type: str = Field(alias="parameterType")
159
- parameter_description: str = Field(alias="parameterDescription")
160
- default: str
161
- valid_options: List[str] = Field(alias="validOptions", default_factory=list)
162
- id: str
222
+ version: int = Field(description="The version of the About Deployment metadata")
223
+ video_url: str = Field(alias="videoUrl", description="The video url")
224
+
163
225
 
226
+ class DeploymentAssignment(BaseModel):
227
+ """Represents a deployment assignment.
164
228
 
165
- class Tool(BaseModel):
166
- """Tool configuration for external API integrations.
229
+ Deployment assignments link deployments to specific entities (users, groups, etc.)
230
+ to control access and visibility of deployed pipelines.
167
231
 
168
232
  Attributes:
169
- tool_type: Type of tool (API, function, etc.)
170
- name: Display name of the tool
171
- standardized_name: Standardized name for the tool
172
- tool_description: Description of the tool's functionality
173
- purpose: Purpose or use case for the tool
174
- api_endpoint: API endpoint URL
175
- credentials_definition: Optional credentials required for the tool
176
- headers_definition: List of HTTP headers for API requests
177
- body: Request body template
178
- parameters_definition: List of parameter definitions
179
- method_type: HTTP method type (GET, POST, etc.)
180
- route_through_acc: Whether to route through ACC
181
- use_user_credentials: Whether to use user credentials
182
- use_user_credentials_type: Type of user credentials to use
183
- id: Unique identifier for the tool
233
+ deployment_id: The ID of the deployment being assigned
234
+ id: The unique identifier of this assignment
235
+ entity_id: The ID of the entity (user, group) receiving the assignment
236
+ entity_type: The type of entity being assigned (user, group, etc.)
237
+ created_at: Timestamp when the assignment was created
238
+ updated_at: Timestamp when the assignment was last modified
239
+ user_id: The ID of the user who created this assignment
184
240
  """
185
241
 
186
- tool_type: str = Field(alias="toolType")
187
- name: str
188
- standardized_name: str = Field(alias="standardizedName")
189
- tool_description: str = Field(alias="toolDescription")
190
- purpose: str
191
- api_endpoint: str = Field(alias="apiEndpoint")
192
- credentials_definition: Optional[CredentialsDefinition] = Field(
193
- alias="credentialsDefinition"
242
+ deployment_id: str = Field(alias="deploymentId", description="The deployment ID")
243
+ id: str = Field(description="The ID")
244
+ entity_id: str = Field(alias="entityId", description="The entity ID")
245
+ entity_type: str = Field(alias="entityType", description="The entity type")
246
+ created_at: Optional[datetime] = Field(
247
+ alias="createdAt", default=None, description="The created at timestamp"
194
248
  )
195
- headers_definition: List[HeaderDefinition] = Field(alias="headersDefinition")
196
- body: str
197
- parameters_definition: List[ParameterDefinition] = Field(
198
- alias="parametersDefinition"
249
+ updated_at: Optional[datetime] = Field(
250
+ alias="updatedAt", default=None, description="The updated at timestamp"
251
+ )
252
+ user_id: Optional[str] = Field(
253
+ alias="userId", default=None, description="The user ID"
199
254
  )
200
- method_type: str = Field(alias="methodType")
201
- route_through_acc: bool = Field(alias="routeThroughACC")
202
- use_user_credentials: bool = Field(alias="useUserCredentials")
203
- use_user_credentials_type: str = Field(alias="useUserCredentialsType")
204
- id: str
205
255
 
206
256
 
207
- class Model(BaseModel):
208
- """Language model configuration and deployment settings.
257
+ class DeploymentUserPrompt(BaseModel):
258
+ """A join entity that represents a user prompt associated with a deployment.
209
259
 
210
- Defines an AI model used in the pipeline, including its deployment details,
211
- pricing configuration, authentication settings, and capabilities.
260
+ Links deployments with predefined user prompts to provide template
261
+ interactions and guided user experiences.
212
262
 
213
263
  Attributes:
214
- id: Unique identifier for the model
215
- display_name: Display name of the model
216
- model_name: Technical name of the model
217
- prompt_id: Optional ID of associated prompt template
218
- system_prompt_definition: Optional system prompt configuration
219
- url: Model endpoint URL
220
- input_type: Type of input the model accepts
221
- provider: Model provider (OpenAI, Anthropic, etc.)
222
- credentials_definition: Optional credentials for model access
223
- deployment_type: Type of deployment (cloud, on-premise, etc.)
224
- source_type: Source type of the model
225
- connection_string: Optional connection string for deployment
226
- container_name: Optional container name for deployment
227
- deployed_key: Optional key for deployed model
228
- deployed_url: Optional URL for deployed model
229
- state: Optional current state of the model
230
- uploaded_container_id: Optional ID of uploaded container
231
- library_model_id: Optional ID from model library
232
- input_token_price: Price per input token
233
- output_token_price: Price per output token
234
- token_units: Number of token units
235
- has_tool_support: Whether the model supports tool calling
236
- allow_airia_credentials: Whether Airia credentials are allowed
237
- allow_byok_credentials: Whether bring-your-own-key credentials are allowed
238
- author: Optional author of the model
239
- price_type: Type of pricing model
264
+ deployment_id: The ID of the deployment this prompt is associated with
265
+ user_prompt_id: The ID of the user prompt template
240
266
  """
241
267
 
242
- id: str
243
- display_name: str = Field(alias="displayName")
244
- model_name: str = Field(alias="modelName")
245
- prompt_id: Optional[str] = Field(alias="promptId", default=None)
246
- system_prompt_definition: Optional[Any] = Field(
247
- alias="systemPromptDefinition", default=None
248
- )
249
- url: str
250
- input_type: str = Field(alias="inputType")
251
- provider: str
252
- credentials_definition: Optional[CredentialsDefinition] = Field(
253
- alias="credentialsDefinition"
254
- )
255
- deployment_type: str = Field(alias="deploymentType")
256
- source_type: str = Field(alias="sourceType")
257
- connection_string: Optional[str] = Field(alias="connectionString", default=None)
258
- container_name: Optional[str] = Field(alias="containerName", default=None)
259
- deployed_key: Optional[str] = Field(alias="deployedKey", default=None)
260
- deployed_url: Optional[str] = Field(alias="deployedUrl", default=None)
261
- state: Optional[str] = None
262
- uploaded_container_id: Optional[str] = Field(
263
- alias="uploadedContainerId", default=None
264
- )
265
- library_model_id: Optional[str] = Field(alias="libraryModelId")
266
- input_token_price: str = Field(alias="inputTokenPrice")
267
- output_token_price: str = Field(alias="outputTokenPrice")
268
- token_units: int = Field(alias="tokenUnits")
269
- has_tool_support: bool = Field(alias="hasToolSupport")
270
- allow_airia_credentials: bool = Field(alias="allowAiriaCredentials")
271
- allow_byok_credentials: bool = Field(alias="allowBYOKCredentials")
272
- author: Optional[str]
273
- price_type: str = Field(alias="priceType")
274
-
275
-
276
- class PythonCodeBlock(BaseModel):
277
- """Python code block for custom functionality.
278
-
279
- Attributes:
280
- id: Unique identifier for the code block
281
- code: Python code content
282
- """
268
+ deployment_id: str = Field(alias="deploymentId", description="The deployment ID")
269
+ user_prompt_id: str = Field(alias="userPromptId", description="The user prompt ID")
283
270
 
284
- id: str
285
- code: str
286
271
 
272
+ class Deployment(BaseModel):
273
+ """Represents a deployment.
287
274
 
288
- class Router(BaseModel):
289
- """Router configuration for model selection and routing.
275
+ Deployments make pipelines available to end users with specific configurations,
276
+ branding, and access controls. They define how users interact with pipelines
277
+ in production environments.
290
278
 
291
279
  Attributes:
292
- id: Unique identifier for the router
293
- model_id: ID of the associated model
294
- model: Optional model object
295
- router_config: Dictionary containing router configuration
280
+ pipeline_id: The ID of the pipeline being deployed
281
+ name: The human-readable name of the deployment
282
+ description: A detailed description of the deployment's purpose and functionality
283
+ deployment_user_prompts: List of predefined prompts available to users
284
+ deployment_prompt: Optional system prompt that configures the deployment behavior
285
+ project_id: The ID of the project containing this deployment
286
+ is_recommended: Whether this deployment is featured/recommended to users
287
+ tags: Categorization tags for discovery and organization
288
+ conversation_type: The type of conversation interface (chat, form, etc.)
289
+ about: Optional metadata for the About/help section
290
+ assignments: Optional list of user/group assignments for access control
296
291
  """
297
292
 
298
- id: str
299
- model_id: str = Field(alias="modelId")
300
- model: Optional[Any] = None
301
- router_config: Dict[str, Dict[str, Any]] = Field(alias="routerConfig")
302
-
303
-
304
- class ChunkingConfig(BaseModel):
305
- """Configuration for text chunking in data processing.
306
-
307
- Attributes:
308
- id: Unique identifier for the chunking configuration
309
- chunk_size: Size of each text chunk
310
- chunk_overlap: Number of characters to overlap between chunks
311
- strategy_type: Type of chunking strategy to use
312
- """
293
+ pipeline_id: str = Field(
294
+ alias="pipelineId",
295
+ description="The pipeline ID associated with this deployment",
296
+ )
297
+ name: str = Field(description="The Deployment Name")
298
+ description: str = Field(description="A description of the deployment")
299
+ deployment_user_prompts: Optional[List[DeploymentUserPrompt]] = Field(
300
+ alias="deploymentUserPrompts",
301
+ default=None,
302
+ description="The DeploymentUserPrompts",
303
+ )
304
+ deployment_prompt: Optional[str] = Field(
305
+ alias="deploymentPrompt", default=None, description="The DeploymentPrompt"
306
+ )
307
+ project_id: str = Field(alias="projectId", description="The Project Id")
308
+ is_recommended: bool = Field(
309
+ alias="isRecommended",
310
+ description="Whether this is a recommended/featured deployment",
311
+ )
312
+ tags: List[str] = Field(description="The Tags")
313
+ conversation_type: str = Field(
314
+ alias="conversationType", description="The Conversation Start Type"
315
+ )
316
+ about: Optional[AboutDeploymentMetadata] = Field(
317
+ default=None, description="Metadata about the deployment"
318
+ )
319
+ assignments: Optional[List[DeploymentAssignment]] = Field(
320
+ default=None, description="The Assignments"
321
+ )
313
322
 
314
- id: str
315
- chunk_size: int = Field(alias="chunkSize")
316
- chunk_overlap: int = Field(alias="chunkOverlap")
317
- strategy_type: str = Field(alias="strategyType")
318
323
 
324
+ class AgentTrigger(BaseModel):
325
+ """Represents a trigger used to start a pipeline execution.
319
326
 
320
- class DataSourceFile(BaseModel):
321
- """File reference within a data source.
327
+ Agent triggers enable automatic pipeline execution based on external events,
328
+ particularly email-based triggers for document processing and workflow automation.
322
329
 
323
330
  Attributes:
324
- data_source_id: ID of the data source containing this file
325
- file_path: Optional path to the file
326
- input_token: Optional input token for file access
327
- file_count: Optional count of files
331
+ email_id: The email address that can trigger this agent
332
+ allowed_type: The type of content allowed to trigger execution
333
+ allowed_values: The specific values that are permitted for triggering
334
+ pipeline_id: The ID of the pipeline to execute when triggered
335
+ data_source_id: Optional ID of the data source for input data
336
+ store_connector_id: Optional ID of the storage connector for file handling
337
+ email_action: The action to perform when the email trigger activates
338
+ forward_to: Optional email address to forward results to after execution
328
339
  """
329
340
 
330
- data_source_id: str = Field(alias="dataSourceId")
331
- file_path: Optional[str] = Field(None, alias="filePath")
332
- input_token: Optional[str] = Field(None, alias="inputToken")
333
- file_count: Optional[int] = Field(None, alias="fileCount")
341
+ email_id: str = Field(
342
+ alias="emailId", description="The email id corresponding to the Agent"
343
+ )
344
+ allowed_type: str = Field(
345
+ alias="allowedType", description="The allowed type for the agent trigger"
346
+ )
347
+ allowed_values: str = Field(
348
+ alias="allowedValues", description="The allowed values for the agent trigger"
349
+ )
350
+ pipeline_id: str = Field(
351
+ alias="pipelineId", description="The Pipeline Version identifier"
352
+ )
353
+ data_source_id: Optional[str] = Field(
354
+ alias="dataSourceId", default=None, description="The Data Source identifier"
355
+ )
356
+ store_connector_id: Optional[str] = Field(
357
+ alias="storeConnectorId",
358
+ default=None,
359
+ description="The datastore connector identifier",
360
+ )
361
+ email_action: str = Field(
362
+ alias="emailAction", description="The email action to be performed"
363
+ )
364
+ forward_to: Optional[str] = Field(
365
+ alias="forwardTo",
366
+ default=None,
367
+ description="The recipient to forward to",
368
+ max_length=4000,
369
+ )
370
+
334
371
 
372
+ class Pipeline(BaseModel):
373
+ """Represents a processing pipeline.
335
374
 
336
- class DataSource(BaseModel):
337
- """Data source configuration for pipeline data input.
375
+ Pipelines are the core workflow definition in the Airia platform, containing
376
+ a series of connected steps that process data and execute AI tasks. Each pipeline
377
+ can have multiple versions and can be deployed for end-user access.
338
378
 
339
379
  Attributes:
340
- id: Unique identifier for the data source
341
- name: Optional name of the data source
342
- execution_name: Optional name used during execution
343
- chunking_config: Configuration for text chunking
344
- data_source_type: Type of data source (file, database, etc.)
345
- database_type: Type of database if applicable
346
- embedding_provider: Provider for text embeddings
347
- is_user_specific: Whether the data source is user-specific
348
- files: Optional list of files in the data source
349
- configuration_json: Optional JSON configuration string
350
- credentials: Optional credentials for data source access
351
- is_image_processing_enabled: Whether image processing is enabled
380
+ id: The unique identifier of the pipeline
381
+ tenant_id: The tenant ID this pipeline belongs to
382
+ project_id: The project ID this pipeline belongs to
383
+ created_at: Timestamp when the pipeline was created
384
+ updated_at: Timestamp when the pipeline was last modified
385
+ user_id: The ID of the user who created this pipeline
386
+ active_version_id: The ID of the currently active version for execution
387
+ name: The human-readable name of the pipeline
388
+ execution_name: The name used when executing the pipeline programmatically
389
+ description: A detailed description of the pipeline's purpose and functionality
390
+ video_link: Optional URL to a video demonstration or tutorial
391
+ agent_icon_id: The ID of the icon used to represent this pipeline
392
+ versions: All available versions of this pipeline
393
+ execution_stats: Historical execution performance statistics
394
+ industry: The primary industry or domain this pipeline serves
395
+ sub_industries: Additional industry classifications and tags
396
+ agent_details: Configurable parameters and metadata for agent behavior
397
+ agent_details_tags: Tags for categorizing agent capabilities
398
+ active_version: The complete active version object (if loaded)
399
+ backup_pipeline_id: ID of a fallback pipeline in case of failure
400
+ deployment: The deployment configuration for end-user access
401
+ library_agent_id: ID of the library agent this pipeline is based on
402
+ library_imported_hash: Hash of the imported library agent for version tracking
403
+ library_imported_version: Version of the imported library agent
404
+ is_deleted: Whether this pipeline is marked for deletion
405
+ agent_trigger: Optional trigger configuration for automatic execution
406
+ api_key_id: ID of the API key used for external service authentication
407
+ is_seeded: Whether this pipeline comes from the platform's seed data
408
+ behaviours: List of capabilities and behaviors this agent can perform
352
409
  """
353
410
 
354
- id: str = Field(alias="id")
355
- name: Optional[str] = None
356
- execution_name: Optional[str] = Field(None, alias="executionName")
357
- chunking_config: ChunkingConfig = Field(alias="chunkingConfig")
358
- data_source_type: str = Field(alias="dataSourceType")
359
- database_type: str = Field(alias="databaseType")
360
- embedding_provider: str = Field(alias="embeddingProvider")
361
- is_user_specific: bool = Field(alias="isUserSpecific")
362
- files: Optional[List[DataSourceFile]] = None
363
- configuration_json: Optional[str] = Field(None, alias="configurationJson")
364
- credentials: Optional[CredentialsDefinition]
365
- is_image_processing_enabled: bool = Field(alias="isImageProcessingEnabled")
411
+ id: str = Field(description="The unique identifier of the pipeline")
412
+ tenant_id: Optional[str] = Field(
413
+ alias="tenantId", default=None, description="The Tenant Id"
414
+ )
415
+ project_id: Optional[str] = Field(
416
+ alias="projectId", default=None, description="The project Id"
417
+ )
418
+ created_at: Optional[datetime] = Field(
419
+ alias="createdAt", default=None, description="The created at timestamp"
420
+ )
421
+ updated_at: Optional[datetime] = Field(
422
+ alias="updatedAt", default=None, description="The updated at timestamp"
423
+ )
424
+ user_id: Optional[str] = Field(
425
+ alias="userId", default=None, description="The user ID"
426
+ )
427
+ active_version_id: Optional[str] = Field(
428
+ alias="activeVersionId",
429
+ default=None,
430
+ description="The unique identifier of pipeline's active version",
431
+ )
432
+ name: Optional[str] = Field(default=None, description="The name of the pipeline")
433
+ execution_name: Optional[str] = Field(
434
+ alias="executionName",
435
+ default=None,
436
+ description="The execution name of the pipeline",
437
+ )
438
+ description: Optional[str] = Field(
439
+ default=None,
440
+ description="The optional description of the pipeline",
441
+ max_length=2000,
442
+ )
443
+ video_link: Optional[str] = Field(
444
+ alias="videoLink", default=None, description="The video link of the pipeline"
445
+ )
446
+ agent_icon_id: Optional[str] = Field(
447
+ alias="agentIconId", default=None, description="The Agent Icon Id"
448
+ )
449
+ versions: Optional[List[PipelineVersion]] = Field(
450
+ default=None, description="The versions of this pipeline"
451
+ )
452
+ execution_stats: Optional[PipelineExecutionStats] = Field(
453
+ alias="executionStats", default=None, description="The execution statistics"
454
+ )
455
+ industry: Optional[str] = Field(
456
+ default=None, description="The main industry of the pipeline"
457
+ )
458
+ sub_industries: Optional[List[str]] = Field(
459
+ alias="subIndustries", default=None, description="The agent sub-industries tags"
460
+ )
461
+ agent_details: Optional[Dict[str, List[AgentDetailsEntry]]] = Field(
462
+ alias="agentDetails", default=None, description="The agent details properties"
463
+ )
464
+ agent_details_tags: Optional[List[str]] = Field(
465
+ alias="agentDetailsTags", default=None, description="The agent details tags"
466
+ )
467
+ active_version: Optional[PipelineVersion] = Field(
468
+ alias="activeVersion",
469
+ default=None,
470
+ description="The active version of this pipeline",
471
+ )
472
+ backup_pipeline_id: Optional[str] = Field(
473
+ alias="backupPipelineId",
474
+ default=None,
475
+ description="The unique identifier of the backup pipeline",
476
+ )
477
+ deployment: Optional[Deployment] = Field(
478
+ default=None, description="The associated Deployment for this pipeline"
479
+ )
480
+ library_agent_id: Optional[str] = Field(
481
+ alias="libraryAgentId",
482
+ default=None,
483
+ description="The library agent id associated with the pipeline",
484
+ )
485
+ library_imported_hash: Optional[str] = Field(
486
+ alias="libraryImportedHash", default=None, description="The library agent hash"
487
+ )
488
+ library_imported_version: Optional[str] = Field(
489
+ alias="libraryImportedVersion",
490
+ default=None,
491
+ description="The library imported version",
492
+ )
493
+ is_deleted: Optional[bool] = Field(
494
+ alias="isDeleted",
495
+ default=None,
496
+ description="Whether this entity is marked for deletion",
497
+ )
498
+ agent_trigger: Optional[AgentTrigger] = Field(
499
+ alias="agentTrigger",
500
+ default=None,
501
+ description="The Agent trigger associated with the pipeline",
502
+ )
503
+ api_key_id: Optional[str] = Field(
504
+ alias="apiKeyId", default=None, description="The Api Key navigation property"
505
+ )
506
+ is_seeded: Optional[bool] = Field(
507
+ alias="isSeeded", default=None, description="Whether the pipeline is seeded"
508
+ )
509
+ behaviours: Optional[List[str]] = Field(
510
+ default=None, description="The behaviours that the agent can perform"
511
+ )
366
512
 
367
513
 
368
- class GetPipelineConfigResponse(BaseModel):
369
- """Complete pipeline configuration export response.
514
+ class PipelineConfigResponse(Pipeline):
515
+ """Represents a complete pipeline configuration response.
370
516
 
371
- This is the root response model containing all components of a pipeline
372
- configuration, including the agent definition, associated resources,
373
- and deployment settings.
517
+ Extends the base Pipeline model with additional deployment and access control
518
+ information. This is the primary response model for pipeline configuration
519
+ endpoints that need full context including deployment details and user permissions.
374
520
 
375
521
  Attributes:
376
- metadata: Pipeline metadata and export configuration
377
- agent: AI agent configuration and workflow definition
378
- data_sources: Optional list of data sources for the pipeline
379
- prompts: Optional list of prompt templates
380
- tools: Optional list of external tools and integrations
381
- models: Optional list of AI models used in the pipeline
382
- memories: Optional memory/context storage configurations
383
- python_code_blocks: Optional list of custom Python code blocks
384
- routers: Optional list of model routing configurations
385
- deployment: Optional deployment configuration
522
+ deployment_id: The ID of the associated deployment (if deployed)
523
+ deployment_name: The name of the associated deployment
524
+ deployment_description: The description of the associated deployment
525
+ user_keys: Dictionary mapping user roles to user IDs for access control
526
+ group_keys: Dictionary mapping group roles to group IDs for access control
527
+ agent_icon: Base64 encoded agent icon image data
528
+ external: Whether this is an external agent imported via Agent-to-Agent (A2A)
386
529
  """
387
530
 
388
- metadata: Metadata
389
- agent: Agent
390
- data_sources: Optional[List[DataSource]] = Field(
391
- alias="dataSources", default_factory=list
531
+ deployment_id: Optional[str] = Field(
532
+ alias="deploymentId", default=None, description="The Deployment Id"
533
+ )
534
+ deployment_name: Optional[str] = Field(
535
+ alias="deploymentName", default=None, description="The Deployment Name"
536
+ )
537
+ deployment_description: Optional[str] = Field(
538
+ alias="deploymentDescription",
539
+ default=None,
540
+ description="The Deployment Description",
541
+ )
542
+ user_keys: Optional[Dict[str, str]] = Field(
543
+ alias="userKeys", default=None, description="The User Ids"
544
+ )
545
+ group_keys: Optional[Dict[str, str]] = Field(
546
+ alias="groupKeys", default=None, description="The Group Ids"
547
+ )
548
+ agent_icon: Optional[str] = Field(
549
+ alias="agentIcon", default=None, description="The Agent icon"
392
550
  )
393
- prompts: Optional[List[Prompt]] = Field(default_factory=list)
394
- tools: Optional[List[Tool]] = Field(default_factory=list)
395
- models: Optional[List[Model]] = Field(default_factory=list)
396
- memories: Optional[Any] = None
397
- python_code_blocks: Optional[List[PythonCodeBlock]] = Field(
398
- alias="pythonCodeBlocks", default_factory=list
551
+ external: Optional[bool] = Field(
552
+ default=None,
553
+ description="Whether the agent is an external agent imported using A2A",
399
554
  )
400
- routers: Optional[List[Router]] = Field(default_factory=list)
401
- deployment: Optional[Any] = None