You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
> Use the information in this README to contribute to this open-source project. To learn about using this SDK in your projects, refer to the [Microsoft Agents 365 Developer documentation](https://learn.microsoft.com/microsoft-agent-365/developer/).
11
+
> Use the information in this README to contribute to this open-source project. To learn about using this SDK in your projects, refer to the [Microsoft Agent 365 Developer documentation](https://learn.microsoft.com/microsoft-agent-365/developer/).
12
12
13
-
The Microsoft Agents 365 SDK extends the Microsoft 365 Agents SDK with enterprise-grade capabilities for building sophisticated agents. This SDK provides comprehensive tooling for observability, notifications, runtime utilities, and development tools that help developers create production-ready agents for platforms including M365, Teams, Copilot Studio, and Webchat.
13
+
The Microsoft Agent 365 SDK extends the Microsoft 365 Agents SDK with enterprise-grade capabilities for building sophisticated agents. This SDK provides comprehensive tooling for observability, notifications, runtime utilities, and development tools that help developers create production-ready agents for platforms including M365, Teams, Copilot Studio, and Webchat.
14
14
15
-
The Microsoft Agents 365 SDK focuses on four core areas:
15
+
The Microsoft Agent 365 SDK focuses on four core areas:
16
16
17
17
-**Observability**: Comprehensive tracing, caching, and monitoring capabilities for agent applications
18
18
-**Notifications**: Agent notification services and models for handling user notifications
@@ -71,14 +71,14 @@ For more detailed build instructions, see the [BUILD.md](BUILD.md).
71
71
72
72
## Project Structure
73
73
74
-
-**libraries/microsoft-agents-a365-notifications**: Microsoft Agents 365 Notifications - Agent notification services and models
75
-
-**libraries/microsoft-agents-a365-observability-core**: Microsoft Agents 365 Observability Core - Core observability functionality
74
+
-**libraries/microsoft-agents-a365-notifications**: Microsoft Agent 365 Notifications SDK - Agent notification services and models
75
+
-**libraries/microsoft-agents-a365-observability-core**: Microsoft Agent 365 Observability Core - Core observability functionality
For usage examples and detailed documentation, see the [Notification documentation](https://learn.microsoft.com/microsoft-agent-365/developer/notification?tabs=python) on Microsoft Learn.
with InvokeAgentScope.start(invoke_details, tenant_details, request):
57
-
# Agent execution code here
58
-
result =await process_request()
59
-
60
-
# Trace tool execution
61
-
tool_details = ToolCallDetails(
62
-
tool_name="search_tool",
63
-
tool_type="function"
64
-
)
65
-
66
-
with ExecuteToolScope.start(tool_details, agent_details, tenant_details):
67
-
# Tool execution code
68
-
search_result =await execute_search()
69
-
70
-
# Trace LLM inference
71
-
inference_details = InferenceCallDetails(
72
-
operationName="chat",
73
-
model="gpt-4"
74
-
)
75
-
76
-
with InferenceScope.start(inference_details, agent_details, tenant_details, request):
77
-
# LLM call
78
-
response =await llm.complete(prompt)
79
-
```
16
+
For usage examples and detailed documentation, see the [Observability documentation](https://learn.microsoft.com/microsoft-agent-365/developer/observability?tabs=python) on Microsoft Learn.
from microsoft_agents_a365.observability.extensions.agentframework import (
20
-
AgentFrameworkTraceInstrumentor
21
-
)
22
-
23
-
# Initialize instrumentor
24
-
instrumentor = AgentFrameworkTraceInstrumentor()
25
-
26
-
# Instrument your agent framework application
27
-
instrumentor.instrument()
28
-
29
-
# Your agent code runs with automatic tracing
30
-
# ...
31
-
32
-
# Optional: Uninstrument when done
33
-
instrumentor.uninstrument()
34
-
```
16
+
For usage examples and detailed documentation, see the [Observability documentation](https://learn.microsoft.com/microsoft-agent-365/developer/observability?tabs=python) on Microsoft Learn.
from microsoft_agents_a365.observability.core import configure
20
-
from microsoft_agents_a365.observability.extensions.langchain import (
21
-
CustomLangChainInstrumentor
22
-
)
23
-
24
-
# Configure observability
25
-
configure(
26
-
service_name="my-langchain-agent",
27
-
service_namespace="ai.agents"
28
-
)
29
-
30
-
# Enable automatic instrumentation
31
-
instrumentor = CustomLangChainInstrumentor()
32
-
instrumentor.instrument()
33
-
34
-
# Your LangChain code is now automatically traced
35
-
from langchain.chains import LLMChain
36
-
from langchain.prompts import PromptTemplate
37
-
38
-
# All LangChain operations will be automatically instrumented
39
-
chain = LLMChain(llm=llm, prompt=prompt_template)
40
-
result = chain.run(input_text)
41
-
```
16
+
For usage examples and detailed documentation, see the [Observability documentation](https://learn.microsoft.com/microsoft-agent-365/developer/observability?tabs=python) on Microsoft Learn.
from microsoft_agents_a365.observability.core import configure
20
-
from microsoft_agents_a365.observability.extensions.openai import (
21
-
OpenAIAgentsTraceInstrumentor
22
-
)
23
-
24
-
# Configure observability
25
-
configure(
26
-
service_name="my-openai-agent",
27
-
service_namespace="ai.agents"
28
-
)
29
-
30
-
# Enable automatic instrumentation
31
-
instrumentor = OpenAIAgentsTraceInstrumentor()
32
-
instrumentor.instrument()
33
-
34
-
# Your OpenAI Agents code is now automatically traced
35
-
from openai import OpenAI
36
-
37
-
client = OpenAI()
38
-
# All agent operations will be automatically instrumented
39
-
```
16
+
For usage examples and detailed documentation, see the [Observability documentation](https://learn.microsoft.com/microsoft-agent-365/developer/observability?tabs=python) on Microsoft Learn.
from microsoft_agents_a365.observability.core import configure
20
-
from microsoft_agents_a365.observability.extensions.semantickernel import (
21
-
SemanticKernelInstrumentor
22
-
)
23
-
24
-
# Configure observability
25
-
configure(
26
-
service_name="my-semantic-kernel-agent",
27
-
service_namespace="ai.agents"
28
-
)
29
-
30
-
# Enable automatic instrumentation
31
-
instrumentor = SemanticKernelInstrumentor()
32
-
instrumentor.instrument()
33
-
34
-
# Your Semantic Kernel code is now automatically traced
35
-
from semantic_kernel import Kernel
36
-
37
-
kernel = Kernel()
38
-
# All kernel operations will be automatically instrumented
39
-
```
16
+
For usage examples and detailed documentation, see the [Observability documentation](https://learn.microsoft.com/microsoft-agent-365/developer/observability?tabs=python) on Microsoft Learn.
For usage examples and detailed documentation, see the [Microsoft Agent 365 Developer documentation](https://learn.microsoft.com/microsoft-agent-365/developer/?tabs=python) on Microsoft Learn.
For usage examples and detailed documentation, see the [Tooling documentation](https://learn.microsoft.com/microsoft-agent-365/developer/tooling?tabs=python) on Microsoft Learn.
0 commit comments