Documentation
¶
Index ¶
- func ParseMessages(messages []Event) ([]*protocol.Message, error)
- func ParseTasks(tasks []Task) ([]*protocol.Task, error)
- type Agent
- type AgentMemorySearchResult
- type Client
- type CrewAIAgentMemory
- type CrewAIFlowState
- type Event
- type Feedback
- type FeedbackIssueType
- type LangGraphCheckpoint
- type LangGraphCheckpointTuple
- type LangGraphCheckpointWrite
- type Memory
- type PushNotification
- type QueryOptions
- type Session
- type SessionSource
- type Task
- type Tool
- type ToolServer
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type AgentMemorySearchResult ¶
AgentMemorySearchResult is the result of a vector similarity search over Memory.
type Client ¶
type Client interface {
// Store methods
StoreFeedback(ctx context.Context, feedback *Feedback) error
StoreSession(ctx context.Context, session *Session) error
StoreAgent(ctx context.Context, agent *Agent) error
StoreTask(ctx context.Context, task *protocol.Task) error
StorePushNotification(ctx context.Context, config *protocol.TaskPushNotificationConfig) error
StoreToolServer(ctx context.Context, toolServer *ToolServer) (*ToolServer, error)
StoreEvents(ctx context.Context, messages ...*Event) error
// Delete methods
DeleteSession(ctx context.Context, sessionID string, userID string) error
DeleteAgent(ctx context.Context, agentID string) error
DeleteToolServer(ctx context.Context, serverName string, groupKind string) error
DeleteTask(ctx context.Context, taskID string) error
DeletePushNotification(ctx context.Context, taskID string) error
DeleteToolsForServer(ctx context.Context, serverName string, groupKind string) error
// Get methods
GetSession(ctx context.Context, sessionID string, userID string) (*Session, error)
GetSessionByID(ctx context.Context, sessionID string) (*Session, error)
GetAgent(ctx context.Context, name string) (*Agent, error)
GetTask(ctx context.Context, id string) (*protocol.Task, error)
GetTool(ctx context.Context, name string) (*Tool, error)
GetToolServer(ctx context.Context, name string) (*ToolServer, error)
GetPushNotification(ctx context.Context, taskID string, configID string) (*protocol.TaskPushNotificationConfig, error)
// List methods
ListTools(ctx context.Context) ([]Tool, error)
ListFeedback(ctx context.Context, userID string) ([]Feedback, error)
ListTasksForSession(ctx context.Context, sessionID string) ([]*protocol.Task, error)
ListSessions(ctx context.Context, userID string) ([]Session, error)
ListSessionsForAgent(ctx context.Context, agentID string, userID string) ([]Session, error)
ListSessionsForAgentAllUsers(ctx context.Context, agentID string) ([]Session, error)
ListAgents(ctx context.Context) ([]Agent, error)
ListToolServers(ctx context.Context) ([]ToolServer, error)
ListToolsForServer(ctx context.Context, serverName string, groupKind string) ([]Tool, error)
ListEventsForSession(ctx context.Context, sessionID, userID string, options QueryOptions) ([]*Event, error)
ListPushNotifications(ctx context.Context, taskID string) ([]*protocol.TaskPushNotificationConfig, error)
// Helper methods
RefreshToolsForServer(ctx context.Context, serverName string, groupKind string, tools ...*v1alpha2.MCPTool) error
// LangGraph Checkpoint methods
StoreCheckpoint(ctx context.Context, checkpoint *LangGraphCheckpoint) error
StoreCheckpointWrites(ctx context.Context, writes []*LangGraphCheckpointWrite) error
ListCheckpoints(ctx context.Context, userID, threadID, checkpointNS string, checkpointID *string, limit int) ([]*LangGraphCheckpointTuple, error)
DeleteCheckpoint(ctx context.Context, userID, threadID string) error
// CrewAI methods
StoreCrewAIMemory(ctx context.Context, memory *CrewAIAgentMemory) error
SearchCrewAIMemoryByTask(ctx context.Context, userID, threadID, taskDescription string, limit int) ([]*CrewAIAgentMemory, error)
ResetCrewAIMemory(ctx context.Context, userID, threadID string) error
StoreCrewAIFlowState(ctx context.Context, state *CrewAIFlowState) error
GetCrewAIFlowState(ctx context.Context, userID, threadID string) (*CrewAIFlowState, error)
// Agent memory (vector search) methods
StoreAgentMemory(ctx context.Context, memory *Memory) error
StoreAgentMemories(ctx context.Context, memories []*Memory) error
SearchAgentMemory(ctx context.Context, agentName, userID string, embedding pgvector.Vector, limit int) ([]AgentMemorySearchResult, error)
ListAgentMemories(ctx context.Context, agentName, userID string) ([]Memory, error)
DeleteAgentMemory(ctx context.Context, agentName, userID string) error
PruneExpiredMemories(ctx context.Context) error
}
type CrewAIAgentMemory ¶
type CrewAIFlowState ¶
type CrewAIFlowState struct {
UserID string `json:"user_id"`
ThreadID string `json:"thread_id"`
MethodName string `json:"method_name"`
CreatedAt time.Time `json:"created_at"`
UpdatedAt time.Time `json:"updated_at"`
DeletedAt *time.Time `json:"deleted_at,omitempty"`
StateData string `json:"state_data"`
}
type Event ¶
type Event struct {
ID string `json:"id"`
SessionID string `json:"session_id"`
UserID string `json:"user_id"`
CreatedAt time.Time `json:"created_at"`
UpdatedAt time.Time `json:"updated_at"`
DeletedAt *time.Time `json:"deleted_at,omitempty"`
Data string `json:"data"` // JSON-serialized protocol.Message
}
type Feedback ¶
type Feedback struct {
ID int64 `json:"id"`
CreatedAt *time.Time `json:"created_at,omitempty"`
UpdatedAt *time.Time `json:"updated_at,omitempty"`
DeletedAt *time.Time `json:"deleted_at,omitempty"`
UserID string `json:"user_id"`
MessageID *int64 `json:"message_id,omitempty"`
IsPositive bool `json:"is_positive"`
FeedbackText string `json:"feedback_text"`
IssueType *FeedbackIssueType `json:"issue_type,omitempty"`
}
type FeedbackIssueType ¶
type FeedbackIssueType string
FeedbackIssueType represents the category of feedback issue
const ( FeedbackIssueTypeInstructions FeedbackIssueType = "instructions" FeedbackIssueTypeFactual FeedbackIssueType = "factual" FeedbackIssueTypeIncomplete FeedbackIssueType = "incomplete" FeedbackIssueTypeTool FeedbackIssueType = "tool" )
type LangGraphCheckpoint ¶
type LangGraphCheckpoint struct {
UserID string `json:"user_id"`
ThreadID string `json:"thread_id"`
CheckpointNS string `json:"checkpoint_ns"`
CheckpointID string `json:"checkpoint_id"`
ParentCheckpointID *string `json:"parent_checkpoint_id,omitempty"`
CreatedAt time.Time `json:"created_at"`
UpdatedAt time.Time `json:"updated_at"`
DeletedAt *time.Time `json:"deleted_at,omitempty"`
Metadata string `json:"metadata"`
Checkpoint string `json:"checkpoint"`
CheckpointType string `json:"checkpoint_type"`
Version int64 `json:"version"`
}
type LangGraphCheckpointTuple ¶
type LangGraphCheckpointTuple struct {
Checkpoint *LangGraphCheckpoint
Writes []*LangGraphCheckpointWrite
}
type LangGraphCheckpointWrite ¶
type LangGraphCheckpointWrite struct {
UserID string `json:"user_id"`
ThreadID string `json:"thread_id"`
CheckpointNS string `json:"checkpoint_ns"`
CheckpointID string `json:"checkpoint_id"`
WriteIdx int64 `json:"write_idx"`
Value string `json:"value"`
ValueType string `json:"value_type"`
Channel string `json:"channel"`
TaskID string `json:"task_id"`
CreatedAt time.Time `json:"created_at"`
UpdatedAt time.Time `json:"updated_at"`
DeletedAt *time.Time `json:"deleted_at,omitempty"`
}
type Memory ¶
type Memory struct {
ID string `json:"id"`
AgentName string `json:"agent_name"`
UserID string `json:"user_id"`
Content string `json:"content"`
Embedding pgvector.Vector `json:"embedding"`
Metadata string `json:"metadata"`
CreatedAt time.Time `json:"created_at"`
ExpiresAt *time.Time `json:"expires_at,omitempty"`
AccessCount int64 `json:"access_count"`
}
type PushNotification ¶
type QueryOptions ¶
type Session ¶
type Session struct {
ID string `json:"id"`
Name *string `json:"name,omitempty"`
UserID string `json:"user_id"`
CreatedAt time.Time `json:"created_at"`
UpdatedAt time.Time `json:"updated_at"`
DeletedAt *time.Time `json:"deleted_at,omitempty"`
AgentID *string `json:"agent_id,omitempty"`
// Source indicates how this session was created.
// SessionSourceUser = user-initiated, SessionSourceAgent = created by a parent agent's A2A call.
Source *SessionSource `json:"source,omitempty"`
}
type SessionSource ¶
type SessionSource string
SessionSource represents the origin of a session.
const ( // SessionSourceUser indicates the session was initiated by a user. SessionSourceUser SessionSource = "user" // SessionSourceAgent indicates the session was created by a parent agent's A2A call. SessionSourceAgent SessionSource = "agent" )
type Task ¶
type ToolServer ¶
type ToolServer struct {
CreatedAt time.Time `json:"created_at"`
UpdatedAt time.Time `json:"updated_at"`
DeletedAt *time.Time `json:"deleted_at,omitempty"`
Name string `json:"name"`
GroupKind string `json:"group_kind"`
Description string `json:"description"`
LastConnected *time.Time `json:"last_connected,omitempty"`
}
Click to show internal directories.
Click to hide internal directories.