Documentation
¶
Overview ¶
Package executor provides workflow execution for multi-agent-spec teams.
Package executor provides workflow execution for multi-agent-spec teams.
Package executor provides workflow execution for multi-agent-spec teams.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Executor ¶
type Executor struct {
// contains filtered or unexported fields
}
Executor runs multi-agent-spec workflows.
func (*Executor) ExecuteStep ¶
ExecuteStep runs a single workflow step.
func (*Executor) GetStepResult ¶
func (e *Executor) GetStepResult(stepName string) (*StepResult, bool)
GetStepResult retrieves a cached step result.
type LangChainConfig ¶
LangChainConfig holds configuration for LangChainGo integration.
type LangChainExecutor ¶
type LangChainExecutor struct {
// contains filtered or unexported fields
}
LangChainExecutor wraps omnillm with LangChainGo for advanced agent features.
func NewLangChainExecutor ¶
func NewLangChainExecutor(prov provider.Provider, cfg LangChainConfig) *LangChainExecutor
NewLangChainExecutor creates a new LangChainExecutor using omnillm-langchaingo.
func (*LangChainExecutor) Call ¶
func (e *LangChainExecutor) Call(ctx context.Context, messages []llms.MessageContent, opts ...llms.CallOption) (*llms.ContentResponse, error)
Call implements a simple call interface for agent steps.
func (*LangChainExecutor) GenerateContent ¶
GenerateContent generates content using the LangChainGo model interface.
func (*LangChainExecutor) Model ¶
func (e *LangChainExecutor) Model() llms.Model
Model returns the underlying LangChainGo model for use with chains/agents.
type Step ¶
type Step struct {
Name string
AgentName string
Instructions string
Inputs map[string]any
DependsOn []string
}
Step represents a workflow step to execute.
type StepResult ¶
StepResult holds the output of a workflow step.
type Workflow ¶
type Workflow struct {
Name string
Type WorkflowType
Steps []WorkflowStep
}
Workflow represents a multi-agent-spec workflow.
type WorkflowExecutor ¶
type WorkflowExecutor struct {
// contains filtered or unexported fields
}
WorkflowExecutor runs complete workflows.
func NewWorkflowExecutor ¶
func NewWorkflowExecutor(executor *Executor, agents map[string]AgentSpec) *WorkflowExecutor
NewWorkflowExecutor creates a new WorkflowExecutor.
type WorkflowStep ¶
type WorkflowStep struct {
Name string
Agent string
DependsOn []string
Inputs []Port
Outputs []Port
}
WorkflowStep represents a step in the workflow.
type WorkflowType ¶
type WorkflowType string
WorkflowType defines the workflow execution pattern.
const ( WorkflowTypeChain WorkflowType = "chain" WorkflowTypeScatter WorkflowType = "scatter" WorkflowTypeGraph WorkflowType = "graph" WorkflowTypeCrew WorkflowType = "crew" WorkflowTypeSwarm WorkflowType = "swarm" WorkflowTypeCouncil WorkflowType = "council" )
func (WorkflowType) IsDeterministic ¶
func (t WorkflowType) IsDeterministic() bool
IsDeterministic returns true if the workflow is schema-controlled.
func (WorkflowType) IsSelfDirected ¶
func (t WorkflowType) IsSelfDirected() bool
IsSelfDirected returns true if the workflow is agent-controlled.