Reference: IAgentClient

July 28, 2026 · View on GitHub

interface IAgentClient : IDisposable, IAsyncDisposable, implemented by sealed class OrkesAgentClient.

Obtain one via OrkesApiClient.GetAgentClient() or Configuration.GetAgentClient() — both share that Configuration's token cache, so there is no separate token client — or use the runtime's own instance via runtime.Client.

Control-plane convenience

  • RunAsync(Agent, ...)
  • StartAsync(Agent, ...)
  • DeployAsync(params Agent[])
  • ScheduleAsync(Agent, IEnumerable<Schedule>, ct)
  • Schedules (property)

Run is control-plane only — no local tool workers are registered or polled. Agents with local [Tool] methods must run through AgentRuntime.

Lower level

MemberNotes
StartAsync(JsonObject)Raw start.
DeployAsync(JsonObject)Raw deploy.
CompileAsync(JsonObject)Compile without registering.
GetStatusAsyncExecution status.
GetExecutionAsyncSummary view; omits task inputs.
GetWorkflowAsyncRaw workflow, including task inputs.
ListExecutionsAsync
RespondAsyncHITL response.
SignalAsyncDelivers {"message": ...} to the execution.
PauseAgentAsync / UnpauseAgentAsync
StreamEventsAsyncSSE event stream.
StartWorkflowByNameAsyncPre-deployed agents.
SendWorkflowMessageAsyncWorkflow Message Queue.
StopAgentAsyncGraceful stop.
CancelAgentAsyncImmediate termination.

There is no client-side credential resolution method. Credential delivery is entirely server-driven per execution via the runtimeMetadata wire contract — see ../concepts/tools.md and ../../security.md.

Standalone use

var configuration = new Configuration { BasePath = "http://localhost:8080/api" };
using var standalone = configuration.GetAgentClient();
var handle = await standalone.StartAsync(agent, "Hello");

See ../concepts/deploy-serve-run.md.