Skip to content
Merged
Show file tree
Hide file tree
Changes from 9 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": "latest",
"@microsoft/agents-a365-observability": "latest",
"@microsoft/agents-a365-observability-hosting": "latest",
"@microsoft/agents-a365-runtime": "latest",
"@microsoft/agents-a365-tooling": "latest",
"@microsoft/agents-a365-tooling-extensions-claude": "latest",
"@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": "latest",
"@microsoft/agents-a365-observability": "latest",
"@microsoft/agents-a365-observability-hosting": "latest",
"@microsoft/agents-a365-runtime": "latest",
"@microsoft/agents-a365-tooling": "latest",
"@microsoft/agents-a365-tooling-extensions-langchain": "latest",
"@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": "latest",
"@microsoft/agents-a365-observability": "latest",
"@microsoft/agents-a365-observability-extensions-openai": "latest",
"@microsoft/agents-a365-observability-hosting": "latest",
"@microsoft/agents-a365-runtime": "latest",
"@microsoft/agents-a365-tooling": "latest",
"@microsoft/agents-a365-tooling-extensions-openai": "latest",
"@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": "latest",
"@microsoft/agents-a365-observability": "latest",
"@microsoft/agents-a365-observability-hosting": "latest",
"@microsoft/agents-a365-runtime": "latest",
"@microsoft/agents-a365-tooling": "latest",
"@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
46 changes: 35 additions & 11 deletions python/google-adk/sample-agent/.env.template
Original file line number Diff line number Diff line change
@@ -1,11 +1,13 @@
# Google Gemini Configuration
GOOGLE_GENAI_USE_VERTEXAI=FALSE
GOOGLE_API_KEY=
GOOGLE_API_KEY=<<YOUR_GOOGLE_API_KEY>>
GEMINI_MODEL=gemini-2.5-flash

# Agent365 Agentic Authentication Configuration
CONNECTIONS__SERVICE_CONNECTION__SETTINGS__CLIENTID=
CONNECTIONS__SERVICE_CONNECTION__SETTINGS__CLIENTSECRET=
CONNECTIONS__SERVICE_CONNECTION__SETTINGS__TENANTID=
CONNECTIONS__SERVICE_CONNECTION__SETTINGS__SCOPES=5a807f24-c9de-44ee-a3a7-329e88a00ffc/.default
CONNECTIONS__SERVICE_CONNECTION__SETTINGS__CLIENTID=<<YOUR_CLIENT_ID>>
CONNECTIONS__SERVICE_CONNECTION__SETTINGS__CLIENTSECRET=<<YOUR_CLIENT_SECRET>>
CONNECTIONS__SERVICE_CONNECTION__SETTINGS__TENANTID=<<YOUR_TENANT_ID>>
CONNECTIONS__SERVICE_CONNECTION__SETTINGS__SCOPES=<<YOUR_APP_ID>>/.default

AGENTAPPLICATION__USERAUTHORIZATION__HANDLERS__AGENTIC__SETTINGS__TYPE=AgenticUserAuthorization
AGENTAPPLICATION__USERAUTHORIZATION__HANDLERS__AGENTIC__SETTINGS__SCOPES=https://graph.microsoft.com/.default
Expand All @@ -14,9 +16,31 @@ AGENTAPPLICATION__USERAUTHORIZATION__HANDLERS__AGENTIC__SETTINGS__ALTERNATEBLUEP
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 (from the A365 portal / blueprint)
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>>

# 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 Configuration
# Set to "AGENTIC" for production agentic auth, or leave empty for Playground/local dev
AUTH_HANDLER_NAME=

# Logging
LOG_LEVEL=INFO

# Server Configuration
# Local dev: 3978 — Azure App Service / GCP Cloud Run: port is injected automatically by the platform (typically 8000)
PORT=3978

# 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