protocol

package
v0.0.1 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Feb 11, 2026 License: MIT Imports: 1 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Checkpoint

type Checkpoint struct {
	CheckpointID       string                 `json:"checkpoint_id" bson:"_id"`
	ThreadID           string                 `json:"thread_id" bson:"thread_id"`
	ParentCheckpointID string                 `json:"parent_checkpoint_id,omitempty" bson:"parent_checkpoint_id,omitempty"`
	Values             map[string]interface{} `json:"values" bson:"values"`
	Messages           []Message              `json:"messages,omitempty" bson:"messages,omitempty"`
	Metadata           map[string]interface{} `json:"metadata,omitempty" bson:"metadata,omitempty"`
	PendingWrites      map[string]interface{} `json:"pending_writes,omitempty" bson:"pending_writes,omitempty"`
	CreatedAt          time.Time              `json:"created_at" bson:"created_at"`
}

Checkpoint is a snapshot of thread state at a point in time.

type ErrorResponse

type ErrorResponse struct {
	Code    string `json:"code,omitempty"`
	Message string `json:"message"`
}

type Message

type Message struct {
	Role     string                 `json:"role" bson:"role"`
	Content  string                 `json:"content" bson:"content"`
	ID       string                 `json:"id,omitempty" bson:"id,omitempty"`
	Metadata map[string]interface{} `json:"metadata,omitempty" bson:"metadata,omitempty"`
}

Message represents a single message in a thread.

type Run

type Run struct {
	RunID     string                 `json:"run_id" bson:"_id"`
	ThreadID  string                 `json:"thread_id,omitempty" bson:"thread_id,omitempty"`
	AgentID   string                 `json:"agent_id,omitempty" bson:"agent_id,omitempty"`
	Status    RunStatus              `json:"status" bson:"status"`
	Input     map[string]interface{} `json:"input,omitempty" bson:"input,omitempty"`
	Output    map[string]interface{} `json:"output,omitempty" bson:"output,omitempty"`
	Metadata  map[string]interface{} `json:"metadata" bson:"metadata"`
	CreatedAt time.Time              `json:"created_at" bson:"created_at"`
	UpdatedAt time.Time              `json:"updated_at" bson:"updated_at"`
}

Run is a single agent invocation, optionally on a thread.

type RunCreate

type RunCreate struct {
	AgentID    string                 `json:"agent_id,omitempty"`
	ThreadID   string                 `json:"thread_id,omitempty"`
	Input      map[string]interface{} `json:"input"`
	Metadata   map[string]interface{} `json:"metadata,omitempty"`
	Config     map[string]interface{} `json:"config,omitempty"`
	StreamMode []string               `json:"stream_mode,omitempty"`
}

type RunSearchRequest

type RunSearchRequest struct {
	ThreadID string                 `json:"thread_id,omitempty"`
	AgentID  string                 `json:"agent_id,omitempty"`
	Status   RunStatus              `json:"status,omitempty"`
	Metadata map[string]interface{} `json:"metadata,omitempty"`
	Limit    int                    `json:"limit,omitempty"`
	Offset   int                    `json:"offset,omitempty"`
}

type RunStatus

type RunStatus string

RunStatus represents the current state of a run.

const (
	RunStatusPending     RunStatus = "pending"
	RunStatusRunning     RunStatus = "running"
	RunStatusSuccess     RunStatus = "success"
	RunStatusError       RunStatus = "error"
	RunStatusTimeout     RunStatus = "timeout"
	RunStatusInterrupted RunStatus = "interrupted"
)

type StoreDeleteRequest

type StoreDeleteRequest struct {
	Namespace []string `json:"namespace,omitempty"`
	Key       string   `json:"key"`
}

type StoreGetRequest

type StoreGetRequest struct {
	Namespace []string `json:"namespace,omitempty"`
	Key       string   `json:"key"`
}

type StoreItem

type StoreItem struct {
	Namespace []string               `json:"namespace" bson:"namespace"`
	Key       string                 `json:"key" bson:"key"`
	Value     map[string]interface{} `json:"value" bson:"value"`
	CreatedAt time.Time              `json:"created_at" bson:"created_at"`
	UpdatedAt time.Time              `json:"updated_at" bson:"updated_at"`
}

StoreItem is a namespaced key-value entry for long-term memory.

type StorePutRequest

type StorePutRequest struct {
	Namespace []string               `json:"namespace"`
	Key       string                 `json:"key"`
	Value     map[string]interface{} `json:"value"`
}

type StoreSearchRequest

type StoreSearchRequest struct {
	NamespacePrefix []string               `json:"namespace_prefix,omitempty"`
	Filter          map[string]interface{} `json:"filter,omitempty"`
	Limit           int                    `json:"limit,omitempty"`
	Offset          int                    `json:"offset,omitempty"`
}

type Thread

type Thread struct {
	ThreadID  string                 `json:"thread_id" bson:"_id"`
	CreatedAt time.Time              `json:"created_at" bson:"created_at"`
	UpdatedAt time.Time              `json:"updated_at" bson:"updated_at"`
	Metadata  map[string]interface{} `json:"metadata" bson:"metadata"`
	Status    ThreadStatus           `json:"status" bson:"status"`
	Values    map[string]interface{} `json:"values,omitempty" bson:"values,omitempty"`
	Messages  []Message              `json:"messages,omitempty" bson:"messages,omitempty"`
}

Thread is a multi-turn conversation container.

type ThreadCreate

type ThreadCreate struct {
	ThreadID string                 `json:"thread_id,omitempty"`
	Metadata map[string]interface{} `json:"metadata,omitempty"`
	IfExists string                 `json:"if_exists,omitempty"` // "raise" or "do_nothing"
}

type ThreadPatch

type ThreadPatch struct {
	Metadata map[string]interface{} `json:"metadata,omitempty"`
	Values   map[string]interface{} `json:"values,omitempty"`
	Messages []Message              `json:"messages,omitempty"`
}

type ThreadSearchRequest

type ThreadSearchRequest struct {
	Metadata map[string]interface{} `json:"metadata,omitempty"`
	Status   ThreadStatus           `json:"status,omitempty"`
	Limit    int                    `json:"limit,omitempty"`
	Offset   int                    `json:"offset,omitempty"`
}

type ThreadStatus

type ThreadStatus string

ThreadStatus represents the current state of a thread.

const (
	ThreadStatusIdle        ThreadStatus = "idle"
	ThreadStatusBusy        ThreadStatus = "busy"
	ThreadStatusInterrupted ThreadStatus = "interrupted"
	ThreadStatusError       ThreadStatus = "error"
)

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL