Documentation
¶
Index ¶
- func NewRestateLLM(restateCtx restate.WorkflowContext, wrappedLLM llm.Provider) agents.LLM
- func NewRestatePrompt(restateCtx restate.WorkflowContext, instruction core.SystemPromptProvider) core.SystemPromptProvider
- type AgentWorkflow
- type RestateConversationSummarizer
- type RestateHistory
- func (t *RestateHistory) LoadMessages(ctx context.Context, namespace string, previousMessageID string) ([]conversation.ConversationMessage, error)
- func (t *RestateHistory) NewRunID(ctx context.Context) string
- func (t *RestateHistory) SaveMessages(ctx context.Context, namespace, msgId, previousMsgId, conversationId string, ...) error
- func (t *RestateHistory) SaveSummary(ctx context.Context, namespace string, summary conversation.Summary) error
- type RestateLLM
- type RestateMCPServer
- type RestateMCPTool
- type RestatePrompt
- type RestateRuntime
- type RestateTool
- type WorkflowInput
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func NewRestateLLM ¶
func NewRestatePrompt ¶
func NewRestatePrompt(restateCtx restate.WorkflowContext, instruction core.SystemPromptProvider) core.SystemPromptProvider
Types ¶
type AgentWorkflow ¶
type AgentWorkflow struct {
// contains filtered or unexported fields
}
AgentWorkflow is the Restate workflow that executes agents with durability.
func NewRestateWorkflow ¶
func NewRestateWorkflow(agentConfigs map[string]*agents.AgentOptions, broker core.StreamBroker) *AgentWorkflow
func (*AgentWorkflow) Run ¶
func (w *AgentWorkflow) Run(restateCtx restate.WorkflowContext, input *WorkflowInput) (*agents.AgentOutput, error)
Run executes the agent inside a Restate workflow context.
type RestateConversationSummarizer ¶
type RestateConversationSummarizer struct {
// contains filtered or unexported fields
}
func NewRestateConversationSummarizer ¶
func NewRestateConversationSummarizer(restateCtx restate.WorkflowContext, wrappedSummarizer core.HistorySummarizer) *RestateConversationSummarizer
func (*RestateConversationSummarizer) Summarize ¶
func (t *RestateConversationSummarizer) Summarize(ctx context.Context, msgIdToRunId map[string]string, messages []responses.InputMessageUnion, usage *responses.Usage) (*core.SummaryResult, error)
type RestateHistory ¶
type RestateHistory struct {
// contains filtered or unexported fields
}
func NewRestateConversationPersistence ¶
func NewRestateConversationPersistence(restateCtx restate.WorkflowContext, wrappedPersistence history.ConversationPersistenceAdapter) *RestateHistory
func (*RestateHistory) LoadMessages ¶
func (t *RestateHistory) LoadMessages(ctx context.Context, namespace string, previousMessageID string) ([]conversation.ConversationMessage, error)
func (*RestateHistory) SaveMessages ¶
func (t *RestateHistory) SaveMessages(ctx context.Context, namespace, msgId, previousMsgId, conversationId string, messages []responses.InputMessageUnion, meta map[string]any) error
func (*RestateHistory) SaveSummary ¶
func (t *RestateHistory) SaveSummary(ctx context.Context, namespace string, summary conversation.Summary) error
type RestateLLM ¶
type RestateLLM struct {
// contains filtered or unexported fields
}
func (*RestateLLM) NewStreamingResponses ¶
func (l *RestateLLM) NewStreamingResponses(ctx context.Context, in *responses.Request, cb func(chunk *responses.ResponseChunk)) (*responses.Response, error)
type RestateMCPServer ¶
type RestateMCPServer struct {
// contains filtered or unexported fields
}
func NewRestateMCPServer ¶
func NewRestateMCPServer(restateCtx restate.WorkflowContext, wrappedMcpServer agents.MCPToolset) *RestateMCPServer
func (*RestateMCPServer) GetName ¶
func (t *RestateMCPServer) GetName() string
type RestateMCPTool ¶
func NewRestateMCPTool ¶
func NewRestateMCPTool(restateCtx restate.WorkflowContext, wrappedMcpServer agents.MCPToolset, runContext map[string]any, baseTool core.BaseTool) *RestateMCPTool
func (*RestateMCPTool) Execute ¶
func (t *RestateMCPTool) Execute(ctx context.Context, params *responses.FunctionCallMessage) (*responses.FunctionCallOutputMessage, error)
type RestatePrompt ¶
type RestatePrompt struct {
// contains filtered or unexported fields
}
type RestateRuntime ¶
type RestateRuntime struct {
// contains filtered or unexported fields
}
RestateRuntime executes agents via Restate workflows for durability. It registers the agent in the global registry and invokes a Restate workflow that reconstructs the agent with RestateExecutor for crash recovery.
func NewRestateRuntime ¶
func NewRestateRuntime(endpoint string, broker core.StreamBroker) *RestateRuntime
NewRestateRuntime creates a new Restate runtime. The agentName is used to look up the agent config inside the workflow.
func (*RestateRuntime) Run ¶
func (r *RestateRuntime) Run(ctx context.Context, agent *agents.Agent, in *agents.AgentInput) (*agents.AgentOutput, error)
Run registers the agent in the global registry and invokes the Restate workflow.
type RestateTool ¶
type RestateTool struct {
// contains filtered or unexported fields
}
func NewRestateTool ¶
func NewRestateTool(restateCtx restate.WorkflowContext, wrappedTool core.Tool) *RestateTool
func (*RestateTool) Execute ¶
func (t *RestateTool) Execute(ctx context.Context, params *responses.FunctionCallMessage) (*responses.FunctionCallOutputMessage, error)
func (*RestateTool) NeedApproval ¶
func (t *RestateTool) NeedApproval() bool
type WorkflowInput ¶
type WorkflowInput struct {
AgentName string `json:"agent_name"`
Namespace string
PreviousMessageID string
Messages []responses.InputMessageUnion
RunContext map[string]any
}
WorkflowInput is the input structure for the Restate workflow.
Click to show internal directories.
Click to hide internal directories.