restate_runtime

package
v0.1.17 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jan 20, 2026 License: Apache-2.0 Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewRestateLLM

func NewRestateLLM(restateCtx restate.WorkflowContext, wrappedLLM llm.Provider) agents.LLM

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

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) NewRunID

func (t *RestateHistory) NewRunID(ctx context.Context) string

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

func (*RestateMCPServer) ListTools

func (t *RestateMCPServer) ListTools(ctx context.Context, runContext map[string]any) ([]core.Tool, error)

type RestateMCPTool

type RestateMCPTool struct {
	*core.BaseTool
	// contains filtered or unexported fields
}

func NewRestateMCPTool

func NewRestateMCPTool(restateCtx restate.WorkflowContext, wrappedMcpServer agents.MCPToolset, runContext map[string]any, baseTool core.BaseTool) *RestateMCPTool

func (*RestateMCPTool) Execute

type RestatePrompt

type RestatePrompt struct {
	// contains filtered or unexported fields
}

func (*RestatePrompt) GetPrompt

func (r *RestatePrompt) GetPrompt(ctx context.Context, runContext map[string]any) (string, error)

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

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) NeedApproval

func (t *RestateTool) NeedApproval() bool

func (*RestateTool) Tool

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.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL