Documentation
¶
Index ¶
- func NilCallback(msg *responses.ResponseChunk)
- type A2A
- type Accumulator
- type Agent
- func (a *Agent) A2A(agentCard *a2a.AgentCard) *A2A
- func (e *Agent) Execute(ctx context.Context, in *AgentInput) (*AgentOutput, error)
- func (e *Agent) ExecuteWithExecutor(ctx context.Context, in *AgentInput, cb func(chunk *responses.ResponseChunk)) (*AgentOutput, error)
- func (e *Agent) GetRunID(ctx context.Context) string
- func (e *Agent) PrepareMCPTools(ctx context.Context, runContext map[string]any) ([]core.Tool, error)
- func (e *Agent) WithLLM(wrappedLLM LLM) *Agent
- type AgentInput
- type AgentOptions
- type AgentOutput
- type AgentRuntime
- type LLM
- type MCPToolset
- type WrappedLLM
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func NilCallback ¶ added in v0.1.11
func NilCallback(msg *responses.ResponseChunk)
Types ¶
type A2A ¶ added in v0.1.1
type A2A struct {
InvokeHandler http.Handler
AgentCardHandler http.Handler
// contains filtered or unexported fields
}
func (*A2A) Cancel ¶ added in v0.1.1
func (*A2A) Cancel(ctx context.Context, reqCtx *a2asrv.RequestContext, q eventqueue.Queue) error
func (*A2A) Execute ¶ added in v0.1.1
func (agent *A2A) Execute(ctx context.Context, reqCtx *a2asrv.RequestContext, q eventqueue.Queue) error
type Accumulator ¶
type Accumulator struct {
}
func (*Accumulator) ReadStream ¶
func (a *Accumulator) ReadStream(stream chan *responses.ResponseChunk, cb func(chunk *responses.ResponseChunk)) (*responses.Response, error)
type Agent ¶
type Agent struct {
Name string
// contains filtered or unexported fields
}
func NewAgent ¶
func NewAgent(opts *AgentOptions) *Agent
func (*Agent) Execute ¶
func (e *Agent) Execute(ctx context.Context, in *AgentInput) (*AgentOutput, error)
func (*Agent) ExecuteWithExecutor ¶
func (e *Agent) ExecuteWithExecutor(ctx context.Context, in *AgentInput, cb func(chunk *responses.ResponseChunk)) (*AgentOutput, error)
func (*Agent) PrepareMCPTools ¶ added in v0.1.11
type AgentInput ¶
type AgentInput struct {
Namespace string `json:"namespace"`
PreviousMessageID string `json:"previous_message_id"`
Messages []responses.InputMessageUnion `json:"messages"`
RunContext map[string]any `json:"run_context"`
Callback func(chunk *responses.ResponseChunk) `json:"-"`
StreamBroker core.StreamBroker `json:"-"`
}
type AgentOptions ¶
type AgentOptions struct {
History *history.CommonConversationManager
Instruction core.SystemPromptProvider
Parameters responses.Parameters
Name string
LLM llm.Provider
Output map[string]any
Tools []core.Tool
McpServers []MCPToolset
Runtime AgentRuntime
MaxLoops int
}
type AgentOutput ¶
type AgentOutput struct {
RunID string `json:"run_id"`
Status core.RunStatus `json:"status"`
Output []responses.InputMessageUnion `json:"output"`
PendingApprovals []responses.FunctionCallMessage `json:"pending_approvals"`
}
AgentOutput represents the result of agent execution
type AgentRuntime ¶
type AgentRuntime interface {
Run(ctx context.Context, agent *Agent, in *AgentInput) (*AgentOutput, error)
}
type MCPToolset ¶ added in v0.1.11
type WrappedLLM ¶ added in v0.1.11
type WrappedLLM struct {
// contains filtered or unexported fields
}
func (*WrappedLLM) NewStreamingResponses ¶ added in v0.1.11
func (l *WrappedLLM) NewStreamingResponses(ctx context.Context, in *responses.Request, cb func(chunk *responses.ResponseChunk)) (*responses.Response, error)
Click to show internal directories.
Click to hide internal directories.