Add Devin (Cognition AI) .NET Sample Agent#298
Open
Yogeshp-MSFT wants to merge 2 commits into
Open
Conversation
Contributor
There was a problem hiding this comment.
Pull request overview
Adds a new .NET 8 sample agent that integrates with Cognition AI’s Devin API using the Microsoft Agent 365 SDK, including basic hosting setup, configuration templates, and an OpenTelemetry-based telemetry layer.
Changes:
- Added a Devin REST API typed client plus a new
MyAgentimplementation that forwards user messages to Devin and returns results. - Introduced OpenTelemetry configuration and custom metrics/tracing helpers for agent and HTTP operations.
- Added sample documentation and local launch/config templates for “production” vs “Playground” execution.
Reviewed changes
Copilot reviewed 13 out of 13 changed files in this pull request and generated 9 comments.
Show a summary per file
| File | Description |
|---|---|
| dotnet/devin/sample-agent/telemetry/AgentOTELExtensions.cs | Configures OpenTelemetry resource, metrics, and tracing instrumentation for the sample. |
| dotnet/devin/sample-agent/telemetry/AgentMetrics.cs | Defines custom counters/histograms and Activity helpers intended to wrap agent/HTTP operations. |
| dotnet/devin/sample-agent/telemetry/A365OtelWrapper.cs | Adds an A365 observability wrapper intended to register tenant/agent baggage and tokens. |
| dotnet/devin/sample-agent/README.md | Documents sample purpose, configuration, and usage guidance. |
| dotnet/devin/sample-agent/Properties/launchSettings.json | Adds launch profiles for normal vs Playground runs. |
| dotnet/devin/sample-agent/Program.cs | Wires DI, authentication, telemetry, and maps the /api/messages endpoint. |
| dotnet/devin/sample-agent/DevinSampleAgent.csproj | Defines the web project and NuGet dependencies for A365 + telemetry. |
| dotnet/devin/sample-agent/Client/DevinClient.cs | Implements Devin session creation, follow-up messaging, and polling logic. |
| dotnet/devin/sample-agent/AspNetExtensions.cs | Adds JWT token validation configuration helpers for ABS/SMBA-style scenarios. |
| dotnet/devin/sample-agent/appsettings.Playground.json | Provides Playground-oriented config template (incl. Devin settings). |
| dotnet/devin/sample-agent/appsettings.json | Provides main config template (AgentApplication, Devin, connections, observability). |
| dotnet/devin/sample-agent/Agent/MyAgent.cs | Implements message + install/uninstall handling and typing indicators. |
| dotnet/devin/sample-agent/.gitignore | Ignores local secrets/overrides and build outputs for the sample. |
Author
|
HI @ajmfehr can you review and approve this pr? |
…, and configuration
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
15166d3 to
8150429
Compare
Author
|
Hi @microsoft/agent365-approvers @ajmfehr , could you review this PR for merging? |
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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Summary
Adds a new .NET sample demonstrating how to integrate Devin (by Cognition AI) with the Microsoft Agent 365 SDK. The agent forwards user messages to Devin's autonomous coding API and returns responses via Teams/email notifications.
What this sample demonstrates
InstallationUpdateactivities with welcome/farewell messagesFiles added
Agent/MyAgent.csClient/DevinClient.cstelemetry/Prerequisites
a365 setup blueprint)