Versions in this module Expand all Collapse all v1 v1.0.0 Oct 7, 2026 Changes in this version + var ErrClosed = errors.New("session closed") + type Event struct + Agent agentcore.Event + Err error + Kind Kind + type Input struct + Msg agentcore.Message + Source Source + type Kind int + const Agent + const Error + const Idle + const RunStarted + const StatusChanged + type RunSpec struct + Config agentcore.Config + Context func(history []agentcore.Message) []agentcore.Message + Effort string + Model string + Provider string + Window int + WrapRun func(ctx context.Context) (context.Context, func(err error)) + type Session struct + func Open(store *storage.Store, state storage.State, spec RunSpec) (*Session, error) + func (s *Session) Cancel() + func (s *Session) Close() + func (s *Session) Compact(ctx context.Context) error + func (s *Session) Configure(spec RunSpec) + func (s *Session) History() []agentcore.Message + func (s *Session) Post(in Input) + func (s *Session) Query(ctx context.Context, prompt string, maxTokens int) (string, error) + func (s *Session) Status() Status + func (s *Session) Subscribe(fn func(Event)) (unsubscribe func()) + func (s *Session) Wait(ctx context.Context) error + type Source int + const Background + const User + type Status struct + Context int + Effort string + LastRun *agentcore.RunEnd + Model string + Provider string + Running bool + SessionID string + Usage agentcore.Usage + Window int