Skip to content
Open
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
144 changes: 144 additions & 0 deletions scenarios/career-coach/.env.template
Original file line number Diff line number Diff line change
@@ -0,0 +1,144 @@
# ─────────────────────────────────────────────────────────────────────────────
# Career Coach autopilot — environment template
# Copy this file to .env and fill in the values marked <CHANGE_ME>.
# All non-secret defaults are kept — you can leave those as-is.
# Never commit the filled-in .env.
# ─────────────────────────────────────────────────────────────────────────────

# =============================================================================
# 1. OPENAI CONFIGURATION
# =============================================================================
# Use EITHER standard OpenAI OR Azure OpenAI (not both). Azure OpenAI takes
# precedence if AZURE_OPENAI_API_KEY is set.

# --- Option A: Standard OpenAI ---
OPENAI_API_KEY=
OPENAI_MODEL=gpt-4o

# --- Option B: Azure OpenAI (recommended for this project) ---
AZURE_OPENAI_API_KEY=<CHANGE_ME_azure_openai_key>
AZURE_OPENAI_ENDPOINT=https://<CHANGE_ME_resource_name>.openai.azure.com/
AZURE_OPENAI_DEPLOYMENT=gpt-4o
AZURE_OPENAI_API_VERSION=2024-10-21


# =============================================================================
# 2. MCP + OBSERVABILITY
# =============================================================================
# Optional, local development only: a token for the MCP tool servers, from `a365 develop get-token`.
# Leave empty in deployed environments — the agent mints its own tokens per turn.
BEARER_TOKEN=

# A365 observability exporter. Export is opt-in: only the exact value "true" sends spans (which include
# the user's messages) to Agent 365. Ships "false" so a copied template exports nothing; set it to true
# once the agent is registered and you want Defender / Purview / admin-center reporting.
ENABLE_A365_OBSERVABILITY_EXPORTER=false

# Exporter diagnostics: none | info | warn | error (pipe-separated). warn|error surfaces failed exports;
# add info to also log successful export / token activity (useful while verifying telemetry, noisy afterwards).
A365_OBSERVABILITY_LOG_LEVEL=info|warn|error
# OpenTelemetry SDK diagnostics. Uncomment together with the line above to see export results.
# OTEL_LOG_LEVEL=INFO


# =============================================================================
# 3. ENVIRONMENT SETTINGS
# =============================================================================
# NODE_ENV=development
# HOST=127.0.0.1
# PORT defaults to 3978.
# PORT=3978

# Debug namespace. Narrowed from 'agents:*' to cut MSAL/connector noise while
# keeping onTurnError + adapter events visible.
DEBUG=agents:app:*,agents:cloud-adapter:*


# =============================================================================
# 4. SHAREPOINT CONFIGURATION
# =============================================================================
SP_SITE_HOST=<CHANGE_ME_tenant>.sharepoint.com
SP_SITE_PATH=/sites/CareerCoach
SP_LIST_COMPETENCY_FRAMEWORK=CompetencyFramework_v2
SP_LIST_LEARNING_CATALOG=LearningCatalog_v2
SP_LIST_USER_STATE=UserState
SP_LIST_LEARNING_PORTAL_STATUS=LearningPortalStatus
SP_LIST_QUIZ_RESPONSES=QuizResponses


# =============================================================================
# 5. FEATURE 1 — REAL-TIME WEBHOOK (Graph subscription → proactive DM)
# =============================================================================
# Random shared secret (at least 16 characters; empty or placeholder values are rejected). It is the
# Graph subscription clientState AND the X-Portal-Secret header for manual tests, and /api/portal-event
# sits in front of the JWT check, so treat it as a real secret. Generate one with:
# [Guid]::NewGuid().ToString() + [Guid]::NewGuid().ToString()
PORTAL_EVENT_SECRET=

# Public HTTPS URL that Microsoft Graph POSTs change notifications to.
# Point at your dev tunnel + /api/portal-event. Example:
# https://spiffy-dog-abc.inc1.devtunnels.ms/api/portal-event
# With NODE_ENV=production this needs a valid PORTAL_EVENT_SECRET and the service connection below,
# or the agent refuses to start.
PORTAL_WEBHOOK_URL=https://<CHANGE_ME_devtunnel>.inc1.devtunnels.ms/api/portal-event

# Optional: the agent's own ids, so the background Graph subscription can start before anyone has
# messaged the agent. Normally leave empty — they are learned from the first message and saved to
# .agent-identity.json. agent instance = the app id of the agent instance, user = its agentic user id.
AGENT_INSTANCE_ID=
AGENT_USER_ID=


# =============================================================================
# 6. A365 HOSTED-AGENT AUTH (agentic identity, no manual token refresh)
# =============================================================================
USE_AGENTIC_AUTH=true

# Values below come from the Entra ID app registration that A365 provisions for
# your hosted-agent project. Get them from: Azure portal → App registrations
connections__service_connection__settings__clientId=<CHANGE_ME_agent_client_id>
connections__service_connection__settings__clientSecret=<CHANGE_ME_agent_client_secret>
connections__service_connection__settings__tenantId=<CHANGE_ME_tenant_id>

connectionsMap__0__serviceUrl=*
connectionsMap__0__connection=service_connection

agentic_type=agentic
agentic_altBlueprintConnectionName=service_connection
agentic_scopes=https://graph.microsoft.com/.default
agent_id=<CHANGE_ME_agent_client_id>
connections__service_connection__settings__scopes=5a807f24-c9de-44ee-a3a7-329e88a00ffc/.default
agentic_connectionName=AgenticAuthentication


# =============================================================================
# 7. A365 OBSERVABILITY (Agent 365 telemetry — safe to leave duplicated)
# =============================================================================
# agentId = the runtime Agent Identity (the app id of the agent instance, NOT the blueprint id). The
# exporter authenticates as this identity; the live id is read from each turn and this is only the fallback.
# Find it in the "[A365 Observability] App-only export token acquired for agent <id>" startup log line.
agent365Observability__agentId=<CHANGE_ME_agent_identity_app_id>
agent365Observability__agentName=EmployeeCareerCoachIdentity
agent365Observability__agentDescription=EmployeeCareerCoach
agent365Observability__tenantId=<CHANGE_ME_tenant_id>
# agentBlueprintId = the blueprint's app id (a365.generated.config.json -> agentBlueprintId).
agent365Observability__agentBlueprintId=<CHANGE_ME_blueprint_app_id>
agent365Observability__clientId=<CHANGE_ME_agent_client_id>
agent365Observability__clientSecret=<CHANGE_ME_agent_client_secret>


# =============================================================================
# 8. SETUP / SEED SCRIPTS (device-code auth, developer only)
# =============================================================================
# setup:sharepoint / seed:reference / mark:complete sign in with MSAL device-code.
# Defaults: a well-known public Microsoft Graph client + the 'common' tenant.
# Override only if your tenant blocks the default public client.
GRAPH_AUTH_CLIENT_ID=
GRAPH_AUTH_TENANT_ID=
# Test user for the helper scripts. mark:complete requires TEST_USER_AAD_ID; reset:milestones and
# backup:user use it when no user id is passed on the command line. Set your test user's AAD object id
# and display name.
TEST_USER_AAD_ID=
TEST_USER_NAME=
# Optional override for the seed CSV directory (defaults to ./SharePoint Data).
SP_SEED_CSV_DIR=
41 changes: 41 additions & 0 deletions scenarios/career-coach/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
# dependencies + build
node_modules/
dist/
*.tsbuildinfo

# TS compile artefacts inside src (only source .ts should be tracked)
src/**/*.js
src/**/*.d.ts
src/**/*.js.map

# env & secrets — never commit
.env
.env.local
.env.*.local
.mstoken-cache.json

# generated at first `a365` run — contains tenant/agent IDs
a365.config.json
a365.generated.config.json
.a365-workspace-detection.local.json

# runtime state + backups
.proactive-storage.json
.proactive-refs.json
.sp-subscription.json
.email-plans.json
.agent-identity.json
backups/

# dev logs
dev.log
*.log

# packaged Teams app
manifest/manifest.zip

# agent skills installed via `gh skill add microsoft/agent365-skills` — workspace-local
.agents/
.claude/
.github/copilot-instructions.md
.github/copilot-instructions.md.bak
Loading
Loading