Skip to content
Open
Show file tree
Hide file tree
Changes from 1 commit
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
79 changes: 79 additions & 0 deletions python/langchain/sample-agent/.env.template
Original file line number Diff line number Diff line change
@@ -0,0 +1,79 @@
# =============================================================================
# LangChain 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.
# =============================================================================

# -----------------------------------------------------------------------------
# Azure OpenAI Configuration (preferred)
# -----------------------------------------------------------------------------
AZURE_OPENAI_API_KEY=<<YOUR_AZURE_OPENAI_API_KEY>>
AZURE_OPENAI_ENDPOINT=<<YOUR_AZURE_OPENAI_ENDPOINT>>
AZURE_OPENAI_DEPLOYMENT=<<YOUR_AZURE_OPENAI_DEPLOYMENT>>
AZURE_OPENAI_API_VERSION=2024-12-01-preview

# -----------------------------------------------------------------------------
# OpenAI Configuration (alternative — used if Azure OpenAI is not configured)
# -----------------------------------------------------------------------------
# OPENAI_API_KEY=<<YOUR_OPENAI_API_KEY>>
# OPENAI_MODEL=gpt-4o

# -----------------------------------------------------------------------------
# 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

# Auth handler name — set to "AGENTIC" for production (enables OBO token flow for MCP tools)
# Leave empty for Agents Playground / local dev without auth.
AUTH_HANDLER_NAME=AGENTIC

# -----------------------------------------------------------------------------
# Bearer Token (optional — local dev only)
# -----------------------------------------------------------------------------
# For local development without an auth handler, paste a fresh token here to
# enable MCP tool access. Get one with: a365 develop get-token -o raw
# The token expires in ~90 minutes; the agent detects expiry automatically.
BEARER_TOKEN=<paste token here>

# -----------------------------------------------------------------------------
# Observability (optional)
# -----------------------------------------------------------------------------
ENABLE_OBSERVABILITY=true
ENABLE_A365_OBSERVABILITY_EXPORTER=false
OBSERVABILITY_SERVICE_NAME=LangChainSampleAgent
OBSERVABILITY_SERVICE_NAMESPACE=LangChainTesting

# -----------------------------------------------------------------------------
# Logging (optional)
# -----------------------------------------------------------------------------
LOG_LEVEL=INFO
21 changes: 21 additions & 0 deletions python/langchain/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