diff --git a/README.md b/README.md index c4c11143..dc47b41f 100644 --- a/README.md +++ b/README.md @@ -1,86 +1,19 @@ -# Kairo Python SDK +# Microsoft Agent 365 Python SDK -A Python SDK for Kairo, providing telemetry and monitoring capabilities. +The Microsoft Agent365 SDK provides comprehensive observability, tooling, and runtime capabilities for AI agents and tools built with Python. -## Installation +## 📚 Library Documentation -```bash -pip install microsoft-kairo -``` +Each library includes comprehensive documentation: -## Usage - -### Basic Configuration - -```python -import microsoft_kairo - -# Configure Kairo with console output (default) -microsoft_kairo.configure_kairo( - service_name="my-service", - service_namespace="my-namespace", - agent_id="agent-123" -) -``` - -### Advanced Configuration - -```python -import microsoft_kairo - -# Configure with Azure Monitor -microsoft_kairo.configure_kairo( - service_name="my-service", - service_namespace="my-namespace", - agent_id="agent-123", - exporter_type="azure_monitor", - exporter_endpoint="InstrumentationKey=your-instrumentation-key" -) - -# Configure with OTLP exporter -microsoft_kairo.configure_kairo( - service_name="my-service", - service_namespace="my-namespace", - agent_id="agent-123", - exporter_type="otlp", - exporter_endpoint="http://localhost:4317" -) -``` - -### Available Exports - -- `configure_kairo()`: Main configuration function -- `KairoSpanProcessor`: Custom span processor class -- `KAIRO_AGENT_ID_KEY`: Constant for agent ID attribute key - -## Optional Dependencies - -- `otlp`: OpenTelemetry OTLP exporter -- `jaeger`: Jaeger exporter -- `azure`: Azure Monitor exporter -- `all`: All optional dependencies - -Install with optional dependencies: - -```bash -pip install microsoft-kairo[azure] -``` - -## Building and publishing the package - -Build the package with: - -``` -uv build --wheel -``` - -which will generate a date-based wheel package in the `dist/` folder. Ex.: `dist\microsoft_kairo-2025.10.7+preview.15276-py3-none-any.whl`. - -Then publish it with: - -``` -uv run twine upload --config-file .\.pypirc -r Agent365 dist/* -``` +| Library | Purpose | Documentation | +|---------|---------|---------------| +| **Observability Core** | Core telemetry and tracing | [`/libraries/microsoft-agents-a365-observability-core/README.md`](./libraries/microsoft-agents-a365-observability-core/README.md) | +| **Runtime** | Environment management and utilities | [`/libraries/microsoft-agents-a365-runtime/README.md`](./libraries/microsoft-agents-a365-runtime/README.md) | +| **Tooling** | MCP server configuration and utilities | [`/libraries/microsoft-agents-a365-tooling/README.md`](./libraries/microsoft-agents-a365-tooling/README.md) | +| **OpenAI Extensions** | OpenAI integration and observability | [`/libraries/microsoft-agents-a365-observability-extensions-openai/README.md`](./libraries/microsoft-agents-a365-observability-extensions-openai/README.md) | +| **LangChain Extensions** | LangChain integration and observability | [`/libraries/microsoft-agents-a365-observability-extensions-langchain/README.md`](./libraries/microsoft-agents-a365-observability-extensions-langchain/README.md) | +| **Semantic Kernel Extensions** | Semantic Kernel integration | [`/libraries/microsoft-agents-a365-observability-extensions-semantickernel/README.md`](./libraries/microsoft-agents-a365-observability-extensions-semantickernel/README.md) | ## 📋 **Telemetry** diff --git a/libraries/microsoft-agents-a365-observability-core/README.md b/libraries/microsoft-agents-a365-observability-core/README.md index fb0fd7f2..dd3b3868 100644 --- a/libraries/microsoft-agents-a365-observability-core/README.md +++ b/libraries/microsoft-agents-a365-observability-core/README.md @@ -27,12 +27,6 @@ ENABLE_A365_OBSERVABILITY_EXPORTER=true # Use Agent365 exporter (otherwise fa PYTHON_ENVIRONMENT=production # Or development; influences target cluster/category resolution ``` -Alias (legacy) environment variables still honored for backward compatibility: - -```properties -ENABLE_KAIRO_EXPORTER=true # Legacy name (deprecated) -``` - Prefer the canonical `ENABLE_A365_OBSERVABILITY_EXPORTER`. If you omit `ENABLE_OBSERVABILITY` or set it to false, scopes become no‑ops and no spans are recorded. ## Configuration diff --git a/libraries/microsoft-agents-a365-observability-core/microsoft_agents_a365/observability/core/constants.py b/libraries/microsoft-agents-a365-observability-core/microsoft_agents_a365/observability/core/constants.py index 57474b46..e5fcf277 100644 --- a/libraries/microsoft-agents-a365-observability-core/microsoft_agents_a365/observability/core/constants.py +++ b/libraries/microsoft-agents-a365-observability-core/microsoft_agents_a365/observability/core/constants.py @@ -18,7 +18,6 @@ TRACE_CONTENTS_SWITCH = "Azure.Experimental.TraceGenAIMessageContent" TRACE_CONTENTS_ENVIRONMENT_VARIABLE = "AZURE_TRACING_GEN_AI_CONTENT_RECORDING_ENABLED" ENABLE_OBSERVABILITY = "ENABLE_OBSERVABILITY" -ENABLE_KAIRO_EXPORTER = "ENABLE_KAIRO_EXPORTER" ENABLE_A365_OBSERVABILITY_EXPORTER = "ENABLE_A365_OBSERVABILITY_EXPORTER" ENABLE_A365_OBSERVABILITY = "ENABLE_A365_OBSERVABILITY" @@ -100,9 +99,6 @@ GEN_AI_EXECUTION_SOURCE_NAME_KEY = "gen_ai.channel.name" GEN_AI_EXECUTION_SOURCE_DESCRIPTION_KEY = "gen_ai.channel.link" -# Legacy constant for backward compatibility -KAIRO_AGENT_ID_KEY = AGENT_ID_KEY - # custom parent id and parent name key CUSTOM_PARENT_SPAN_ID_KEY = "custom.parent.span.id" CUSTOM_SPAN_NAME_KEY = "custom.span.name" diff --git a/libraries/microsoft-agents-a365-observability-core/microsoft_agents_a365/observability/core/exporters/utils.py b/libraries/microsoft-agents-a365-observability-core/microsoft_agents_a365/observability/core/exporters/utils.py index 55d75287..4d1c75ca 100644 --- a/libraries/microsoft-agents-a365-observability-core/microsoft_agents_a365/observability/core/exporters/utils.py +++ b/libraries/microsoft-agents-a365-observability-core/microsoft_agents_a365/observability/core/exporters/utils.py @@ -9,7 +9,6 @@ from ..constants import ( ENABLE_A365_OBSERVABILITY_EXPORTER, - ENABLE_KAIRO_EXPORTER, GEN_AI_AGENT_ID_KEY, TENANT_ID_KEY, ) @@ -69,6 +68,5 @@ def partition_by_identity( def is_agent365_exporter_enabled() -> bool: """Check if agent365 exporter is enabled.""" # Check environment variable - env_value = os.getenv(ENABLE_KAIRO_EXPORTER, "").lower() enable_exporter = os.getenv(ENABLE_A365_OBSERVABILITY_EXPORTER, "").lower() - return (env_value or enable_exporter) in ("true", "1", "yes", "on") + return (enable_exporter) in ("true", "1", "yes", "on") diff --git a/libraries/microsoft-agents-a365-observability-extensions-openai/README.md b/libraries/microsoft-agents-a365-observability-extensions-openai/README.md index 1faadf6f..24259b44 100644 --- a/libraries/microsoft-agents-a365-observability-extensions-openai/README.md +++ b/libraries/microsoft-agents-a365-observability-extensions-openai/README.md @@ -85,7 +85,7 @@ instrumentor.instrument() ```properties # Core observability settings ENABLE_OBSERVABILITY=true -ENABLE_KAIRO_EXPORTER=true +ENABLE_A365_OBSERVABILITY_EXPORTER=true PYTHON_ENVIRONMENT=production # OpenAI Agents-specific settings diff --git a/libraries/microsoft-agents-a365-observability-extensions-semantickernel/README.md b/libraries/microsoft-agents-a365-observability-extensions-semantickernel/README.md index 96ef89a8..a4dfc915 100644 --- a/libraries/microsoft-agents-a365-observability-extensions-semantickernel/README.md +++ b/libraries/microsoft-agents-a365-observability-extensions-semantickernel/README.md @@ -86,7 +86,7 @@ instrumentor.instrument() ```properties # Core observability settings ENABLE_OBSERVABILITY=true -ENABLE_KAIRO_EXPORTER=true +ENABLE_A365_OBSERVABILITY_EXPORTER=true PYTHON_ENVIRONMENT=production # Semantic Kernel-specific settings