Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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: 6 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -103,6 +103,12 @@ coverage/
**/.claude/
.idea/

# A365 deploy artifacts — generated by `a365 deploy` / `a365 develop`
a365.config.json
a365.generated.config.json
app.zip
publish/

# OS-specific files
.DS_Store
Thumbs.db
16 changes: 8 additions & 8 deletions nodejs/claude/sample-agent/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -16,15 +16,15 @@
"license": "MIT",
"description": "",
"dependencies": {
"@microsoft/agents-hosting": "^1.2.2",
"@microsoft/agents-activity": "^1.2.2",
"@microsoft/agents-a365-notifications": "^0.1.0-preview.30",
"@microsoft/agents-a365-observability": "^0.1.0-preview.30",
"@microsoft/agents-a365-runtime": "^0.1.0-preview.30",
"@microsoft/agents-a365-observability-hosting": "^0.1.0-preview.64",
"@microsoft/agents-a365-tooling": "^0.1.0-preview.30",
"@microsoft/agents-a365-tooling-extensions-claude": "^0.1.0-preview.30",
"@anthropic-ai/claude-agent-sdk": "^0.1.1",
"@microsoft/agents-a365-notifications": "^0.1.0-preview.125",
"@microsoft/agents-a365-observability": "^0.1.0-preview.125",
"@microsoft/agents-a365-observability-hosting": "^0.1.0-preview.125",
"@microsoft/agents-a365-runtime": "^0.1.0-preview.125",
"@microsoft/agents-a365-tooling": "^0.1.0-preview.125",
"@microsoft/agents-a365-tooling-extensions-claude": "^0.1.0-preview.125",
"@microsoft/agents-activity": "^1.2.2",
"@microsoft/agents-hosting": "^1.2.2",
"dotenv": "^17.2.2",
"express": "^5.1.0"
},
Expand Down
13 changes: 6 additions & 7 deletions nodejs/claude/sample-agent/src/client.ts
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,8 @@ import {
Builder,
InferenceOperationType,
AgentDetails,
TenantDetails,
InferenceDetails,
Request,
Agent365ExporterOptions,
} from '@microsoft/agents-a365-observability';
import { AgenticTokenCacheInstance } from '@microsoft/agents-a365-observability-hosting';
Expand Down Expand Up @@ -141,17 +141,16 @@ class ClaudeClient implements Client {
model: this.config.model || "",
};

const agentDetails: AgentDetails = {
agentId: 'claude-travel-agent',
agentName: 'Claude Travel Agent',
const request: Request = {
conversationId: 'conv-12345',
};

const tenantDetails: TenantDetails = {
tenantId: 'claude-sample-tenant',
const agentDetails: AgentDetails = {
agentId: 'claude-travel-agent',
agentName: 'Claude Travel Agent',
};

const scope = InferenceScope.start(inferenceDetails, agentDetails, tenantDetails);
const scope = InferenceScope.start(request, inferenceDetails, agentDetails);

const response = await this.invokeAgent(prompt);

Expand Down
12 changes: 6 additions & 6 deletions nodejs/langchain/sample-agent/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -23,14 +23,14 @@
"@langchain/langgraph": "^1.0.2",
"@langchain/mcp-adapters": "^1.0.0",
"@langchain/openai": "^1.0.2",
"@microsoft/agents-a365-notifications": "^0.1.0-preview.30",
"@microsoft/agents-a365-observability": "^0.1.0-preview.30",
"@microsoft/agents-a365-runtime": "^0.1.0-preview.30",
"@microsoft/agents-a365-tooling": "^0.1.0-preview.30",
"@microsoft/agents-a365-tooling-extensions-langchain": "^0.1.0-preview.30",
"@microsoft/agents-a365-notifications": "^0.1.0-preview.125",
"@microsoft/agents-a365-observability": "^0.1.0-preview.125",
"@microsoft/agents-a365-observability-hosting": "^0.1.0-preview.125",
"@microsoft/agents-a365-runtime": "^0.1.0-preview.125",
"@microsoft/agents-a365-tooling": "^0.1.0-preview.125",
"@microsoft/agents-a365-tooling-extensions-langchain": "^0.1.0-preview.125",
"@microsoft/agents-activity": "^1.2.2",
"@microsoft/agents-hosting": "^1.2.2",
"@microsoft/agents-a365-observability-hosting": "^0.1.0-preview.64",
"dotenv": "^17.2.3",
"express": "^5.1.0",
"langchain": "^1.0.1",
Expand Down
12 changes: 6 additions & 6 deletions nodejs/langchain/sample-agent/src/client.ts
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,8 @@ import {
Builder,
InferenceOperationType,
AgentDetails,
TenantDetails,
InferenceDetails,
Request,
Agent365ExporterOptions,
} from '@microsoft/agents-a365-observability';
import { AgenticTokenCacheInstance } from '@microsoft/agents-a365-observability-hosting';
Expand Down Expand Up @@ -209,18 +209,18 @@ class LangChainClient implements Client {
model: "gpt-4o-mini",
};

const agentDetails: AgentDetails = {
agentId: this.turnContext?.activity?.recipient?.agenticAppId || agentName,
agentName: agentName,
const request: Request = {
conversationId: this.turnContext?.activity?.conversation?.id || `conv-${Date.now()}`,
};

const tenantDetails: TenantDetails = {
const agentDetails: AgentDetails = {
agentId: this.turnContext?.activity?.recipient?.agenticAppId || agentName,
agentName: agentName,
tenantId: this.turnContext?.activity?.recipient?.tenantId || 'sample-tenant',
};

let response = '';
const scope = InferenceScope.start(inferenceDetails, agentDetails, tenantDetails);
const scope = InferenceScope.start(request, inferenceDetails, agentDetails);
try {
await scope.withActiveSpanAsync(async () => {
response = await this.invokeAgent(prompt);
Expand Down
20 changes: 10 additions & 10 deletions nodejs/openai/sample-agent/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -15,19 +15,19 @@
"license": "MIT",
"description": "",
"dependencies": {
"@microsoft/agents-hosting": "^1.2.2",
"@microsoft/agents-a365-notifications": "^0.1.0-preview.125",
"@microsoft/agents-a365-observability": "^0.1.0-preview.125",
"@microsoft/agents-a365-observability-extensions-openai": "^0.1.0-preview.125",
"@microsoft/agents-a365-observability-hosting": "^0.1.0-preview.125",
"@microsoft/agents-a365-runtime": "^0.1.0-preview.125",
"@microsoft/agents-a365-tooling": "^0.1.0-preview.125",
"@microsoft/agents-a365-tooling-extensions-openai": "^0.1.0-preview.125",
"@microsoft/agents-activity": "^1.2.2",
"@microsoft/agents-a365-notifications": "^0.1.0-preview.30",
"@microsoft/agents-a365-observability": "^0.1.0-preview.30",
"@microsoft/agents-a365-runtime": "^0.1.0-preview.30",
"@microsoft/agents-a365-observability-hosting": "^0.1.0-preview.64",
"@microsoft/agents-a365-tooling": "^0.1.0-preview.30",
"@microsoft/agents-a365-tooling-extensions-openai": "^0.1.0-preview.30",
"@microsoft/agents-a365-observability-extensions-openai": "^0.1.0-preview.30",
"@microsoft/agents-hosting": "^1.2.2",
"@openai/agents": "^0.1.11",
"openai": "^4.77.0",
"dotenv": "^17.2.2",
"express": "^5.1.0"
"express": "^5.1.0",
"openai": "^4.77.0"
},
"devDependencies": {
"@microsoft/m365agentsplayground": "^0.2.18",
Expand Down
13 changes: 6 additions & 7 deletions nodejs/openai/sample-agent/src/client.ts
Original file line number Diff line number Diff line change
Expand Up @@ -22,8 +22,8 @@ import {
Builder,
InferenceOperationType,
AgentDetails,
TenantDetails,
InferenceDetails,
Request,
Agent365ExporterOptions,
} from '@microsoft/agents-a365-observability';
import { OpenAIAgentsTraceInstrumentor } from '@microsoft/agents-a365-observability-extensions-openai';
Expand Down Expand Up @@ -147,17 +147,16 @@ class OpenAIClient implements Client {
model: this.agent.model.toString(),
};

const request: Request = {
conversationId: 'conv-12345',
};

const agentDetails: AgentDetails = {
agentId: 'typescript-compliance-agent',
agentName: 'TypeScript Compliance Agent',
conversationId: 'conv-12345',
};

const tenantDetails: TenantDetails = {
tenantId: 'typescript-sample-tenant',
};

const scope = InferenceScope.start(inferenceDetails, agentDetails, tenantDetails);
const scope = InferenceScope.start(request, inferenceDetails, agentDetails);
try {
await scope.withActiveSpanAsync(async () => {
try {
Expand Down
8 changes: 5 additions & 3 deletions nodejs/vercel-sdk/sample-agent/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -20,9 +20,11 @@
"license": "MIT",
"dependencies": {
"@ai-sdk/anthropic": "^2.0.31",
"@microsoft/agents-a365-notifications": "^0.1.0-preview.30",
"@microsoft/agents-a365-observability": "^0.1.0-preview.30",
"@microsoft/agents-a365-runtime": "^0.1.0-preview.30",
"@microsoft/agents-a365-notifications": "^0.1.0-preview.125",
"@microsoft/agents-a365-observability": "^0.1.0-preview.125",
"@microsoft/agents-a365-observability-hosting": "^0.1.0-preview.125",
"@microsoft/agents-a365-runtime": "^0.1.0-preview.125",
"@microsoft/agents-a365-tooling": "^0.1.0-preview.125",
"@microsoft/agents-activity": "^1.1.0-alpha.85",
"@microsoft/agents-hosting": "^1.1.0-alpha.85",
"ai": "^5.0.72",
Expand Down
15 changes: 7 additions & 8 deletions nodejs/vercel-sdk/sample-agent/src/client.ts
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,8 @@ import {
Builder,
InferenceOperationType,
AgentDetails,
TenantDetails,
InferenceDetails
InferenceDetails,
Request
} from '@microsoft/agents-a365-observability';

const modelName = 'claude-sonnet-4-20250514';
Expand Down Expand Up @@ -104,18 +104,17 @@ class VercelAiClient implements Client {
model: modelName,
};

const agentDetails: AgentDetails = {
agentId: 'vercel-ai-sdk-agent',
agentName: 'Vercel AI SDK Agent',
const request: Request = {
conversationId: 'conv-12345',
};

const tenantDetails: TenantDetails = {
tenantId: 'vercel-ai-sdk-sample-agent',
const agentDetails: AgentDetails = {
agentId: 'vercel-ai-sdk-agent',
agentName: 'Vercel AI SDK Agent',
};

let response = '';
const scope = InferenceScope.start(inferenceDetails, agentDetails, tenantDetails);
const scope = InferenceScope.start(request, inferenceDetails, agentDetails);
try {
await scope.withActiveSpanAsync(async () => {
try {
Expand Down
102 changes: 90 additions & 12 deletions python/google-adk/sample-agent/.env.template
Original file line number Diff line number Diff line change
@@ -1,22 +1,100 @@
GOOGLE_GENAI_USE_VERTEXAI=FALSE
GOOGLE_API_KEY=
# =============================================================================
# Google ADK Sample Agent — Environment Configuration
# =============================================================================
# Copy this file to .env and fill in your values:
# cp .env.template .env
#
# All values marked <<...>> MUST be replaced before the agent will work.
# Run `a365 config init` first — it generates the config files referenced below.
# =============================================================================

# Agent365 Agentic Authentication Configuration
CONNECTIONS__SERVICE_CONNECTION__SETTINGS__CLIENTID=
CONNECTIONS__SERVICE_CONNECTION__SETTINGS__CLIENTSECRET=
CONNECTIONS__SERVICE_CONNECTION__SETTINGS__TENANTID=
# -----------------------------------------------------------------------------
# Google Gemini Configuration
# -----------------------------------------------------------------------------
GOOGLE_GENAI_USE_VERTEXAI=FALSE
GOOGLE_API_KEY=<<YOUR_GOOGLE_API_KEY>>
GEMINI_MODEL=gemini-2.5-flash
GOOGLE_CLOUD_PROJECT=<<YOUR_GOOGLE_CLOUD_PROJECT>>
GOOGLE_CLOUD_LOCATION=<<YOUR_GOOGLE_CLOUD_LOCATION>>
GOOGLE_GENAI_USE_VERTEXAI=TRUE
# -----------------------------------------------------------------------------
# Agent365 Service Connection (OAuth client credentials)
# -----------------------------------------------------------------------------
# These values authenticate your agent with the Bot Framework and Agent 365.
#
# Where to find them (after running `a365 config init`):
# CLIENTID => a365.generated.config.json → agentBlueprintId
# CLIENTSECRET => a365.generated.config.json → agentBlueprintClientSecret
# TENANTID => a365.config.json → tenantId
#
# IMPORTANT — Client Secret:
# The a365.generated.config.json stores the secret encrypted with Windows DPAPI.
# Use `a365 config display -g` to view the decrypted secret, and copy it here.
#
# IMPORTANT — Client ID and JWT Audience:
# CLIENTID is the blueprint/app-registration ID. Bot Framework tokens are issued
# with aud=CLIENTID, so this value is also used for JWT audience validation.
CONNECTIONS__SERVICE_CONNECTION__SETTINGS__CLIENTID=<<YOUR_BLUEPRINT_ID>>
CONNECTIONS__SERVICE_CONNECTION__SETTINGS__CLIENTSECRET=<<YOUR_PLAINTEXT_CLIENT_SECRET>>
CONNECTIONS__SERVICE_CONNECTION__SETTINGS__TENANTID=<<YOUR_TENANT_ID>>
CONNECTIONS__SERVICE_CONNECTION__SETTINGS__SCOPES=5a807f24-c9de-44ee-a3a7-329e88a00ffc/.default

# Agentic user-authorization handler settings (do not change these defaults)
AGENTAPPLICATION__USERAUTHORIZATION__HANDLERS__AGENTIC__SETTINGS__TYPE=AgenticUserAuthorization
AGENTAPPLICATION__USERAUTHORIZATION__HANDLERS__AGENTIC__SETTINGS__SCOPES=https://graph.microsoft.com/.default
AGENTAPPLICATION__USERAUTHORIZATION__HANDLERS__AGENTIC__SETTINGS__ALTERNATEBLUEPRINTCONNECTIONNAME=https://graph.microsoft.com/.default

# Connection map (do not change)
CONNECTIONSMAP__0__SERVICEURL=*
CONNECTIONSMAP__0__CONNECTION=SERVICE_CONNECTION

# These values are expected to be in the activity's recipient field
AGENTIC_UPN=
AGENTIC_NAME=
AGENTIC_USER_ID=
AGENTIC_APP_ID=
AGENTIC_TENANT_ID=
# -----------------------------------------------------------------------------
# Agent Identity
# -----------------------------------------------------------------------------
# These identify your agent in the Agent 365 ecosystem.
#
# Where to find them:
# AGENTIC_UPN => a365.config.json → agentUserPrincipalName
# AGENTIC_NAME => a365.config.json → agentUserDisplayName
# AGENTIC_USER_ID => a365.generated.config.json → AgenticUserId
# AGENTIC_APP_ID => a365.generated.config.json → AgenticAppId
# AGENTIC_TENANT_ID => a365.config.json → tenantId
#
# NOTE: AGENTIC_APP_ID is the agentic app ID, which is different from the
# blueprint ID (CLIENTID above). Do not use AGENTIC_APP_ID for JWT validation.
AGENTIC_UPN=<<YOUR_AGENT_UPN>>
AGENTIC_NAME=<<YOUR_AGENT_NAME>>
AGENTIC_USER_ID=<<YOUR_AGENTIC_USER_ID>>
AGENTIC_APP_ID=<<YOUR_AGENTIC_APP_ID>>
AGENTIC_TENANT_ID=<<YOUR_TENANT_ID>>

# -----------------------------------------------------------------------------
# Local Development
# -----------------------------------------------------------------------------
# Bearer token for local dev / Playground — obtain with: a365 develop get-token -o raw
# Leave empty to run in bare LLM mode (no MCP tools)
BEARER_TOKEN=

# Authentication handler:
# "AGENTIC" — production (Teams / Azure deployment). Enforces agentic auth on message handlers.
# "" — local dev / Agents Playground. Allows anonymous access.
AUTH_HANDLER_NAME=

# -----------------------------------------------------------------------------
# Server
# -----------------------------------------------------------------------------
# Port for the aiohttp server.
# Local dev default: 3978. Azure App Service injects PORT automatically.
PORT=3978

# Logging level: DEBUG, INFO, WARNING, ERROR
LOG_LEVEL=INFO

# -----------------------------------------------------------------------------
# Observability
# -----------------------------------------------------------------------------
ENABLE_OBSERVABILITY=true
ENABLE_A365_OBSERVABILITY_EXPORTER=false
PYTHON_ENVIRONMENT=development
OBSERVABILITY_SERVICE_NAME=GoogleADKSampleAgent
OBSERVABILITY_SERVICE_NAMESPACE=GoogleADKTesting
21 changes: 21 additions & 0 deletions python/google-adk/sample-agent/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
# A365 deploy artifacts — generated by `a365 deploy` / `a365 develop`
a365.config.json
a365.generated.config.json
app.zip
publish/

# Manifest folder — generated during deploy
manifest/

# Python virtual environment and caches
.venv/
venv/
__pycache__/
*.py[cod]
*.egg-info/
dist/
build/
uv.lock

# Environment — contains secrets
.env
Loading
Loading