// 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",},source:newCreateAgentRequestSource{Repository=repositoryUrl,Ref="main",},target:newCreateAgentRequestTarget{AutoCreatePr=true,BranchName="cursor/add-contributing",});// The response contains the agent ID, name, and initial status.Console.WriteLine($"Agent created: {response.Id} ({response.Name})");Console.WriteLine($"Status: {response.Status}");