Versions in this module Expand all Collapse all v1 v1.4.0 Oct 20, 2026 Changes in this version + const LegacyProtocolVersion + const ProtocolVersion + const StatusAccepted + const StatusCancelled + const StatusFailed + const StatusRunning + const StatusSucceeded + var ErrCapacityExhausted = errors.New("agent runtime capacity exhausted") + var ErrExecutionConflict = errors.New("agent execution id conflicts with another request") + var ErrExecutionNotFound = errors.New("agent execution not found") + var ErrStreamingUnsupported = errors.New("runtime interface does not support event streaming") + func ValidateBaseURL(baseURL string) error + type CapabilityGrant struct + ChildAgents []string + Memory []string + MemorySensitivities []string + Models []string + Peers []string + Secrets []string + SpawnTasks bool + Tools []string + type Checkpoint struct + CreatedAt time.Time + SchemaVersion string + State json.RawMessage + type CheckpointResponse struct + Checkpoint Checkpoint + ExecutionID string + type Client struct + func NewClient(baseURL string, client *http.Client) (*Client, error) + func NewLegacyClient(baseURL string, client *http.Client) (*Client, error) + func (c *Client) Checkpoint(ctx context.Context, executionID string) (CheckpointResponse, error) + func (c *Client) Events(ctx context.Context, executionID string, after int64) (EventList, error) + func (c *Client) Health(ctx context.Context) (HealthResponse, error) + func (c *Client) Restore(ctx context.Context, request RestoreRequest) (RestoreResponse, error) + func (c *Client) Result(ctx context.Context, executionID string) (Result, bool, error) + func (c *Client) Start(ctx context.Context, request StartRequest) (StartResponse, error) + func (c *Client) Stop(ctx context.Context, executionID string) (StopResponse, error) + func (c *Client) StreamEvents(ctx context.Context, executionID string, after int64, ...) (Result, error) + func (c *Client) WaitResult(ctx context.Context, executionID string, interval time.Duration) (Result, error) + type Emitter func(eventType string, payload json.RawMessage) error + type Event struct + OccurredAt time.Time + Payload json.RawMessage + Sequence int64 + Type string + type EventList struct + Events []Event + ExecutionID string + NextAfter int64 + Truncated bool + type HTTPError struct + Body []byte + Status int + func (e *HTTPError) Error() string + type HealthResponse struct + ActiveExecutions int + Adapter string + MaxConcurrent int + ProtocolVersions []string + Status string + type Host struct + func NewHost(runtime Runtime, options HostOptions) (*Host, error) + func (h *Host) ServeHTTP(writer http.ResponseWriter, request *http.Request) + type HostOptions struct + Adapter string + EventLimit int + ExecutionLimit int + ExecutionTimeout time.Duration + ForceTerminate func(executionID string) error + MaxConcurrent int + Now func() time.Time + TerminationGrace time.Duration + type RestoreRequest struct + Checkpoint Checkpoint + ExecutionID string + type RestoreResponse struct + ExecutionID string + Restored bool + type Result struct + CompletedAt *time.Time + Error string + ErrorCode string + ExecutionID string + Output json.RawMessage + Status string + type Runtime interface + Checkpoint func(ctx context.Context, executionID string) (Checkpoint, error) + Restore func(ctx context.Context, request RestoreRequest) error + Run func(ctx context.Context, request StartRequest, emit Emitter) (json.RawMessage, error) + type StartRequest struct + AgentVersionRef string + Capabilities CapabilityGrant + ExecutionID string + Goal string + Input json.RawMessage + type StartResponse struct + ExecutionID string + Replayed bool + Status string + type StopResponse struct + ExecutionID string + Status string