Merged
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
This pull request introduces the new Azure AI Foundry extension for WorkflowCore, providing advanced AI-powered workflow capabilities, including LLM chat, agentic tool execution, vector search, and human-in-the-loop review. It adds extensive documentation, a changelog, and several new interfaces and models to support these features.
Features
Quick Start
Configuration
Basic Configuration
Environment Variables
The sample project supports
.envfiles:Available Steps
ChatCompletion
Simple LLM chat completion with optional conversation history.
Inputs:
SystemPromptUserMessageModelTemperatureMaxTokensOutputs:
ResponseTokensUsedFinishReasonAgentLoop
Agentic workflow with automatic tool execution. The LLM decides which tools to call, the step executes them, and continues until the LLM provides a final response.
Inputs:
SystemPromptUserMessageMaxIterationsAutomaticModeAvailableToolsOutputs:
ResponseIterationsExecutedToolResultsCompletedSuccessfullyExecuteTool
Manually execute a specific tool (useful for non-automatic tool orchestration).
GenerateEmbedding
Generate vector embeddings for semantic similarity and RAG applications.
Inputs:
TextModelOutputs:
EmbeddingTokensUsedVectorSearch
Search using vector similarity with Azure AI Search.
Inputs:
QueryIndexNameTopKFilterOutputs:
ResultsHumanReview
Pause workflow for human review, approval, or modification of AI-generated content.
Inputs:
ContentReviewerReviewPromptCorrelationIdOutputs:
EventKeyApprovedContentDecisionIsApprovedCommentsGetting the Event Key:
There are three ways to get the event key for completing a review:
CorrelationId, the event key equals the workflow ID.CorrelationId(data => data.MyId).OnEventKey(data => data.ReviewEventKey)to store it in workflow dataComplete a review by publishing an event:
Creating Custom Tools
Tools allow the LLM to take actions in your system. Implement
IAgentTool:Register tools in DI:
Conversation History
Conversation history is automatically managed per workflow execution using
IConversationStore.Default In-Memory Store
Custom Store Implementation
Implement
IConversationStorefor persistent storage (Redis, SQL, CosmosDB, etc.):Authentication
API Key Authentication (Simplest)
Azure AD Authentication
Samples
See the sample project for complete working examples:
Running the Sample
API Reference
Models
AzureFoundryOptionsConversationMessageConversationThreadToolDefinitionToolResultSearchResultReviewAction