// Create a client with your Cursor API key.usingvarclient=newCursorAgentsClient(apiKey);varrepositoryUrl=Environment.GetEnvironmentVariable("CURSORAGENTS_TEST_REPO")is{Length:>0}repoValue?repoValue:thrownewAssertInconclusiveException("CURSORAGENTS_TEST_REPO environment variable is not found.");// Launch a coding agent with a prompt, source repository, and target branch settings.varresponse=awaitclient.CreateAgentAsync(prompt:newCreateAgentRequestPrompt{Text="Add a CONTRIBUTING.md file with guidelines for submitting pull requests",},repos:[ new RepoConfig { Url = repositoryUrl, StartingRef = "main", }, ],branchName:"cursor/add-contributing",autoCreatePR:true);// The response contains the agent ID, name, and initial status.Console.WriteLine($"Agent created: {response.Agent.Summary?.Id} ({response.Agent.Summary?.Name})");Console.WriteLine($"Run status: {response.Run.Status}");