-
Notifications
You must be signed in to change notification settings - Fork 50
Add MCP tooling, observability support for CrewAI Python #201
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from 1 commit
Commits
Show all changes
4 commits
Select commit
Hold shift + click to select a range
2f392d8
feat(crewai): Add MCP tooling, observability, and notifications support
8cc9394
Pushed updates to resolve comments by Nikhil
5a8e261
Merge branch 'main' into JoanBency/CrewAIPython-AddMCPTooling
JoanBency 98ead7e
Address Copilot PR review comments for CrewAI MCP tooling
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,54 +1,107 @@ | ||
| # Demo environment for CrewAI hosted agent | ||
| # ============================================================================= | ||
| # CrewAI Agent Sample - Environment Configuration | ||
| # ============================================================================= | ||
| # Copy this file to .env and fill in your values. | ||
| # Lines starting with # are comments. Remove # to enable a variable. | ||
| # ============================================================================= | ||
|
|
||
| # ----------------------------------------------------------------------------- | ||
| # OPENAI / AZURE OPENAI CONFIGURATION | ||
| # ----------------------------------------------------------------------------- | ||
| # Choose ONE of the following configurations: | ||
|
|
||
| # Option A: Standard OpenAI | ||
| # Get your API key from https://platform.openai.com/api-keys | ||
| OPENAI_API_KEY= | ||
|
|
||
| # MCP Server Configuration | ||
| MCP_SERVER_PORT=8000 | ||
| MCP_SERVER_HOST=localhost | ||
| MCP_DEVELOPMENT_BASE_URL= | ||
| # Option B: Azure OpenAI (recommended for enterprise) | ||
| # Get these values from Azure Portal > Your OpenAI Resource > Keys and Endpoint | ||
| AZURE_API_KEY= | ||
| AZURE_API_BASE= | ||
| AZURE_API_VERSION=2025-01-01-preview | ||
|
|
||
| # Model Configuration | ||
| # For Azure OpenAI: Use "azure/<deployment-name>" format (e.g., azure/gpt-4.1) | ||
| # For OpenAI: Use model name directly (e.g., gpt-4o-mini) | ||
| OPENAI_MODEL_NAME=azure/gpt-4.1 | ||
|
|
||
| # ----------------------------------------------------------------------------- | ||
| # MCP (MODEL CONTEXT PROTOCOL) AUTHENTICATION | ||
| # ----------------------------------------------------------------------------- | ||
| # These settings enable MCP tools like Mail, Calendar, and Copilot | ||
|
|
||
| # Bearer Token for MCP Server Authentication | ||
| # Generate with: a365 develop get-token -o raw | ||
| # This token expires - regenerate when you see MCP connection errors | ||
| BEARER_TOKEN= | ||
|
|
||
| # Logging | ||
| LOG_LEVEL=INFO | ||
| # Agentic Authentication Mode | ||
| # Set to "false" for local development with bearer token | ||
| # Set to "true" for production with full app registration | ||
| USE_AGENTIC_AUTH=false | ||
|
|
||
| # Observability Configuration | ||
| OBSERVABILITY_SERVICE_NAME=crewai-agent-sample | ||
| # Agent Application ID (used for MCP tool discovery) | ||
| # This identifies your agent when connecting to MCP servers | ||
| AGENTIC_APP_ID=crewai-agent | ||
|
|
||
| # ----------------------------------------------------------------------------- | ||
| # TAVILY API - WEATHER SEARCH TOOL | ||
| # ----------------------------------------------------------------------------- | ||
| # Required for the WeatherTool to search current weather conditions | ||
| # Get your free API key from https://tavily.com | ||
| TAVILY_API_KEY= | ||
|
|
||
| # ----------------------------------------------------------------------------- | ||
| # OBSERVABILITY CONFIGURATION | ||
| # ----------------------------------------------------------------------------- | ||
| # These settings configure Agent 365 observability tracing | ||
|
|
||
| # Service identifiers for telemetry | ||
| OBSERVABILITY_SERVICE_NAME=crewai-agent-sample | ||
| OBSERVABILITY_SERVICE_NAMESPACE=agent365-samples | ||
|
|
||
| # Enable/disable observability features | ||
| ENABLE_OBSERVABILITY=true | ||
|
|
||
| BEARER_TOKEN= | ||
| # Enable Agent 365 cloud exporter (requires valid token) | ||
| # Set to "true" to send traces to Agent 365 observability backend | ||
| ENABLE_A365_OBSERVABILITY_EXPORTER=false | ||
|
|
||
| OPENAI_MODEL=gpt-4o-mini | ||
| # Python environment indicator | ||
| PYTHON_ENVIRONMENT=development | ||
|
|
||
| USE_AGENTIC_AUTH=false | ||
| # ----------------------------------------------------------------------------- | ||
| # SERVER CONFIGURATION | ||
| # ----------------------------------------------------------------------------- | ||
| # The port the agent server listens on | ||
| # If busy, the server will automatically try the next available port | ||
| PORT=3978 | ||
|
|
||
| AGENTIC_APP_ID= | ||
| # Logging verbosity: DEBUG, INFO, WARNING, ERROR | ||
| LOG_LEVEL=INFO | ||
|
|
||
| # Agent observability attributes (optional but recommended) | ||
| # These populate the gen_ai.agent.* attributes in traces | ||
| AGENT_AUID=your_agent_auid | ||
| # ----------------------------------------------------------------------------- | ||
| # MCP SERVER CONFIGURATION (ADVANCED) | ||
| # ----------------------------------------------------------------------------- | ||
| # These are typically not needed for standard usage | ||
|
|
||
| # Agent ID (required for agentic authentication) | ||
| AGENT_ID=your-agent-id | ||
| # Local MCP server settings (for custom MCP server development) | ||
| MCP_SERVER_PORT=8000 | ||
| MCP_SERVER_HOST=localhost | ||
| MCP_DEVELOPMENT_BASE_URL= | ||
|
|
||
| # Agent 365 Agentic Authentication Configuration | ||
| # Auth handler name (optional, defaults to "AGENTIC") | ||
| # The name of the authentication handler to use for token exchange | ||
| AGENT_AUTH_HANDLER_NAME=AGENTIC | ||
| # ----------------------------------------------------------------------------- | ||
| # AGENT 365 APP REGISTRATION (PRODUCTION) | ||
| # ----------------------------------------------------------------------------- | ||
| # Required for production deployments with full authentication | ||
| # Get these from Azure Portal > App Registrations > Your App | ||
|
|
||
| # Azure AD App Registration | ||
| CONNECTIONS__SERVICE_CONNECTION__SETTINGS__CLIENTID= | ||
| CONNECTIONS__SERVICE_CONNECTION__SETTINGS__CLIENTSECRET= | ||
| CONNECTIONS__SERVICE_CONNECTION__SETTINGS__TENANTID= | ||
| CONNECTIONS__SERVICE_CONNECTION__SETTINGS__SCOPES=https://graph.microsoft.com/.default | ||
|
|
||
| # Service URL mapping | ||
| CONNECTIONSMAP__0__SERVICEURL=* | ||
| CONNECTIONSMAP__0__CONNECTION=SERVICE_CONNECTION | ||
|
|
||
| # Optional: Server Configuration | ||
| PORT=3978 | ||
|
|
||
| # Required for observability SDK | ||
| ENABLE_OBSERVABILITY=true | ||
|
|
||
| ENABLE_A365_OBSERVABILITY_EXPORTER=false | ||
|
|
||
| PYTHON_ENVIRONMENT=development | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.