Skip to content

Rad/csharp#117

Merged
RadeenXALNW merged 2 commits into
mainfrom
rad/csharp
Feb 3, 2026
Merged

Rad/csharp#117
RadeenXALNW merged 2 commits into
mainfrom
rad/csharp

Conversation

@RadeenXALNW
Copy link
Copy Markdown
Collaborator

@RadeenXALNW RadeenXALNW commented Feb 3, 2026

added for csharp/dotnet support for runagent for both streaming and non streaming. Tested with local invocation. Yet to be tested with cloud server.

Summary by CodeRabbit

Release Notes

  • New Features

    • C# SDK enabling local and remote RunAgent deployments
    • Non-streaming and streaming agent execution with real-time response support
    • Persistent memory for stateful agent interactions with user isolation
    • REST and WebSocket communication support
    • Configuration management via fluent builder pattern
  • Documentation

    • Comprehensive C# SDK guide with setup instructions
    • Multiple code examples demonstrating core workflows
    • Complete version changelog and release notes
    • NuGet publishing documentation

@coderabbitai
Copy link
Copy Markdown

coderabbitai Bot commented Feb 3, 2026

Caution

Review failed

The pull request is closed.

📝 Walkthrough

Walkthrough

A comprehensive C# SDK for RunAgent is introduced, featuring client libraries for REST and WebSocket communication, configuration management, structured error handling, example implementations, and complete documentation. Additionally, the main README is updated to document C# support, and a framework enum is extended to include Parlant.

Changes

Cohort / File(s) Summary
C# SDK Core Clients
runagent-csharp/src/Client/RestClient.cs, runagent-csharp/src/Client/SocketClient.cs, runagent-csharp/src/Client/RunAgentClient.cs
HTTP REST and WebSocket client implementations for RunAgent communication, with support for non-streaming and streaming execution, local/remote modes, persistent memory, and comprehensive error handling.
C# SDK Configuration & Types
runagent-csharp/src/Types/Config.cs, runagent-csharp/src/Utils/ConfigLoader.cs, runagent-csharp/src/Utils/Constants.cs
Configuration classes, type definitions for API responses and agent architecture, and utility methods for resolving configuration from parameters and environment variables.
C# SDK Error Handling
runagent-csharp/src/Errors/RunAgentError.cs
Structured exception hierarchy including AuthenticationError, PermissionError, ValidationError, ConnectionError, ServerError, and RunAgentExecutionError with formatted error reporting.
C# SDK Examples
runagent-csharp/examples/BasicExample.cs, runagent-csharp/examples/StreamingExample.cs, runagent-csharp/examples/LocalExample.cs, runagent-csharp/examples/PersistentMemoryExample.cs
Four example implementations demonstrating non-streaming execution, streaming responses, local agent deployment, and persistent memory usage with error handling.
C# SDK Project & Docs
runagent-csharp/RunAgent.csproj, runagent-csharp/.gitignore, runagent-csharp/LICENSE, runagent-csharp/README.md, runagent-csharp/CHANGELOG.md, runagent-csharp/PUBLISH.md
Project configuration targeting net8.0, build artifacts ignore rules, MIT license, comprehensive SDK documentation, version history with release notes, and NuGet publishing guide.
C# SDK Test Suite
test_scripts/csharp/test_agno/Program.cs, test_scripts/csharp/test_agno/README.md, test_scripts/csharp/test_agno/test_agno.csproj, test_scripts/csharp/test_agno/bin/..., test_scripts/csharp/test_agno/obj/...
Test application demonstrating Agno agent integration with non-streaming and streaming modes, along with MSBuild artifacts and NuGet dependency manifests.
Root Documentation Update
README.md
Enhanced root README with C# SDK entry in header table, NuGet badge, expanded SDK metrics table, and C# code examples across multiple usage scenarios.
Python Framework Support
runagent/utils/enums/framework.py
Added PARLANT framework enum member and included it in pythonic frameworks cache.

Sequence Diagram(s)

sequenceDiagram
    participant Client as Client Code
    participant RAC as RunAgentClient
    participant RC as RestClient
    participant API as RunAgent API
    
    Client->>RAC: CreateAsync(config)
    RAC->>RC: GetAgentArchitecture()
    RC->>API: GET /agents/{id}/architecture
    API-->>RC: AgentArchitecture
    RC-->>RAC: AgentArchitecture
    RAC->>RAC: InitializeAsync() + ValidateEntrypoint()
    RAC-->>Client: RunAgentClient
    
    Client->>RAC: RunAsync(kwargs)
    RAC->>RAC: ValidateNonStreamEntrypoint()
    RAC->>RC: RunAgent(entrypoint, args, kwargs, ...)
    RC->>API: POST /agents/{id}/run
    API-->>RC: { success, data }
    RC->>RC: ParseRunResponse()
    RC-->>RAC: object result
    RAC-->>Client: result
    
    Client->>RAC: Dispose()
    RAC->>RC: Dispose()
    RC-->>Client: cleaned up
Loading
sequenceDiagram
    participant Client as Client Code
    participant RAC as RunAgentClient
    participant SC as SocketClient
    participant WS as WebSocket
    
    Client->>RAC: CreateAsync(config)
    RAC-->>Client: RunAgentClient
    
    Client->>RAC: RunStreamAsync(kwargs)
    RAC->>RAC: ValidateStreamEntrypoint()
    RAC->>SC: RunStream(entrypoint, args, kwargs, ...)
    SC->>WS: Connect WebSocket
    WS-->>SC: Connected
    SC->>WS: Send { entrypoint_tag, input_args, ... }
    
    loop Receive Messages
        WS-->>SC: Message (data/status/error)
        SC->>SC: ParseWebSocketMessage()
        alt type == "data"
            SC-->>Client: content (yielded)
        else type == "error"
            SC->>SC: Throw RunAgentExecutionError
        else type == "status"
            SC->>SC: Check IsStreamCompleted()
        end
    end
    
    SC->>WS: Close Connection
    SC-->>Client: stream ends
Loading

Estimated code review effort

🎯 4 (Complex) | ⏱️ ~50 minutes

Possibly related PRs

  • #107: Adds matching persistent memory and user_id field propagation through C# SDK client implementations (RestClient, SocketClient, RunAgentClient).
  • #85: Implements compatible agent run response parsing logic supporting envelope/data structures and string-encoded payloads across REST and WebSocket protocols.
  • #73: Defines the underlying REST and WebSocket protocol specifications (entrypoint_tag, input_args/input_kwargs, message types) that the C# client implementations directly consume.

Suggested reviewers

  • sawradip

Poem

🐰 A rabbit hops through codebase trees,
With C# clients tuned with ease,
REST and sockets dance in sync,
Memory persists, not lost in a blink,
RunAgent now speaks the .NET way! 🌟

✨ Finishing touches
  • 📝 Generate docstrings
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch rad/csharp

Important

Action Needed: IP Allowlist Update

If your organization protects your Git platform with IP whitelisting, please add the new CodeRabbit IP address to your allowlist:

  • 136.113.208.247/32 (new)
  • 34.170.211.100/32
  • 35.222.179.152/32

Reviews will stop working after February 8, 2026 if the new IP is not added to your allowlist.


Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@RadeenXALNW RadeenXALNW merged commit 03e2edd into main Feb 3, 2026
1 of 2 checks passed
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.

1 participant