Documentation
¶
Index ¶
- type Cosmos
- func (c *Cosmos) Create(ctx context.Context, config *types.AgentConfig) (*agent.Agent, error)
- func (c *Cosmos) Delete(ctx context.Context, agentID string) error
- func (c *Cosmos) ForEach(fn func(agentID string, ag *agent.Agent) error) error
- func (c *Cosmos) Get(agentID string) (*agent.Agent, bool)
- func (c *Cosmos) List(prefix string) []string
- func (c *Cosmos) Remove(agentID string) error
- func (c *Cosmos) Resume(ctx context.Context, agentID string, config *types.AgentConfig) (*agent.Agent, error)
- func (c *Cosmos) ResumeAll(ctx context.Context, configFactory func(agentID string) *types.AgentConfig) ([]*agent.Agent, error)
- func (c *Cosmos) Shutdown() error
- func (c *Cosmos) Size() int
- func (c *Cosmos) Status(agentID string) (*types.AgentStatus, error)
- type Options
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Cosmos ¶
type Cosmos struct {
// contains filtered or unexported fields
}
Cosmos 宇宙 - 管理多个 Agent 的生命周期 Cosmos 是 Aster 框架中的 Agent 生命周期管理器, 负责创建、获取、删除和管理所有 Agent 实例。
func (*Cosmos) Resume ¶
func (c *Cosmos) Resume(ctx context.Context, agentID string, config *types.AgentConfig) (*agent.Agent, error)
Resume 从存储中恢复 Agent
type Options ¶
type Options struct {
Dependencies *agent.Dependencies
MaxAgents int // 最大 Agent 数量,默认 50
}
Options Cosmos 配置
Click to show internal directories.
Click to hide internal directories.