feat(DATAGO-114389): PR 3: Structured Invocation Support #708
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
PR 3: Structured Invocation Support
Overview
This PR enables agents to be invoked with schema-validated input/output, functioning as a "structured function call" pattern. This is used by workflows and other programmatic callers that need predictable, validated responses from agents.
Branch Information
pr/workflows-3-agent-supportpr/workflows-2-modelsFiles Changed
src/solace_agent_mesh/agent/sac/structured_invocation/handler.pyThe
StructuredInvocationHandlerclass (~1,100 lines) provides:extract_structured_invocation_context()execute_structured_invocation()_extract_input_data()_execute_with_output_validation()_parse_result_embed()_return_structured_result()Key Features
«result:artifact=output.json»embedsrc/solace_agent_mesh/agent/sac/structured_invocation/validator.pySimple JSON Schema validation using
jsonschemalibrary:src/solace_agent_mesh/agent/sac/component.py(modifications)Integration of structured invocation into the agent component:
StructuredInvocationRequestdata partsrc/solace_agent_mesh/agent/sac/app.py(modifications)New configuration fields:
input_schema: Default input schema for agentoutput_schema: Default output schema for agentvalidation_max_retries: Max retries on output validation failureKey Concepts
Structured Invocation Flow
Result Embed Pattern
Agents signal their structured output via a special embed format:
The handler parses this to locate the output artifact for validation.
Schema Override Hierarchy
StructuredInvocationRequest(highest priority)