Interface RunServiceAsync
-
- All Implemented Interfaces:
public interface RunServiceAsyncCreate, manage, and execute AI agents with tool access, sandbox environments, and async run workflows
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description public interfaceRunServiceAsync.WithRawResponseA view of RunServiceAsync that provides access to raw HTTP responses for each method.
-
Method Summary
-
-
Method Detail
-
withRawResponse
abstract RunServiceAsync.WithRawResponse withRawResponse()
Returns a view of this service that provides access to raw HTTP responses for each method.
-
withOptions
abstract RunServiceAsync withOptions(Consumer<ClientOptions.Builder> modifier)
Returns a view of this service with the given option modifications applied.
The original service is not modified.
-
create
CompletableFuture<RunCreateResponse> create(RunCreateParams params)
Creates a run in queued state. Call POST /agent/v1/run/:id/exec to start execution.
-
create
abstract CompletableFuture<RunCreateResponse> create(RunCreateParams params, RequestOptions requestOptions)
-
list
CompletableFuture<RunListResponse> list()
Lists agent runs for the authenticated organization. Supports filtering by agent, status, and cursor-based pagination.
-
list
abstract CompletableFuture<RunListResponse> list(RunListParams params, RequestOptions requestOptions)
-
list
CompletableFuture<RunListResponse> list(RunListParams params)
-
list
CompletableFuture<RunListResponse> list(RequestOptions requestOptions)
-
cancel
CompletableFuture<RunCancelResponse> cancel(String id)
Cancels a running or queued run. Idempotent — cancelling a finished run returns its current status.
-
cancel
CompletableFuture<RunCancelResponse> cancel(String id, RunCancelParams params, RequestOptions requestOptions)
-
cancel
CompletableFuture<RunCancelResponse> cancel(String id, RunCancelParams params)
-
cancel
abstract CompletableFuture<RunCancelResponse> cancel(RunCancelParams params, RequestOptions requestOptions)
-
cancel
CompletableFuture<RunCancelResponse> cancel(RunCancelParams params)
-
cancel
CompletableFuture<RunCancelResponse> cancel(String id, RequestOptions requestOptions)
-
eventsStreaming
AsyncStreamResponse<String> eventsStreaming(String id)
Streams real-time run events over SSE. Supports replay using Last-Event-ID.
-
eventsStreaming
AsyncStreamResponse<String> eventsStreaming(String id, RunEventsParams params, RequestOptions requestOptions)
-
eventsStreaming
AsyncStreamResponse<String> eventsStreaming(String id, RunEventsParams params)
-
eventsStreaming
abstract AsyncStreamResponse<String> eventsStreaming(RunEventsParams params, RequestOptions requestOptions)
-
eventsStreaming
AsyncStreamResponse<String> eventsStreaming(RunEventsParams params)
-
eventsStreaming
AsyncStreamResponse<String> eventsStreaming(String id, RequestOptions requestOptions)
-
exec
CompletableFuture<RunExecResponse> exec(String id)
Starts execution of a queued run. The agent runs in a durable workflow — poll /run/:id/status for progress.
-
exec
CompletableFuture<RunExecResponse> exec(String id, RunExecParams params, RequestOptions requestOptions)
-
exec
CompletableFuture<RunExecResponse> exec(String id, RunExecParams params)
-
exec
abstract CompletableFuture<RunExecResponse> exec(RunExecParams params, RequestOptions requestOptions)
-
exec
CompletableFuture<RunExecResponse> exec(RunExecParams params)
-
exec
CompletableFuture<RunExecResponse> exec(String id, RequestOptions requestOptions)
-
getDetails
CompletableFuture<RunGetDetailsResponse> getDetails(String id)
Full audit trail for a run including output, steps (tool calls, text), and token usage.
-
getDetails
CompletableFuture<RunGetDetailsResponse> getDetails(String id, RunGetDetailsParams params, RequestOptions requestOptions)
-
getDetails
CompletableFuture<RunGetDetailsResponse> getDetails(String id, RunGetDetailsParams params)
-
getDetails
abstract CompletableFuture<RunGetDetailsResponse> getDetails(RunGetDetailsParams params, RequestOptions requestOptions)
-
getDetails
CompletableFuture<RunGetDetailsResponse> getDetails(RunGetDetailsParams params)
-
getDetails
CompletableFuture<RunGetDetailsResponse> getDetails(String id, RequestOptions requestOptions)
-
getStatus
CompletableFuture<RunGetStatusResponse> getStatus(String id)
Lightweight status poll for a run. Use /run/:id/details for the full audit trail.
-
getStatus
CompletableFuture<RunGetStatusResponse> getStatus(String id, RunGetStatusParams params, RequestOptions requestOptions)
-
getStatus
CompletableFuture<RunGetStatusResponse> getStatus(String id, RunGetStatusParams params)
-
getStatus
abstract CompletableFuture<RunGetStatusResponse> getStatus(RunGetStatusParams params, RequestOptions requestOptions)
-
getStatus
CompletableFuture<RunGetStatusResponse> getStatus(RunGetStatusParams params)
-
getStatus
CompletableFuture<RunGetStatusResponse> getStatus(String id, RequestOptions requestOptions)
-
watch
CompletableFuture<RunWatchResponse> watch(String id, RunWatchParams params)
Register a callback URL to receive notifications when the run completes. URL must use https and must not point to a private network.
-
watch
CompletableFuture<RunWatchResponse> watch(String id, RunWatchParams params, RequestOptions requestOptions)
-
watch
CompletableFuture<RunWatchResponse> watch(RunWatchParams params)
-
watch
abstract CompletableFuture<RunWatchResponse> watch(RunWatchParams params, RequestOptions requestOptions)
-
-
-
-