Documentation
¶
Overview ¶
Package loader provides loading of multi-agent-spec definitions.
Package loader provides loading of multi-agent-spec definitions.
Index ¶
- func AgentMap(agents []*Agent) map[string]*Agent
- type Agent
- type ConcurrencyConfig
- type Deployment
- type DeploymentConfig
- type LLMConfig
- type Loader
- func (l *Loader) LoadAgent(path string) (*Agent, error)
- func (l *Loader) LoadAgentsFromDir(dir string) ([]*Agent, error)
- func (l *Loader) LoadDeployment(path string) (*Deployment, error)
- func (l *Loader) LoadTeam(path string) (*Team, error)
- func (l *Loader) ParseAgentMarkdown(data []byte, path string) (*Agent, error)
- type PolymarketConfig
- type Port
- type RetrievalConfig
- type RiskConfig
- type ServerConfig
- type Step
- type Team
- type Workflow
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Agent ¶
type Agent struct {
Name string `yaml:"name"`
Namespace string `yaml:"namespace,omitempty"`
Description string `yaml:"description"`
Model string `yaml:"model"`
Tools []string `yaml:"tools"`
Role string `yaml:"role,omitempty"`
Goal string `yaml:"goal,omitempty"`
Backstory string `yaml:"backstory,omitempty"`
Dependencies []string `yaml:"dependencies,omitempty"`
Instructions string `yaml:"-"` // Parsed from markdown body
}
Agent represents a loaded agent specification.
func (*Agent) QualifiedName ¶
QualifiedName returns namespace/name or just name if no namespace.
type ConcurrencyConfig ¶
type ConcurrencyConfig struct {
Model string `json:"model"`
MaxConcurrentAgents int `json:"max_concurrent_agents"`
StepTimeoutSeconds int `json:"step_timeout_seconds,omitempty"`
}
ConcurrencyConfig holds concurrency configuration.
type Deployment ¶
type Deployment struct {
Platform string `json:"platform"`
Team string `json:"team"`
Version string `json:"version"`
Config DeploymentConfig `json:"config"`
}
Deployment represents a deployment specification.
type DeploymentConfig ¶
type DeploymentConfig struct {
// Claude Code specific
AgentDir string `json:"agent_dir,omitempty"`
SpecDir string `json:"spec_dir,omitempty"`
ModelMapping map[string]string `json:"model_mapping,omitempty"`
ToolMapping map[string]string `json:"tool_mapping,omitempty"`
// Go Server specific
Server *ServerConfig `json:"server,omitempty"`
Concurrency *ConcurrencyConfig `json:"concurrency,omitempty"`
LLM *LLMConfig `json:"llm,omitempty"`
Retrieval *RetrievalConfig `json:"retrieval,omitempty"`
Polymarket *PolymarketConfig `json:"polymarket,omitempty"`
Risk *RiskConfig `json:"risk,omitempty"`
}
DeploymentConfig holds platform-specific configuration.
type LLMConfig ¶
type LLMConfig struct {
Provider string `json:"provider"`
Config json.RawMessage `json:"config,omitempty"`
ModelMapping map[string]string `json:"model_mapping,omitempty"`
}
LLMConfig holds LLM provider configuration.
type Loader ¶
type Loader struct{}
Loader loads multi-agent-spec definitions.
func (*Loader) LoadAgentsFromDir ¶
LoadAgentsFromDir loads all agents from a directory.
func (*Loader) LoadDeployment ¶
func (l *Loader) LoadDeployment(path string) (*Deployment, error)
LoadDeployment loads a deployment specification from a JSON file.
type PolymarketConfig ¶
type PolymarketConfig struct {
CLOBURL string `json:"clob_url"`
GammaURL string `json:"gamma_url"`
ChainID int `json:"chain_id"`
PrivateKeyEnv string `json:"private_key_env"`
}
PolymarketConfig holds Polymarket API configuration.
type Port ¶
type Port struct {
Name string `json:"name"`
Type string `json:"type"`
Description string `json:"description,omitempty"`
From string `json:"from,omitempty"`
Default any `json:"default,omitempty"`
}
Port represents an input or output port.
type RetrievalConfig ¶
type RetrievalConfig struct {
Provider string `json:"provider"`
Config json.RawMessage `json:"config,omitempty"`
}
RetrievalConfig holds RAG retrieval configuration.
type RiskConfig ¶
type RiskConfig struct {
MaxPositionPercent float64 `json:"max_position_percent"`
MaxExposurePercent float64 `json:"max_exposure_percent"`
MinEdgePercent float64 `json:"min_edge_percent"`
KellyMultiplier float64 `json:"kelly_multiplier"`
}
RiskConfig holds risk management configuration.
type ServerConfig ¶
type ServerConfig struct {
Port int `json:"port"`
MetricsPort int `json:"metrics_port,omitempty"`
HealthEndpoint string `json:"health_endpoint,omitempty"`
}
ServerConfig holds server configuration.
type Step ¶
type Step struct {
Name string `json:"name"`
Agent string `json:"agent"`
DependsOn []string `json:"depends_on,omitempty"`
Inputs []Port `json:"inputs,omitempty"`
Outputs []Port `json:"outputs,omitempty"`
}
Step represents a workflow step.