Versions in this module Expand all Collapse all v0 v0.5.0 Mar 2, 2026 Changes in this version + var CanonicalModelMap = map[string]map[omnillm.ProviderName]string + var CanonicalToolMap = map[string]string + var CommonCLITools = map[string]string + var ErrHITLRequired = errors.New("human-in-the-loop input required") + func BuildDAG(workflow *WorkflowSpec) map[string][]string + func DefaultStateDir() string + func GetCanonicalModelForProvider(provider omnillm.ProviderName) map[string]string + func GetInstallHint(cli string) string + func GetRootSteps(workflow *WorkflowSpec) []string + func IsCanonicalModel(model string) bool + func IsHITLError(err error) bool + func LoadFromSpec(specDir string, llmCfg LLMConfig) (*Config, *TeamSpec, error) + func MapCanonicalModel(canonical string, provider omnillm.ProviderName) string + func MapCanonicalTools(canonical []string) []string + func ProviderNameFromString(name string) omnillm.ProviderName + func TopologicalSort(workflow *WorkflowSpec) ([]string, error) + func WorkspaceStateDir(workspace string) string + type AgentConfig struct + Description string + Instructions string + MaxTokens int + Model string + Name string + Tools []string + type AgentInfo struct + Description string + Name string + type AgentResult struct + Agent string + Error string + Input string + Output string + Success bool + type AgentResultReport struct + AgentID string + AgentModel string + Checks []CheckResult + Duration string + Error string + ExecutedAt time.Time + Inputs map[string]any + Outputs map[string]any + Schema string + Status ReportStatus + StepID string + func BuildAgentResult(stepResult *StepResult, stepSpec *StepSpec, model string) *AgentResultReport + func (r *AgentResultReport) ToJSON() ([]byte, error) + type AgentSpec struct + Credentials map[string]CredentialSpec + Dependencies []string + Description string + Instructions string + Model string + Name string + Requires []string + Skills []string + Tasks []TaskSpec + Tools []string + func LoadAgentSpec(path string) (*AgentSpec, error) + type AgentTask struct + Agent string + Input string + type CheckResult struct + Detail string + ID string + Metadata map[string]any + Status ReportStatus + type CommandResult struct + Args []string + Command string + ExitCode int + Stderr string + Stdout string + func (r *CommandResult) Success() bool + type CompletionResponse struct + Content string + Done bool + ToolCalls []ToolCall + type Config struct + Agents []AgentConfig + LLM LLMConfig + MCP MCPConfig + Mode string + Timeouts TimeoutConfig + Workspace string + func DefaultConfig() Config + func LoadConfig(path string) (*Config, error) + func LoadConfigFromBytes(data []byte, format ConfigFormat) (*Config, error) + func (c *Config) GetAgentConfig(name string) (*AgentConfig, error) + func (c *Config) ListAgentNames() []string + func (c *Config) Validate() error + type ConfigFormat string + const FormatJSON + const FormatYAML + type CredentialSpec struct + Description string + Required bool + Source string + func (c *CredentialSpec) UnmarshalJSON(data []byte) error + type DAGExecutor struct + func NewDAGExecutor(agents map[string]*EmbeddedAgent, stateBackend StateBackend) *DAGExecutor + func (e *DAGExecutor) ExecuteWorkflow(ctx context.Context, team *TeamSpec, input string) (*WorkflowResult, error) + func (e *DAGExecutor) ResumeWorkflow(ctx context.Context, runID string, team *TeamSpec) (*WorkflowResult, error) + func (e *DAGExecutor) SetHITLHandler(handler HITLHandler) + func (e *DAGExecutor) SetMaxConcurrency(n int) + type Duration time.Duration + func (d *Duration) UnmarshalJSON(b []byte) error + func (d *Duration) UnmarshalYAML(unmarshal func(interface{}) error) error + func (d Duration) Duration() time.Duration + func (d Duration) MarshalJSON() ([]byte, error) + type EmbeddedAgent struct + func NewEmbeddedAgent(cfg AgentConfig, toolSet *ToolSet, llm LLMClient) (*EmbeddedAgent, error) + func (a *EmbeddedAgent) Description() string + func (a *EmbeddedAgent) Invoke(ctx context.Context, input string) (*AgentResult, error) + func (a *EmbeddedAgent) Name() string + type ExecutionState struct + CompletedAt *time.Time + Context map[string]any + Error string + RunID string + StartedAt time.Time + Status ExecutionStatus + Steps map[string]*StepState + UpdatedAt time.Time + WorkflowID string + func FromJSON(data []byte) (*ExecutionState, error) + func NewExecutionState(runID, workflowID string) *ExecutionState + func (s *ExecutionState) AddStep(stepID, agentName string, dependencies []string) + func (s *ExecutionState) Cancel() + func (s *ExecutionState) Complete() + func (s *ExecutionState) Fail(errMsg string) + func (s *ExecutionState) GetContext(key string) (any, bool) + func (s *ExecutionState) GetReadySteps() []string + func (s *ExecutionState) GetWaitingHITLStep() *StepState + func (s *ExecutionState) IsComplete() bool + func (s *ExecutionState) IsWaitingHITL() bool + func (s *ExecutionState) MarkStepCompleted(stepID, output string) + func (s *ExecutionState) MarkStepFailed(stepID, errMsg string) + func (s *ExecutionState) MarkStepRunning(stepID, input string) + func (s *ExecutionState) MarkStepSkipped(stepID string) + func (s *ExecutionState) MarkStepWaitingHITL(stepID string, request *HITLRequest) + func (s *ExecutionState) PauseForHITL() + func (s *ExecutionState) ProvideHITLResponse(stepID string, response *HITLResponse) + func (s *ExecutionState) SetContext(key string, value any) + func (s *ExecutionState) Start() + func (s *ExecutionState) ToJSON() ([]byte, error) + type ExecutionStatus string + const StatusCancelled + const StatusCompleted + const StatusFailed + const StatusPending + const StatusRunning + const StatusWaitingHITL + type FileInfo struct + IsDir bool + Name string + Size int64 + type FileStateBackend struct + func NewFileStateBackend(baseDir string) (*FileStateBackend, error) + func (b *FileStateBackend) DeleteState(ctx context.Context, runID string) error + func (b *FileStateBackend) ListRuns(ctx context.Context, workflowID string) ([]string, error) + func (b *FileStateBackend) LoadState(ctx context.Context, runID string) (*ExecutionState, error) + func (b *FileStateBackend) SaveState(ctx context.Context, runID string, state *ExecutionState) error + type GlobTool struct + func (t *GlobTool) Description() string + func (t *GlobTool) Execute(ctx context.Context, args map[string]any) (any, error) + func (t *GlobTool) Name() string + type GrepMatch struct + Content string + File string + Line int + type GrepTool struct + func (t *GrepTool) Description() string + func (t *GrepTool) Execute(ctx context.Context, args map[string]any) (any, error) + func (t *GrepTool) Name() string + type HITLError struct + Request *HITLRequest + func NewApprovalRequest(question, context string) *HITLError + func NewChoiceRequest(question, context string, options []string) *HITLError + func NewHITLError(requestType, question string) *HITLError + func NewInputRequest(question, context, defaultValue string) *HITLError + func NewReviewRequest(question, content string) *HITLError + func (e *HITLError) Error() string + func (e *HITLError) Unwrap() error + type HITLHandler func(runID, stepName string, request *HITLRequest) (*HITLResponse, error) + type HITLRequest struct + Context string + CreatedAt time.Time + DefaultValue string + Options []string + Question string + RequestType string + func GetHITLRequest(err error) *HITLRequest + type HITLResponse struct + Approved *bool + RespondedAt time.Time + Response string + SelectedOption *int + func DefaultHITLHandler(runID, stepName string, request *HITLRequest) (*HITLResponse, error) + type LLMClient interface + Complete func(ctx context.Context, messages []Message, tools []ToolDefinition) (*CompletionResponse, error) + type LLMConfig struct + APIKey string + BaseURL string + Model string + Provider string + Temperature float64 + type MCPConfig struct + Enabled bool + Port int + ServerName string + ServerVersion string + Transport string + type Message struct + Content string + Name string + Role string + ToolID string + type OmniLLMClient struct + func NewOmniLLMClient(cfg OmniLLMConfig) (*OmniLLMClient, error) + func NewOmniLLMClientFromConfig(cfg LLMConfig) (*OmniLLMClient, error) + func (c *OmniLLMClient) Close() error + func (c *OmniLLMClient) Complete(ctx context.Context, messages []Message, tools []ToolDefinition) (*CompletionResponse, error) + func (c *OmniLLMClient) Model() string + func (c *OmniLLMClient) Provider() omnillm.ProviderName + type OmniLLMConfig struct + APIKey string + BaseURL string + Model string + Provider string + type OrchestratedResult struct + Mode string + Results []*AgentResult + Task string + func (r *OrchestratedResult) AllSuccessful() bool + func (r *OrchestratedResult) Summary() string + type OrchestratedTask struct + Agents []string + Input string + Mode string + Name string + type PortSpec struct + Default any + Description string + From string + Name string + Required *bool + Type string + type PrereqCheck struct + Error string + Found bool + Name string + Path string + Version string + func CheckCLI(name string) PrereqCheck + type PrereqResult struct + AllFound bool + Checks []PrereqCheck + Missing []string + func CheckPrerequisites(requires []string) *PrereqResult + func ValidateAgentPrerequisites(agent *AgentSpec) *PrereqResult + type ReadTool struct + func (t *ReadTool) Description() string + func (t *ReadTool) Execute(ctx context.Context, args map[string]any) (any, error) + func (t *ReadTool) Name() string + type ReportBuilder struct + func NewReportBuilder(project, version string) *ReportBuilder + func (b *ReportBuilder) BuildFromWorkflowResult(result *WorkflowResult, team *TeamSpec) *TeamReport + func (b *ReportBuilder) SetGeneratedBy(generatedBy string) *ReportBuilder + func (b *ReportBuilder) SetPhase(phase string) *ReportBuilder + func (b *ReportBuilder) SetTarget(target string) *ReportBuilder + type ReportStatus string + const StatusGO + const StatusNOGO + const StatusSKIP + const StatusWARN + type Runner struct + func NewRunner(cfg *Config, llm LLMClient) (*Runner, error) + func (r *Runner) Close() error + func (r *Runner) ExecuteOrchestrated(ctx context.Context, task OrchestratedTask) (*OrchestratedResult, error) + func (r *Runner) GetAgent(name string) (*EmbeddedAgent, bool) + func (r *Runner) GetAgentInfo(name string) (*AgentInfo, error) + func (r *Runner) Invoke(ctx context.Context, agentName, input string) (*AgentResult, error) + func (r *Runner) InvokeParallel(ctx context.Context, tasks []AgentTask) ([]*AgentResult, error) + func (r *Runner) InvokeSequential(ctx context.Context, tasks []AgentTask) ([]*AgentResult, error) + func (r *Runner) ListAgentInfo() []AgentInfo + func (r *Runner) ListAgents() []string + func (r *Runner) ToolSet() *ToolSet + func (r *Runner) Workspace() string + type ShellTool struct + func (t *ShellTool) Description() string + func (t *ShellTool) Execute(ctx context.Context, args map[string]any) (any, error) + func (t *ShellTool) Name() string + type SpecLoader struct + AgentsDir string + BaseDir string + TeamsDir string + func NewSpecLoader(baseDir string) *SpecLoader + func (l *SpecLoader) LoadTeam(teamFile string) (*TeamSpec, map[string]*AgentSpec, error) + func (l *SpecLoader) ToConfig(team *TeamSpec, agents map[string]*AgentSpec, llmCfg LLMConfig) (*Config, error) + type StateBackend interface + DeleteState func(ctx context.Context, runID string) error + ListRuns func(ctx context.Context, workflowID string) ([]string, error) + LoadState func(ctx context.Context, runID string) (*ExecutionState, error) + SaveState func(ctx context.Context, runID string, state *ExecutionState) error + type StepResult struct + AgentName string + Duration time.Duration + Error string + Output string + StepID string + type StepSpec struct + Agent string + DependsOn []string + Inputs []PortSpec + Name string + Outputs []PortSpec + func GetStepByName(workflow *WorkflowSpec, name string) *StepSpec + type StepState struct + AgentName string + CompletedAt *time.Time + Dependencies []string + Error string + HITLRequest *HITLRequest + HITLResponse *HITLResponse + Input string + Output string + Retries int + StartedAt *time.Time + Status StepStatus + StepID string + type StepStatus string + const StepBlocked + const StepCompleted + const StepFailed + const StepPending + const StepRunning + const StepSkipped + const StepWaitingHITL + type TaskResult struct + Detail string + DurationMS int64 + ID string + Metadata map[string]any + Status ReportStatus + type TaskSpec struct + Command string + Description string + ExpectedOutput string + File string + Files string + HumanInLoop string + ID string + Pattern string + Required *bool + Type string + type TeamPrereqResult struct + AgentResults map[string]*PrereqResult + AllFound bool + Missing map[string][]string + func ValidateTeamPrerequisites(team *TeamSpec, agents map[string]*AgentSpec) *TeamPrereqResult + func (r *TeamPrereqResult) PrintMissingWithHints() string + func (r *TeamPrereqResult) PrintSummary() string + type TeamReport struct + GeneratedAt time.Time + GeneratedBy string + Phase string + Project string + Schema string + Status ReportStatus + Target string + Teams []TeamResult + Version string + func MergeReports(reports []*TeamReport) *TeamReport + func (r *TeamReport) PrintSummary() string + func (r *TeamReport) ToJSON() ([]byte, error) + type TeamResult struct + AgentID string + DependsOn []string + ID string + Model string + Name string + Status ReportStatus + Tasks []TaskResult + type TeamSpec struct + Agents []string + Context string + Description string + Name string + Orchestrator string + Version string + Workflow *WorkflowSpec + func LoadTeamSpec(path string) (*TeamSpec, error) + type TimeoutConfig struct + AgentInvoke Duration + FileRead Duration + ParallelTotal Duration + ShellCommand Duration + type Tool interface + Description func() string + Execute func(ctx context.Context, args map[string]any) (any, error) + Name func() string + type ToolCall struct + Arguments map[string]any + ID string + Name string + type ToolDefinition struct + Description string + Name string + Parameters map[string]interface{} + type ToolSet struct + func NewToolSet(workspace string) *ToolSet + func (ts *ToolSet) CreateTools(names []string) ([]Tool, error) + func (ts *ToolSet) GlobFiles(ctx context.Context, pattern string) ([]string, error) + func (ts *ToolSet) GrepFiles(ctx context.Context, pattern, filePattern string) ([]GrepMatch, error) + func (ts *ToolSet) ListDirectory(ctx context.Context, path string) ([]FileInfo, error) + func (ts *ToolSet) ReadFile(ctx context.Context, path string) (string, error) + func (ts *ToolSet) RunCommand(ctx context.Context, command string, args []string) (*CommandResult, error) + func (ts *ToolSet) RunShell(ctx context.Context, shellCmd string) (*CommandResult, error) + func (ts *ToolSet) SetMaxFileSize(size int64) + func (ts *ToolSet) WriteFile(ctx context.Context, path, content string) error + type WorkflowResult struct + FinalOutput string + RunID string + State *ExecutionState + StepResults map[string]*StepResult + WorkflowID string + type WorkflowSpec struct + Steps []StepSpec + Type string + type WorkflowType string + const WorkflowDAG + const WorkflowOrchestrated + const WorkflowParallel + const WorkflowSequential + func GetWorkflowType(team *TeamSpec) WorkflowType + type WriteTool struct + func (t *WriteTool) Description() string + func (t *WriteTool) Execute(ctx context.Context, args map[string]any) (any, error) + func (t *WriteTool) Name() string