Versions in this module Expand all Collapse all v0 v0.0.2 Oct 21, 2025 Changes in this version + type Agent struct + Config AgentConfig + Handoff Handoff + func NewAgent(config AgentConfig) *Agent + func (a *Agent) AddMessage(ctx context.Context, thread *Thread, message Message) error + func (a *Agent) AddMessageWithUser(ctx context.Context, thread *Thread, message Message, userID string) error + func (a *Agent) AddMessageWithoutSaving(ctx context.Context, thread *Thread, message Message, userID string) error + func (a *Agent) CancelRun(ctx context.Context, run *Run) error + func (a *Agent) CreateRun(ctx context.Context, thread *Thread) (*Run, error) + func (a *Agent) CreateThread(ctx context.Context, messages []Message, metadata map[string]interface{}) (*Thread, error) + func (a *Agent) CreateThreadWithUser(ctx context.Context, userID string, messages []Message, ...) (*Thread, error) + func (a *Agent) DelegateToChild(ctx context.Context, target string, input *Message, ...) (map[string]interface{}, error) + func (a *Agent) ExecuteRun(ctx context.Context, run *Run, thread *Thread) error + func (a *Agent) ExecuteRunWithRepository(ctx context.Context, run *Run, thread *Thread, userID string, repo interface{}) error + func (a *Agent) GetChild(name string) (*Agent, bool) + func (a *Agent) RegisterChild(name string, child *Agent) + func (a *Agent) SetClient(client *LLMClient) + func (a *Agent) SetDescription(s string) + func (a *Agent) SetSystemPrompt(s string) + func (a *Agent) StreamRun(ctx context.Context, run *Run, thread *Thread, callback func(Message) error) error + type AgentConfig struct + MaxSteps int + Metadata map[string]interface{} + Model string + Temperature float64 + Tools []Tool + type Config struct + OpenAI OpenAIConfig + type Handoff struct + Children []string + Enabled bool + type LLMClient struct + func NewClient(cfg *Config) *LLMClient + func (c *LLMClient) ExecuteToolCalls(ctx context.Context, message *Message, tools []Tool) error + func (c *LLMClient) GenerateResponse(ctx context.Context, thread *Thread, tools []Tool) (*Message, error) + type Message struct + Content string + CreatedAt time.Time + Metadata map[string]interface{} + MultiContent openai.ChatMessagePart + Role string + ToolCallID string + ToolCalls []ToolCall + type OpenAIConfig struct + APIKey string + ThinkingModel string + VisionModelName string + type Run struct + CreatedAt time.Time + EndedAt *time.Time + ID string + Metadata map[string]interface{} + StartedAt *time.Time + Status RunStatus + ThreadID string + Tools []Tool + type RunStatus string + const RunStatusCancelled + const RunStatusCompleted + const RunStatusFailed + const RunStatusInProgress + const RunStatusQueued + type Thread struct + CreatedAt time.Time + ID string + Messages []Message + Metadata map[string]interface{} + type Tool struct + Description string + Function func(ctx context.Context, params map[string]interface{}) (interface{}, error) + Name string + Parameters map[string]interface{} + type ToolCall struct + Arguments map[string]interface{} + ID string + Output string + ToolName string