Skip to content

Introducing .NET SDK Integration for Agent Protocol #119

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

Open
wants to merge 6 commits into
base: main
Choose a base branch
from

Conversation

jeff-nasseri
Copy link

@jeff-nasseri jeff-nasseri commented Apr 2, 2025

Related Issue

Fixes #123 - Introducing .NET SDK integration

Overview

This pull request delivers the initial implementation of the Agent Protocol .NET SDK ecosystem. The implementation includes a generator tool for creating strongly-typed C# clients from OpenAPI specifications, the generated SDK itself, and comprehensive sample applications demonstrating usage patterns.

Key Components

1. SDK Generator

  • Command-line application built with .NET 8
  • Uses NSwag to process OpenAPI JSON specifications
  • Supports customizable output paths and namespaces
  • Implements clean architecture with dependency injection

2. Generated C# SDK

  • Complete implementation of the Agent Protocol API
  • Strongly-typed request and response models
  • Proper exception handling and documentation
  • Asynchronous Task-based operations

3. Sample Application

  • Interactive console application showcasing SDK usage
  • Implements service layer patterns and dependency injection
  • Demonstrates all core API operations including tasks, steps, and artifacts
  • Provides clear visualizations of API responses

4. Development Infrastructure

  • Comprehensive test suite for the generator and SDK
  • Solution configuration for consistent developer experience
  • Coding standards enforcement via .editorconfig

Future Work

As noted in the commits, we plan to automate the SDK generation process through GitHub Actions workflows to ensure the SDK remains synchronized with the latest OpenAPI specification. This will be part of a full CI/CD pipeline with automated versioning and package publishing.

Testing Done

  • Unit tests cover the generator functionality
  • Integration tests verify end-to-end generation
  • Manual testing of the sample application against a test API

Documentation

Each component includes detailed README documentation explaining usage patterns and architecture decisions. The sample application serves as a working reference implementation for developers integrating the SDK.

Migration Considerations

This is an initial implementation with no migration concerns for existing users.

jeff nasseri added 6 commits April 3, 2025 01:26
This commit establishes a comprehensive CLI tool built with .NET 8 that generates C# client SDK for the Agent Protocol specification. The implementation leverages NSwag to process OpenAPI JSON input files and produce strongly-typed client libraries.

Key components include:
- Command-line interface with input/output parameter support
- Service-oriented architecture with dependency injection
- Structured logging implementation

The tool can be invoked using `dotnet run -- -i <path-to-openapi-json> -o <output-directory>` to generate a ready-to-use C# client library.

P.S. The author of this commit include the whole initial changes related to the `Generator` project and README.md in the current commit, check the readme in order to understanding the usage. Other files would be included in the up coming changes, like github actions, unit tests and etc
By implementing these standards through .editorconfig, we ensure that regardless of which IDE or editor developers use (Visual Studio, VS Code, Rider, etc.), the codebase remains consistent. This improves readability, reduces merge conflicts, and simplifies contributions from the community.
…ation

This commit establishes a robust testing framework to validate the integrity and functionality of the Agent Protocol SDK Generator. The test suite encompasses multiple levels of testing including unit tests for core components and integration tests for the end-to-end generation process.

Key aspects of the testing implementation:
- Structured test organization following the AAA (Arrange-Act-Assert) pattern
- Tests for the dependency injection container to verify proper service registration and resolution
- Validation tests for command-line argument parsing and processing

The test project is configured to run as part of the build pipeline, ensuring that all changes maintain compatibility with the core functionality. This testing foundation will facilitate future enhancements while safeguarding against regressions as the codebase evolves.
This commit introduces the foundational C# SDK for the Agent Protocol, generated using our custom OpenAPI generator tool. This independent project provides a strongly-typed client that enables seamless interaction with Agent Protocol-compatible APIs within .NET applications.

P.S. This represents an early version of the SDK. Future improvements will include automating the generation process through GitHub Actions workflows to ensure the SDK remains synchronized with the OpenAPI specification as it evolves. This automation will encompass full CI/CD pipeline integration with automated versioning and package publishing to NuGet registries.
…Protocol

This commit introduces a comprehensive sample application that showcases the practical implementation of the Agent Protocol C# SDK. The project serves as both documentation and a working reference implementation for developers integrating the SDK into their own .NET applications.

The accompanying README provides detailed explanations of the project structure, architecture decisions, and step-by-step instructions for running the examples. This sample serves as the foundation for developers to understand the SDK's capabilities and adapt the patterns to their specific use cases.
…iguration

This commit establishes the foundational solution architecture for the Agent Protocol SDK ecosystem with properly configured solution files (.sln) and JetBrains Rider/Visual Studio settings (.dotsettings). The structured solution organization enables developers to work with all related projects simultaneously within a unified development environment.

These configuration files ensure that regardless of which IDE developers use (Visual Studio, Rider, etc.), they will have a consistent experience with the properly structured projects and enforced coding standards across the entire codebase.
@jeff-nasseri
Copy link
Author

jeff-nasseri commented Apr 2, 2025

Hey Team,

I just set up a pull request to include a .NET SDK for AgentProtocol. I would be happy to hear your feedback, so feel free to leave your comments.

I made 6 commits in total. If you prefer to go with atomic PRs or atomic commits instead, please let me know. My goal with this ticket is to make the .NET ecosystem part of the agent protocol.

I just to set up another pull request (PR-120) to include an automation pipeline that will pack and push the NuGet package to the registry. If you have any tips, feel free to share them here.

@Div99
@jzanecook
@wilsonianb
@Kamyab7

@jeff-nasseri jeff-nasseri changed the title Initial Implementation with Generator, Sample Client, and Testing Infrastructure Initial Implementation with .NET SDK Apr 2, 2025
@jeff-nasseri jeff-nasseri changed the title Initial Implementation with .NET SDK Initial Implementation with Agent Protocol .NET SDK Apr 3, 2025
@jeff-nasseri jeff-nasseri changed the title Initial Implementation with Agent Protocol .NET SDK Introducing .NET SDK Integration for Agent Protocol Apr 3, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Introducing .NET SDK integration
1 participant