{"id":30144110,"url":"https://github.com/conductor-oss/csharp-sdk","last_synced_at":"2026-07-14T22:00:49.124Z","repository":{"id":40244644,"uuid":"470253609","full_name":"conductor-oss/csharp-sdk","owner":"conductor-oss","description":"Conductor OSS SDK for C#/.NET","archived":false,"fork":false,"pushed_at":"2026-07-14T06:34:30.000Z","size":2928,"stargazers_count":53,"open_issues_count":16,"forks_count":22,"subscribers_count":6,"default_branch":"main","last_synced_at":"2026-07-14T08:22:40.858Z","etag":null,"topics":["conductor","csharp","sdk","worker","workflow"],"latest_commit_sha":null,"homepage":"","language":"C#","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/conductor-oss.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2022-03-15T16:56:51.000Z","updated_at":"2026-07-09T17:20:22.000Z","dependencies_parsed_at":"2023-12-14T06:27:03.308Z","dependency_job_id":"f30a8438-09f2-45f4-960f-3bba2cc6ce6f","html_url":"https://github.com/conductor-oss/csharp-sdk","commit_stats":null,"previous_names":["conductor-sdk/conductor-csharp"],"tags_count":32,"template":false,"template_full_name":null,"purl":"pkg:github/conductor-oss/csharp-sdk","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/conductor-oss%2Fcsharp-sdk","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/conductor-oss%2Fcsharp-sdk/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/conductor-oss%2Fcsharp-sdk/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/conductor-oss%2Fcsharp-sdk/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/conductor-oss","download_url":"https://codeload.github.com/conductor-oss/csharp-sdk/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/conductor-oss%2Fcsharp-sdk/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":35480624,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-26T15:22:16.424Z","status":"online","status_checked_at":"2026-07-14T02:00:06.603Z","response_time":114,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["conductor","csharp","sdk","worker","workflow"],"created_at":"2025-08-11T07:37:48.554Z","updated_at":"2026-07-14T22:00:49.104Z","avatar_url":"https://github.com/conductor-oss.png","language":"C#","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Conductor OSS C# SDK\n\n[![CI](https://github.com/conductor-oss/csharp-sdk/actions/workflows/pull_request.yml/badge.svg)](https://github.com/conductor-oss/csharp-sdk/actions)\n\nThe conductor-csharp repository provides the client SDKs to build task workers in C#.\n\nBuilding the task workers in C# mainly consists of the following steps:\n\n1. Setup `conductor-csharp` package\n1. Create and run task workers\n1. Create workflows using code\n1. API Documentation\n\n## ⭐ Conductor OSS\nShow support for the Conductor OSS.  Please help spread the awareness by starring Conductor repo.\n\n[![GitHub stars](https://img.shields.io/github/stars/conductor-oss/conductor.svg?style=social\u0026label=Star\u0026maxAge=)](https://GitHub.com/conductor-oss/conductor/)\n\n## Start Conductor Server\n\nIf you don't already have a Conductor server running, start one with Docker:\n\n```shell\ndocker run --init -p 8080:8080 conductoross/conductor:latest\n```\n\nThe UI will be available at `http://localhost:8080` and the API at `http://localhost:8080/api`.\n\n## Setup Conductor C# Package\n\n```shell\ndotnet add package conductor-csharp\n```\n\n## Hello World\n\nThis quickstart shows the full flow: define a worker, define a workflow, register it, run it.\n\n**Step 1: Create a new console project**\n\n```shell\ndotnet new console -n conductor-hello\ncd conductor-hello\ndotnet add package conductor-csharp\n```\n\n**Step 2: Replace `Program.cs` with the following**\n\n```csharp\nusing Conductor.Client;\nusing Conductor.Client.Extensions;\nusing Conductor.Client.Worker;\nusing Conductor.Definition;\nusing Conductor.Definition.TaskType;\nusing Conductor.Executor;\n\n// Configure the SDK — reads CONDUCTOR_SERVER_URL from the environment,\n// or falls back to a local server.\nvar configuration = new Configuration\n{\n    BasePath = Environment.GetEnvironmentVariable(\"CONDUCTOR_SERVER_URL\")\n               ?? \"http://localhost:8080/api\"\n};\n\n// Define the workflow: one SIMPLE task called \"greet\".\nvar workflow = new ConductorWorkflow()\n    .WithName(\"greetings\")\n    .WithVersion(1);\n\nvar greetTask = new SimpleTask(\"greet\", \"greet_ref\")\n    .WithInput(\"name\", workflow.Input(\"name\"));\nworkflow.WithTask(greetTask);\n\n// Register the workflow definition on the server.\nvar executor = new WorkflowExecutor(configuration);\nexecutor.RegisterWorkflow(workflow, overwrite: true);\n\n// Start the worker host — it discovers GreetWorker automatically.\nvar host = WorkflowTaskHost.CreateWorkerHost(\n    Microsoft.Extensions.Logging.LogLevel.Information,\n    new GreetWorker());\nawait host.StartAsync();\n\n// Run the workflow and print the execution ID.\nvar workflowId = executor.StartWorkflow(new StartWorkflowRequest\n{\n    Name = \"greetings\",\n    Version = 1,\n    Input = new Dictionary\u003cstring, object\u003e { [\"name\"] = \"Conductor\" }\n});\nConsole.WriteLine($\"Started workflow: {workflowId}\");\nConsole.WriteLine($\"View execution: http://localhost:8080/execution/{workflowId}\");\n\n// Keep the worker running until Ctrl-C.\nawait host.WaitForShutdownAsync();\n```\n\n**Step 3: Add the worker class — create `GreetWorker.cs`**\n\n```csharp\nusing Conductor.Client.Extensions;\nusing Conductor.Client.Interfaces;\nusing Conductor.Client.Models;\nusing Conductor.Client.Worker;\nusing Task = Conductor.Client.Models.Task;\n\npublic class GreetWorker : IWorkflowTask\n{\n    public string TaskType =\u003e \"greet\";\n    public WorkflowTaskExecutorConfiguration WorkerSettings { get; } = new();\n\n    public TaskResult Execute(Task task)\n    {\n        var name = task.InputData.GetValueOrDefault(\"name\")?.ToString() ?? \"World\";\n        var result = task.Completed();\n        result.OutputData = new Dictionary\u003cstring, object\u003e\n        {\n            [\"greeting\"] = $\"Hello, {name}!\"\n        };\n        return result;\n    }\n}\n```\n\n**Step 4: Run it**\n\n```shell\ndotnet run\n```\n\nExpected output:\n```\nStarted workflow: \u003cworkflow-id\u003e\nView execution: http://localhost:8080/execution/\u003cworkflow-id\u003e\n```\n\nOpen the UI link to see the completed execution and its output.\n\n## Configurations\n\n### Authentication Settings (Optional)\nConfigure the authentication settings if your Conductor server requires authentication.\n* keyId: Key for authentication.\n* keySecret: Secret for the key.\n\n```csharp\nauthenticationSettings: new OrkesAuthenticationSettings(\n    KeyId: \"key\",\n    KeySecret: \"secret\"\n)\n```\n\n### Access Control Setup\nSee [Access Control](https://orkes.io/content/docs/getting-started/concepts/access-control) for more details on role-based access control with Conductor and generating API keys for your environment.\n\n### Configure API Client\n```csharp\nusing Conductor.Api;\nusing Conductor.Client;\nusing Conductor.Client.Authentication;\n\nvar configuration = new Configuration() {\n    BasePath = basePath,\n    AuthenticationSettings = new OrkesAuthenticationSettings(\"keyId\", \"keySecret\")\n};\n\nvar workflowClient = configuration.GetClient\u003cWorkflowResourceApi\u003e();\n\nworkflowClient.StartWorkflow(\n    name: \"test-sdk-csharp-workflow\",\n    body: new Dictionary\u003cstring, object\u003e(),\n    version: 1\n)\n```\n\n### Next: [Create and run task workers](https://github.com/conductor-oss/csharp-sdk/blob/main/docs/readme/workers.md)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fconductor-oss%2Fcsharp-sdk","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fconductor-oss%2Fcsharp-sdk","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fconductor-oss%2Fcsharp-sdk/lists"}