Documentation
¶
Index ¶
- type AgentInstance
- func (ai *AgentInstance) AddAssistantToolCall(toolCall types.ToolCall)
- func (ai *AgentInstance) AddMessage(role types.MessageRole, content string)
- func (ai *AgentInstance) AddToolMessage(toolName, toolCallID, content string)
- func (ai *AgentInstance) LatestAssistantMessage() (*types.Message, bool)
- func (ai *AgentInstance) RunConversationEndedHook(ctx context.Context) error
- func (ai *AgentInstance) RunConversationStartedHook(ctx context.Context) error
- func (ai *AgentInstance) RunPostContextCompactionHook(ctx context.Context, compactedConversationID uuid.UUID) error
- func (ai *AgentInstance) RunPostToolUseHook(ctx context.Context, toolCall *types.ToolCall, toolCallResponse string) error
- func (ai *AgentInstance) RunPreContextCompactionHook(ctx context.Context, compactedConversationID uuid.UUID) error
- func (ai *AgentInstance) RunPreToolUseHook(ctx context.Context, toolCall *types.ToolCall, toolCallResponse string) error
- type CompactionHook
- type ConversationStateHook
- type HookResult
- type Runtime
- func (rt *Runtime) NewAgentInstanceFromConversation(ctx context.Context, conversationID uuid.UUID) (*AgentInstance, error)
- func (rt *Runtime) NewAgentInstanceFromSpec(ctx context.Context, agentSpecID uuid.UUID) (*AgentInstance, error)
- func (rt *Runtime) RunAgentInstance(ai *AgentInstance, prompt string) error
- func (rt *Runtime) SetOpenAIClient() error
- func (rt *Runtime) ValidateModel(ctx context.Context, provider agent.LLMProvider, model string) error
- type ToolUseHook
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type AgentInstance ¶
func (*AgentInstance) AddAssistantToolCall ¶
func (ai *AgentInstance) AddAssistantToolCall(toolCall types.ToolCall)
func (*AgentInstance) AddMessage ¶
func (ai *AgentInstance) AddMessage(role types.MessageRole, content string)
func (*AgentInstance) AddToolMessage ¶
func (ai *AgentInstance) AddToolMessage(toolName, toolCallID, content string)
func (*AgentInstance) LatestAssistantMessage ¶
func (ai *AgentInstance) LatestAssistantMessage() (*types.Message, bool)
func (*AgentInstance) RunConversationEndedHook ¶
func (ai *AgentInstance) RunConversationEndedHook(ctx context.Context) error
func (*AgentInstance) RunConversationStartedHook ¶
func (ai *AgentInstance) RunConversationStartedHook(ctx context.Context) error
func (*AgentInstance) RunPostContextCompactionHook ¶
func (*AgentInstance) RunPostToolUseHook ¶
func (*AgentInstance) RunPreContextCompactionHook ¶
func (*AgentInstance) RunPreToolUseHook ¶
type CompactionHook ¶
type CompactionHook struct {
ID string `json:"id"`
ConversationID string `json:"conversation_id"`
CompactedConversationID string `json:"compacted_conversation_id"`
EventType hook.EventType `json:"event_type"`
AgentName string `json:"agent_name"`
LastResponse string `json:"last_response,omitempty"`
}
type ConversationStateHook ¶
type HookResult ¶
type Runtime ¶
type Runtime struct {
// contains filtered or unexported fields
}
func New ¶
func New(rootCtx context.Context, ctrl *controller.Controller, sch *scheduler.Scheduler) (*Runtime, error)
func (*Runtime) NewAgentInstanceFromConversation ¶
func (*Runtime) NewAgentInstanceFromSpec ¶
func (*Runtime) RunAgentInstance ¶
func (rt *Runtime) RunAgentInstance(ai *AgentInstance, prompt string) error
func (*Runtime) SetOpenAIClient ¶
func (*Runtime) ValidateModel ¶
type ToolUseHook ¶
type ToolUseHook struct {
ID string `json:"id"`
ConversationID string `json:"conversation_id"`
EventType hook.EventType `json:"event_type"`
AgentName string `json:"agent_name"`
LastResponse string `json:"last_response,omitempty"`
ToolName string `json:"tool_name,omitempty"`
ToolArguments string `json:"tool_arguments,omitempty"`
ToolResponse string `json:"tool_response,omitempty"`
}
Source Files
¶
Click to show internal directories.
Click to hide internal directories.