Skip to content
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

Repo sync for protected branch #215

Open
wants to merge 44 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
44 commits
Select commit Hold shift + click to select a range
648dd7c
Add python process how-to guides
moonbox3 Feb 13, 2025
2b565e2
Improve Python agent learn site samples.
moonbox3 Feb 13, 2025
f1b1b6c
Fix spurious zone-end tag
gewarren Feb 13, 2025
b5eb15b
Ingestion -> injection
gewarren Feb 13, 2025
277688d
Merge pull request #460 from gewarren/patch-3
sophialagerkranspandey Feb 13, 2025
e397edf
Merge pull request #459 from gewarren/patch-2
sophialagerkranspandey Feb 13, 2025
9cbc014
Merge pull request #458 from gewarren/sync
sophialagerkranspandey Feb 13, 2025
00900dc
Merge pull request #461 from MicrosoftDocs/main
sophialagerkranspandey Feb 13, 2025
3465088
Include links to repo code.
moonbox3 Feb 14, 2025
a2d9cd0
Remove fixed locale from link
moonbox3 Feb 14, 2025
40075fb
Fix python sample resource link
moonbox3 Feb 14, 2025
4bea51e
Use site relative links for learn site links. They don't need to be a…
moonbox3 Feb 14, 2025
d635b45
Fix media link
moonbox3 Feb 14, 2025
78ad2e7
Scope link per language
moonbox3 Feb 14, 2025
fa534a9
More cleanup
moonbox3 Feb 14, 2025
7666b33
Add prompt template config import. Remove view from link in Python co…
moonbox3 Feb 16, 2025
c03c058
Updates to callout reserved param names with Python function calling.
moonbox3 Feb 17, 2025
039d3cd
updated filters page
eavanvalkenburg Feb 17, 2025
6ddea4c
Merge pull request #457 from moonbox3/update-py-sample-code
moonbox3 Feb 17, 2025
39f9534
Python: merge Python docs updates from live to main (#464)
moonbox3 Feb 17, 2025
ae1e457
Merge branch 'main' into py-processes-how-to
moonbox3 Feb 17, 2025
84cf4bd
Add Python processes sample code.
moonbox3 Feb 17, 2025
03244ed
fixed headings
eavanvalkenburg Feb 18, 2025
4f90961
removed heading
eavanvalkenburg Feb 18, 2025
fa77efc
added notes on ordering
eavanvalkenburg Feb 18, 2025
26e2b72
try inline zone
eavanvalkenburg Feb 18, 2025
436e9cc
fix bullet
eavanvalkenburg Feb 18, 2025
9c91c54
single line zone
eavanvalkenburg Feb 18, 2025
9d59fc2
small text updates
eavanvalkenburg Feb 18, 2025
4043083
added new sample links
eavanvalkenburg Feb 19, 2025
c408c4f
fix indentation
eavanvalkenburg Feb 19, 2025
7d9f07a
polish
eavanvalkenburg Feb 19, 2025
e70f690
Merge pull request #462 from eavanvalkenburg/filters
sophialagerkranspandey Feb 19, 2025
32f9d84
Merge pull request #466 from MicrosoftDocs/main
sophialagerkranspandey Feb 19, 2025
f0d5d11
Update semantic-kernel/Frameworks/process/examples/example-cycles.md
alliscode Feb 25, 2025
57b1890
Merge pull request #465 from moonbox3/py-processes-how-to
alliscode Feb 25, 2025
b754b73
Update semantic-kernel/Frameworks/process/examples/example-cycles.md
sophialagerkranspandey Feb 25, 2025
1db60e2
Update semantic-kernel/Frameworks/process/examples/example-first-proc…
sophialagerkranspandey Feb 25, 2025
50864c0
Update semantic-kernel/Frameworks/process/examples/example-cycles.md
sophialagerkranspandey Feb 25, 2025
1ba50f2
Merge pull request #467 from MicrosoftDocs/main
sophialagerkranspandey Feb 25, 2025
a97ebdb
OpenAI not Open AI (#468)
eric-urban Feb 26, 2025
20fdca6
Fix unsupported distance functions in samples
westey-m Feb 26, 2025
fe3433d
Merge pull request #470 from westey-m/fix-distance-func-in-docs
sophialagerkranspandey Feb 26, 2025
558bcd7
Merge pull request #472 from MicrosoftDocs/main
sophialagerkranspandey Feb 26, 2025
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
# Microsoft Semantic Kernel Documentation

This is the GitHub repository for the technical product documentation for **Semantic Kernel**. This documentation is published at [Microsoft Semantic Kernel documentation](https://learn.microsoft.com/semantic-kernel).
This is the GitHub repository for the technical product documentation for **Semantic Kernel**. This documentation is published at [Microsoft Semantic Kernel documentation](/semantic-kernel).

## How to contribute

Thanks for your interest in [contributing](https://learn.microsoft.com/), home of technical content for Microsoft products and services.
Thanks for your interest in contributing to the home of technical content for Microsoft products and services.

To learn how to make contributions to the content in this repository, start with our [Docs contributor guide](https://learn.microsoft.com/contribute).
To learn how to make contributions to the content in this repository, start with our [Docs contributor guide](/contribute).

## Code of conduct

Expand Down
2 changes: 1 addition & 1 deletion semantic-kernel/Frameworks/agent/TOC.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
href: agent-architecture.md
- name: Chat Completion Agent
href: chat-completion-agent.md
- name: Open AI Assistant Agent
- name: OpenAI Assistant Agent
href: assistant-agent.md
- name: Agent Collaboration
href: agent-chat.md
Expand Down
6 changes: 3 additions & 3 deletions semantic-kernel/Frameworks/agent/agent-architecture.md
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ The _Agent Framework_ was developed with the following key priorities in mind:

## Agent

The abstract _Agent_ class serves as the core abstraction for all types of agents, providing a foundational structure that can be extended to create more specialized agents. One key subclass is _Kernel Agent_, which establishes a direct association with a [_Kernel_](../../concepts/kernel.md) object. This relationship forms the basis for more specific agent implementations, such as the [_Chat Completion Agent_](./chat-completion-agent.md) and the [_Open AI Assistant Agent_](./assistant-agent.md), both of which leverage the Kernel's capabilities to execute their respective functions.
The abstract _Agent_ class serves as the core abstraction for all types of agents, providing a foundational structure that can be extended to create more specialized agents. One key subclass is _Kernel Agent_, which establishes a direct association with a [_Kernel_](../../concepts/kernel.md) object. This relationship forms the basis for more specific agent implementations, such as the [_Chat Completion Agent_](./chat-completion-agent.md) and the [_OpenAI Assistant Agent_](./assistant-agent.md), both of which leverage the Kernel's capabilities to execute their respective functions.

::: zone pivot="programming-language-csharp"

Expand Down Expand Up @@ -103,7 +103,7 @@ The _Agent Framework_ is built on the foundational concepts and features that ma

At the heart of the _Semantic Kernel_ ecosystem is the [_Kernel_](../../concepts/kernel.md), which serves as the core object that drives AI operations and interactions. To create any agent within this framework, a _Kernel instance_ is required as it provides the foundational context and capabilities for the agent’s functionality. The _Kernel_ acts as the engine for processing instructions, managing state, and invoking the necessary AI services that power the agent's behavior.

The [_Chat Completion Agent_](./chat-completion-agent.md) and [_Open AI Assistant Agent_](./assistant-agent.md) articles provide specific details on how to create each type of agent.
The [_Chat Completion Agent_](./chat-completion-agent.md) and [_OpenAI Assistant Agent_](./assistant-agent.md) articles provide specific details on how to create each type of agent.
These resources offer step-by-step instructions and highlight the key configurations needed to tailor the agents to different conversational or task-based applications, demonstrating how the Kernel enables dynamic and intelligent agent behaviors across diverse use cases.

#### Related API's:
Expand Down Expand Up @@ -169,7 +169,7 @@ Plugins are a fundamental aspect of the _Semantic Kernel_, enabling developers t

Agent messaging, including both input and response, is built upon the core content types of the _Semantic Kernel_, providing a unified structure for communication. This design choice simplifies the process of transitioning from traditional chat-completion patterns to more advanced agent-driven patterns in your application development. By leveraging familiar _Semantic Kernel_ content types, developers can seamlessly integrate agent capabilities into their applications without needing to overhaul existing systems. This streamlining ensures that as you evolve from basic conversational AI to more autonomous, task-oriented agents, the underlying framework remains consistent, making development faster and more efficient.

> Note: The [_Open AI Assistant Agent_`_](./assistant-agent.md) introduced content types specific to its usage for _File References_ and _Content Annotation_:
> Note: The [_OpenAI Assistant Agent_`_](./assistant-agent.md) introduced content types specific to its usage for _File References_ and _Content Annotation_:

#### Related API's:

Expand Down
6 changes: 3 additions & 3 deletions semantic-kernel/Frameworks/agent/agent-chat.md
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ Detailed API documentation related to this discussion is available at:

## What is _Agent Chat_?

_Agent Chat_ provides a framework that enables interaction between multiple agents, even if they are of different types. This makes it possible for a [_Chat Completion Agent_](./chat-completion-agent.md) and an [_Open AI Assistant Agent_](./assistant-agent.md) to work together within the same conversation. _Agent Chat_ also defines entry points for initiating collaboration between agents, whether through multiple responses or a single agent response.
_Agent Chat_ provides a framework that enables interaction between multiple agents, even if they are of different types. This makes it possible for a [_Chat Completion Agent_](./chat-completion-agent.md) and an [_OpenAI Assistant Agent_](./assistant-agent.md) to work together within the same conversation. _Agent Chat_ also defines entry points for initiating collaboration between agents, whether through multiple responses or a single agent response.

As an abstract class, _Agent Chat_ can be subclassed to support custom scenarios.

Expand Down Expand Up @@ -280,7 +280,7 @@ history = await chat.get_chat_messages()

::: zone-end

Since different agent types or configurations may maintain their own version of the conversation history, agent specific history is also available by specifing an agent. (For example: [_Open AI Assistant_](./assistant-agent.md) versus [_Chat Completion Agent_](./chat-completion-agent.md).)
Since different agent types or configurations may maintain their own version of the conversation history, agent specific history is also available by specifing an agent. (For example: [_OpenAI Assistant_](./assistant-agent.md) versus [_Chat Completion Agent_](./chat-completion-agent.md).)

::: zone pivot="programming-language-csharp"
```csharp
Expand Down Expand Up @@ -636,7 +636,7 @@ if chat.is_complete:

### Clear Full Conversation State

When done using an _Agent Chat_ where an [_Open AI Assistant_](./assistant-agent.md) participated, it may be necessary to delete the remote _thread_ associated with the _assistant_. _Agent Chat_ supports resetting or clearing the entire conversation state, which includes deleting any remote _thread_ definition. This ensures that no residual conversation data remains linked to the assistant once the chat concludes.
When done using an _Agent Chat_ where an [_OpenAI Assistant_](./assistant-agent.md) participated, it may be necessary to delete the remote _thread_ associated with the _assistant_. _Agent Chat_ supports resetting or clearing the entire conversation state, which includes deleting any remote _thread_ definition. This ensures that no residual conversation data remains linked to the assistant once the chat concludes.

A full reset does not remove the _agents_ that had joined the _Agent Chat_ and leaves the _Agent Chat_ in a state where it can be reused. This allows for the continuation of interactions with the same agents without needing to reinitialize them, making future conversations more efficient.

Expand Down
4 changes: 2 additions & 2 deletions semantic-kernel/Frameworks/agent/agent-functions.md
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ Any [Plugin](../../concepts/plugins/index.md) available to an _Agent_ is managed

[Plugins](../../concepts/plugins/index.md) can be added to the _Kernel_ either before or after the _Agent_ is created. The process of initializing [Plugins](../../concepts/plugins/index.md) follows the same patterns used for any _Semantic Kernel_ implementation, allowing for consistency and ease of use in managing AI capabilities.

> Note: For a [_Chat Completion Agent_](./chat-completion-agent.md), the function calling mode must be explicitly enabled. [_Open AI Assistant_](./assistant-agent.md) agent is always based on automatic function calling.
> Note: For a [_Chat Completion Agent_](./chat-completion-agent.md), the function calling mode must be explicitly enabled. [_OpenAI Assistant_](./assistant-agent.md) agent is always based on automatic function calling.

::: zone pivot="programming-language-csharp"
```csharp
Expand Down Expand Up @@ -198,7 +198,7 @@ agent = ChatCompletionAgent(

## Limitations for Agent Function Calling

When directly invoking a[_Chat Completion Agent_](./chat-completion-agent.md), all _Function Choice Behaviors_ are supported. However, when using an [_Open AI Assistant_](./assistant-agent.md) or [_Agent Chat_](./agent-chat.md), only _Automatic_ [Function Calling](../../concepts/ai-services/chat-completion/function-calling/index.md) is currently available.
When directly invoking a[_Chat Completion Agent_](./chat-completion-agent.md), all _Function Choice Behaviors_ are supported. However, when using an [_OpenAI Assistant_](./assistant-agent.md) or [_Agent Chat_](./agent-chat.md), only _Automatic_ [Function Calling](../../concepts/ai-services/chat-completion/function-calling/index.md) is currently available.


## How-To
Expand Down
12 changes: 6 additions & 6 deletions semantic-kernel/Frameworks/agent/agent-streaming.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,9 +19,9 @@ A streamed response delivers the message content in small, incremental chunks. T

#### Streaming References:

- [Open AI Streaming Guide](https://platform.openai.com/docs/api-reference/streaming)
- [Open AI Chat Completion Streaming](https://platform.openai.com/docs/api-reference/chat/create#chat-create-stream)
- [Open AI Assistant Streaming](https://platform.openai.com/docs/api-reference/assistants-streaming)
- [OpenAI Streaming Guide](https://platform.openai.com/docs/api-reference/streaming)
- [OpenAI Chat Completion Streaming](https://platform.openai.com/docs/api-reference/chat/create#chat-create-stream)
- [OpenAI Assistant Streaming](https://platform.openai.com/docs/api-reference/assistants-streaming)
- [Azure OpenAI Service REST API](/azure/ai-services/openai/reference)


Expand Down Expand Up @@ -54,7 +54,7 @@ A streamed response delivers the message content in small, incremental chunks. T

## Streaming Agent Invocation

The _Agent Framework_ supports _streamed_ responses when using [_Agent Chat_](./agent-chat.md) or when directly invoking a [_Chat Completion Agent_](./chat-completion-agent.md) or [_Open AI Assistant Agent_](./assistant-agent.md). In either mode, the framework delivers responses asynchronously as they are streamed. Alongside the streamed response, a consistent, non-streamed history is maintained to track the conversation. This ensures both real-time interaction and a reliable record of the conversation's flow.
The _Agent Framework_ supports _streamed_ responses when using [_Agent Chat_](./agent-chat.md) or when directly invoking a [_Chat Completion Agent_](./chat-completion-agent.md) or [_OpenAI Assistant Agent_](./assistant-agent.md). In either mode, the framework delivers responses asynchronously as they are streamed. Alongside the streamed response, a consistent, non-streamed history is maintained to track the conversation. This ensures both real-time interaction and a reliable record of the conversation's flow.

### Streamed response from _Chat Completion Agent_

Expand Down Expand Up @@ -104,9 +104,9 @@ async for response in agent.invoke_stream(chat)

::: zone-end

### Streamed response from _Open AI Assistant Agent_
### Streamed response from _OpenAI Assistant Agent_

When invoking a streamed response from an [_Open AI Assistant Agent_](./assistant-agent.md), an optional _Chat History_ can be provided to capture the complete messages for further analysis if needed. Since the assistant maintains the conversation state as a remote thread, capturing these messages is not always necessary. The decision to store and analyze the full response depends on the specific requirements of the interaction.
When invoking a streamed response from an [_OpenAI Assistant Agent_](./assistant-agent.md), an optional _Chat History_ can be provided to capture the complete messages for further analysis if needed. Since the assistant maintains the conversation state as a remote thread, capturing these messages is not always necessary. The decision to store and analyze the full response depends on the specific requirements of the interaction.

::: zone pivot="programming-language-csharp"
```csharp
Expand Down
6 changes: 4 additions & 2 deletions semantic-kernel/Frameworks/agent/agent-templates.md
Original file line number Diff line number Diff line change
Expand Up @@ -93,9 +93,9 @@ agent = ChatCompletionAgent(

::: zone-end

#### Open AI Assistant Agent
#### OpenAI Assistant Agent

Templated instructions are especially powerful when working with an [_Open AI Assistant Agent_](./assistant-agent.md). With this approach, a single assistant definition can be created and reused multiple times, each time with different parameter values tailored to specific tasks or contexts. This enables a more efficient setup, allowing the same assistant framework to handle a wide range of scenarios while maintaining consistency in its core behavior.
Templated instructions are especially powerful when working with an [_OpenAI Assistant Agent_](./assistant-agent.md). With this approach, a single assistant definition can be created and reused multiple times, each time with different parameter values tailored to specific tasks or contexts. This enables a more efficient setup, allowing the same assistant framework to handle a wide range of scenarios while maintaining consistency in its core behavior.

::: zone pivot="programming-language-csharp"
```csharp
Expand Down Expand Up @@ -179,6 +179,8 @@ ChatCompletionAgent agent =
```python
import yaml

from semantic_kernel.prompt_template import PromptTemplateConfig

# Read the YAML file
with open("./GenerateStory.yaml", "r", encoding="utf-8") as file:
generate_story_yaml = file.read()
Expand Down
26 changes: 13 additions & 13 deletions semantic-kernel/Frameworks/agent/assistant-agent.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
---
title: Exploring the Semantic Kernel Open AI Assistant Agent (Experimental)
title: Exploring the Semantic Kernel OpenAI Assistant Agent (Experimental)
description: An exploration of the definition, behaviors, and usage patterns for a `OpenAIAssistantAgent`
zone_pivot_groups: programming-languages
author: crickman
Expand All @@ -8,7 +8,7 @@ ms.author: crickman
ms.date: 09/13/2024
ms.service: semantic-kernel
---
# Exploring the _Semantic Kernel_ _Open AI Assistant Agent_
# Exploring the _Semantic Kernel_ _OpenAI Assistant Agent_

> [!WARNING]
> The *Semantic Kernel Agent Framework* is in preview and is subject to change.
Expand Down Expand Up @@ -41,14 +41,14 @@ Detailed API documentation related to this discussion is available at:

The _OpenAI Assistant API_ is a specialized interface designed for more advanced and interactive AI capabilities, enabling developers to create personalized and multi-step task-oriented agents. Unlike the Chat Completion API, which focuses on simple conversational exchanges, the Assistant API allows for dynamic, goal-driven interactions with additional features like code-interpreter and file-search.

- [Open AI Assistant Guide](https://platform.openai.com/docs/assistants)
- [Open AI Assistant API](https://platform.openai.com/docs/api-reference/assistants)
- [OpenAI Assistant Guide](https://platform.openai.com/docs/assistants)
- [OpenAI Assistant API](https://platform.openai.com/docs/api-reference/assistants)
- [Assistant API in Azure](/azure/ai-services/openai/assistants-quickstart)


## Creating an _Open AI Assistant Agent_
## Creating an _OpenAI Assistant Agent_

Creating an _Open AI Assistant_ requires invoking a remote service, which is handled asynchronously. To manage this, the _Open AI Assistant Agent_ is instantiated through a static factory method, ensuring the process occurs in a non-blocking manner. This method abstracts the complexity of the asynchronous call, returning a promise or future once the assistant is fully initialized and ready for use.
Creating an _OpenAI Assistant_ requires invoking a remote service, which is handled asynchronously. To manage this, the _OpenAI Assistant Agent_ is instantiated through a static factory method, ensuring the process occurs in a non-blocking manner. This method abstracts the complexity of the asynchronous call, returning a promise or future once the assistant is fully initialized and ready for use.

::: zone pivot="programming-language-csharp"
```csharp
Expand Down Expand Up @@ -91,9 +91,9 @@ openai_agent = await OpenAIAssistantAgent.create(
::: zone-end


## Retrieving an _Open AI Assistant Agent_
## Retrieving an _OpenAI Assistant Agent_

Once created, the identifier of the assistant may be access via its identifier. This identifier may be used to create an _Open AI Assistant Agent_ from an existing assistant definition.
Once created, the identifier of the assistant may be access via its identifier. This identifier may be used to create an _OpenAI Assistant Agent_ from an existing assistant definition.

::: zone pivot="programming-language-csharp"

Expand Down Expand Up @@ -125,7 +125,7 @@ agent = await AzureAssistantAgent.retrieve(id=agent_id, kernel=kernel)
::: zone-end


## Using an _Open AI Assistant Agent_
## Using an _OpenAI Assistant Agent_

As with all aspects of the _Assistant API_, conversations are stored remotely. Each conversation is referred to as a _thread_ and identified by a unique `string` identifier. Interactions with your _OpenAI Assistant Agent_ are tied to this specific thread identifier which must be specified when calling the agent/

Expand Down Expand Up @@ -181,7 +181,7 @@ await agent.delete_thread(thread_id)
::: zone-end


## Deleting an _Open AI Assistant Agent_
## Deleting an _OpenAI Assistant Agent_

Since the assistant's definition is stored remotely, it supports the capability to self-delete. This enables the agent to be removed from the system when it is no longer needed.

Expand Down Expand Up @@ -217,10 +217,10 @@ is_deleted = agent._is_deleted

## How-To

For an end-to-end example for a _Open AI Assistant Agent_, see:
For an end-to-end example for a _OpenAI Assistant Agent_, see:

- [How-To: _Open AI Assistant Agent_ Code Interpreter](./examples/example-assistant-code.md)
- [How-To: _Open AI Assistant Agent_ File Search](./examples/example-assistant-search.md)
- [How-To: _OpenAI Assistant Agent_ Code Interpreter](./examples/example-assistant-code.md)
- [How-To: _OpenAI Assistant Agent_ File Search](./examples/example-assistant-search.md)


> [!div class="nextstepaction"]
Expand Down
4 changes: 2 additions & 2 deletions semantic-kernel/Frameworks/agent/chat-completion-agent.md
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ For .NET, some of AI services that support models with chat-completion include:

Model|_Semantic Kernel_ AI Service
--|--
Azure Open AI|[`Microsoft.SemanticKernel.Connectors.AzureOpenAI`](/dotnet/api/microsoft.semantickernel.connectors.azureopenai)
Azure OpenAI|[`Microsoft.SemanticKernel.Connectors.AzureOpenAI`](/dotnet/api/microsoft.semantickernel.connectors.azureopenai)
Gemini|[`Microsoft.SemanticKernel.Connectors.Google`](/dotnet/api/microsoft.semantickernel.connectors.google)
HuggingFace|[`Microsoft.SemanticKernel.Connectors.HuggingFace`](/dotnet/api/microsoft.semantickernel.connectors.huggingface)
Mistral|[`Microsoft.SemanticKernel.Connectors.MistralAI`](/dotnet/api/microsoft.semantickernel.connectors.mistralai)
Expand Down Expand Up @@ -234,4 +234,4 @@ For an end-to-end example for a _Chat Completion Agent_, see:


> [!div class="nextstepaction"]
> [Exploring _Open AI Assistant Agent_](./assistant-agent.md)
> [Exploring _OpenAI Assistant Agent_](./assistant-agent.md)
Loading