Documentation
¶
Index ¶
- type ContextOptions
- type CreateRequest
- type Manager
- func (m *Manager) Create(ctx context.Context, orgID string, req *CreateRequest) (*Session, error)
- func (m *Manager) Get(ctx context.Context, orgID, sessionID string) (*Session, error)
- func (m *Manager) GetContext(ctx context.Context, orgID, sessionID string, opts *ContextOptions) (*SessionContext, error)
- func (m *Manager) List(ctx context.Context, orgID, agentID string) ([]*Session, error)
- func (m *Manager) Update(ctx context.Context, orgID, sessionID string, req *UpdateRequest) (*Session, error)
- type Session
- type SessionContext
- type UpdateRequest
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ContextOptions ¶
type ContextOptions struct {
MaxTokens int `json:"max_tokens,omitempty"`
IncludeTypes []string `json:"include_types,omitempty"`
Since string `json:"since,omitempty"`
}
ContextOptions controls how session context is formatted
type CreateRequest ¶
type CreateRequest struct {
AgentID string `json:"agent_id"`
Metadata map[string]interface{} `json:"metadata,omitempty"`
}
CreateRequest is the request body for creating a session
type Manager ¶
type Manager struct {
// contains filtered or unexported fields
}
Manager handles session lifecycle
func NewManager ¶
NewManager creates a new session manager
func (*Manager) GetContext ¶
func (m *Manager) GetContext(ctx context.Context, orgID, sessionID string, opts *ContextOptions) (*SessionContext, error)
GetContext returns LLM-ready formatted context for a session
type Session ¶
type Session struct {
ID string `json:"id"`
OrgID string `json:"org_id"`
AgentID string `json:"agent_id"`
Status string `json:"status"`
Metadata map[string]interface{} `json:"metadata,omitempty"`
CreatedAt time.Time `json:"created_at"`
UpdatedAt time.Time `json:"updated_at"`
ClosedAt *time.Time `json:"closed_at,omitempty"`
}
Session represents a bounded context for agent work
type SessionContext ¶
type SessionContext struct {
SessionID string `json:"session_id"`
Context string `json:"context"`
MemoryCount int `json:"memory_count"`
}
SessionContext is the LLM-ready context for a session
type UpdateRequest ¶
type UpdateRequest struct {
Status string `json:"status,omitempty"`
Metadata map[string]interface{} `json:"metadata,omitempty"`
}
UpdateRequest is the request body for updating a session
Click to show internal directories.
Click to hide internal directories.