Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type AgentBuilderWorkflow ¶
type AgentBuilderWorkflow struct{}
func (AgentBuilderWorkflow) Cancel ¶
func (AgentBuilderWorkflow) Cancel(ctx restate.WorkflowSharedContext, reason string) error
Cancel signals the workflow to stop
func (AgentBuilderWorkflow) GetStatus ¶
func (AgentBuilderWorkflow) GetStatus(ctx restate.WorkflowSharedContext) (AgentStatus, error)
GetStatus returns the current workflow state
func (AgentBuilderWorkflow) Run ¶
func (w AgentBuilderWorkflow) Run(reStateCtx restate.WorkflowContext, input AgentRunInput) (AgentRunOutput, error)
Run executes the agent with durable checkpoints Fetches all config from DB like converse.go does
type AgentRunInput ¶
type AgentRunInput struct {
Message responses.InputMessageUnion `json:"message"`
Namespace string `json:"namespace"`
PreviousMessageID string `json:"previous_message_id,omitempty"`
Context map[string]any `json:"context,omitempty"`
SessionID string `json:"session_id"`
// These are passed via URL path/query in converse, but included in body for Restate
ProjectID string `json:"project_id"`
AgentName string `json:"agent_name"`
VirtualKey string `json:"virtual_key,omitempty"` // Optional - falls back to project default
}
AgentRunInput matches the ConverseRequest from converse.go UI sends same payload to Restate as it would to /api/agent-server/converse
type AgentRunOutput ¶
type AgentRunOutput struct {
FinalMessage []responses.InputMessageUnion `json:"final_message"`
}
AgentRunOutput is returned when the agent completes
type AgentStatus ¶
type AgentStatus struct {
Status string `json:"status"`
CurrentStep string `json:"current_step"`
LoopCount int `json:"loop_count"`
CurrentTool string `json:"current_tool,omitempty"`
StreamChannel string `json:"stream_channel"`
Error string `json:"error,omitempty"`
}
AgentStatus for querying workflow state
type StreamEvent ¶
type StreamEvent struct {
RunID string `json:"run_id"`
Type string `json:"type"`
Message *responses.ResponseChunk `json:"message,omitempty"`
Status string `json:"status,omitempty"`
Error string `json:"error,omitempty"`
Timestamp int64 `json:"timestamp"`
}
StreamEvent is published to Redis for UI streaming
Click to show internal directories.
Click to hide internal directories.