Documentation
¶
Index ¶
- Constants
- func RegisterInterface(name string, iface Interface)
- func ResolveClient(modelID string, models []config.ModelConfig, providers []config.ProviderConfig, ...) (*provider.Client, string, error)
- func Run(def Definition)
- func RunArgs(args []string, def Definition) error
- func StartScheduler(deps Deps, notifier Notifier) *cron.Cron
- type Definition
- type Deps
- type Interface
- type LocalInterface
- type Notifier
- type Option
- type SessionManager
Constants ¶
View Source
const DefaultCacheSize = 50
Variables ¶
This section is empty.
Functions ¶
func RegisterInterface ¶
func ResolveClient ¶
func ResolveClient(modelID string, models []config.ModelConfig, providers []config.ProviderConfig, verbose bool) (*provider.Client, string, error)
func Run ¶
func Run(def Definition)
func RunArgs ¶
func RunArgs(args []string, def Definition) error
Types ¶
type Definition ¶
type Deps ¶
type Deps struct {
AgentName string
Client *provider.Client
CompactionClient *provider.Client
Registry *tools.Registry
SystemPrompt string
MaxRounds int
CWD string
Store *session.Store
Subagents map[string]*agent.SubagentDef
Skills *skills.Store
Config config.Config
MemoryService *memory.MemoryService
StartScheduler func()
ConfigDir string
ModelName string
Templates []prompts.Template
}
func InitWithConfig ¶ added in v0.1.2
func (Deps) NewSession ¶ added in v0.1.1
func (d Deps) NewSession(sess *session.Session) *agent.AgentSession
func (Deps) NewSessionManager ¶ added in v0.1.1
func (d Deps) NewSessionManager(keyStorePath string) (*SessionManager, error)
func (Deps) NewSessionWithClient ¶ added in v0.1.1
type Interface ¶
func LookupInterface ¶
type LocalInterface ¶
type LocalInterface struct{}
func (LocalInterface) Name ¶
func (LocalInterface) Name() string
type SessionManager ¶ added in v0.1.1
type SessionManager struct {
// contains filtered or unexported fields
}
func NewSessionManager ¶ added in v0.1.1
func NewSessionManager(store *session.Store, cache *session.Cache[*agent.AgentSession], keyStore *session.KeyStore, factory func(*session.Session) *agent.AgentSession) *SessionManager
func (*SessionManager) GetOrCreate ¶ added in v0.1.1
func (sm *SessionManager) GetOrCreate(key string) (*agent.AgentSession, error)
func (*SessionManager) Save ¶ added in v0.1.1
func (sm *SessionManager) Save(key string, sess *agent.AgentSession)
Click to show internal directories.
Click to hide internal directories.