Documentation
¶
Overview ¶
Package agent is the core orchestration layer for Revcli AI agents.
It provides session-based AI agent functionality for managing conversations, tool execution, and message handling. It coordinates interactions between language models, messages, sessions, and tools while handling features like automatic summarization, queuing, and token management.
Index ¶
Constants ¶
View Source
const (
AgentToolName = "agent"
)
Variables ¶
Functions ¶
Types ¶
type AgentParams ¶
type AgentParams struct {
Prompt string `json:"prompt" description:"The task for the agent to perform"`
}
type Coordinator ¶
type Coordinator interface {
// INFO: (kujtim) this is not used yet we will use this when we have multiple agents
// SetMainAgent(string)
Run(ctx context.Context, sessionID, prompt string, attachments ...message.Attachment) (*fantasy.AgentResult, error)
Cancel(sessionID string)
CancelAll()
IsSessionBusy(sessionID string) bool
IsBusy() bool
QueuedPrompts(sessionID string) int
QueuedPromptsList(sessionID string) []string
ClearQueue(sessionID string)
Summarize(context.Context, string) error
Model() Model
UpdateModels(ctx context.Context) error
}
type Model ¶
type Model struct {
Model fantasy.LanguageModel
CatwalkCfg catwalk.Model
ModelCfg config.SelectedModel
}
type SessionAgent ¶
type SessionAgent interface {
Run(context.Context, SessionAgentCall) (*fantasy.AgentResult, error)
SetModels(large Model, small Model)
SetTools(tools []fantasy.AgentTool)
Cancel(sessionID string)
CancelAll()
IsSessionBusy(sessionID string) bool
IsBusy() bool
QueuedPrompts(sessionID string) int
QueuedPromptsList(sessionID string) []string
ClearQueue(sessionID string)
Summarize(context.Context, string, fantasy.ProviderOptions) error
Model() Model
}
func NewSessionAgent ¶
func NewSessionAgent( opts SessionAgentOptions, ) SessionAgent
type SessionAgentCall ¶
Source Files
¶
Directories
¶
| Path | Synopsis |
|---|---|
|
Package hyper provides a fantasy.Provider that proxies requests to Hyper.
|
Package hyper provides a fantasy.Provider that proxies requests to Hyper. |
|
mcp
Package mcp provides functionality for managing Model Context Protocol (MCP) clients within the Crush application.
|
Package mcp provides functionality for managing Model Context Protocol (MCP) clients within the Crush application. |
Click to show internal directories.
Click to hide internal directories.