Rad/csharp#117
Conversation
|
Caution Review failedThe pull request is closed. 📝 WalkthroughWalkthroughA 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
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
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
Estimated code review effort🎯 4 (Complex) | ⏱️ ~50 minutes Possibly related PRs
Suggested reviewers
Poem
✨ Finishing touches
🧪 Generate unit tests (beta)
Important Action Needed: IP Allowlist UpdateIf your organization protects your Git platform with IP whitelisting, please add the new CodeRabbit IP address to your allowlist:
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. Comment |
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
Documentation