-
Notifications
You must be signed in to change notification settings - Fork 78
feat(DATAGO-114389): PR 1: Foundation - Data Models & Constants #706
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: feature/prescriptive-workflows
Are you sure you want to change the base?
Conversation
Adds the foundational data models and utilities required by the Prescriptive Workflows feature: - StructuredInvocationRequest/Result data parts - WorkflowExecution* data parts for visualization - Extension URI constants - Agent card schema utilities
alimosaed
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
In addition to the above comments, I am wondering how to check the total status of a workflow? Based on these models, the workflow status is determined at the end of workflow (success, failure, cancel); however, the workflow status can be 'running'
| ) | ||
|
|
||
|
|
||
| class StructuredInvocationResult(BaseModel): |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
[Q] does it always wrap results in an artifact?
| status: Literal["success", "failure"] = Field( | ||
| ..., description="Execution result status" | ||
| ) | ||
| artifact_name: Optional[str] = Field( |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
[Q] why the ArtifactRef class is not used here to determine the artifact name and version?
| max_iterations: Optional[int] = Field( | ||
| None, description="Maximum iterations for loop nodes" | ||
| ) | ||
| loop_delay: Optional[str] = Field( |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is the type string to set unit? (e.g., 1d, 20m)?
| type: Literal["structured_invocation_result"] = Field( | ||
| "structured_invocation_result", description="The constant type for this data part." | ||
| ) | ||
| status: Literal["success", "failure"] = Field( |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
[Q] Is not it possible to cancel an agent? If it is, 'cancel' can be another status.
| TEXT_ARTIFACT_CONTEXT_DEFAULT_LENGTH = 100000 # default number of characters to load from a text artifact | ||
|
|
||
| # Extension URIs | ||
| EXTENSION_URI_SCHEMAS = "https://solace.com/a2a/extensions/sam/schemas" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
These constant URLs refer to invalid pages. This PR does not show their application; however, they depend the repository to some constant webpages that needs more attention.
PR 1: Foundation - Data Models & Constants
Overview
This PR introduces the foundational data models and utilities required by the Prescriptive Workflows feature. These are shared across all workflow components and define the contract for workflow-related A2A communication.
Branch Information
pr/workflows-1-foundationfeature/prescriptive-workflowsFiles Changed
src/solace_agent_mesh/common/data_parts.pyNew Pydantic models for workflow messages:
StructuredInvocationRequestStructuredInvocationResultArtifactRefWorkflowExecutionStartDataWorkflowNodeExecutionStartDataWorkflowNodeExecutionResultDataWorkflowMapProgressDataWorkflowExecutionResultDataSwitchCaseInfosrc/solace_agent_mesh/common/constants.pyNew constants:
EXTENSION_URI_SCHEMAS- URI for schema extension in agent cardsEXTENSION_URI_AGENT_TYPE- URI for agent type extensionsrc/solace_agent_mesh/common/a2a/types.pyNew type definitions:
SchemasExtensionParams- Parameters for schema extension in agent cardssrc/solace_agent_mesh/common/a2a/__init__.pyRe-exports:
StructuredInvocationRequestStructuredInvocationResultsrc/solace_agent_mesh/common/agent_card_utils.pyNew utility:
get_schemas_from_agent_card()- Extract input/output schemas from agent card extensionsKey Concepts
Structured Invocation Pattern
The
StructuredInvocationRequestandStructuredInvocationResultmodels enable a "function call" pattern for agents:StructuredInvocationRequestwith input data and optional schemasStructuredInvocationResultwith artifact reference or errorThis pattern is used by workflows but is generic enough for any programmatic caller.
Workflow Visualization Events
The
WorkflowNode*data models provide real-time execution visibility: