Documentation
¶
Index ¶
- type Client
- func (c *Client) DeleteSession(ctx context.Context, sessionID string) (*DeleteResponse, error)
- func (c *Client) GetMessages(ctx context.Context, sessionID string) (*MessagesResponse, error)
- func (c *Client) GetStatus(ctx context.Context, sessionID string) (*StatusResponse, error)
- func (c *Client) Search(ctx context.Context, status string) (*SearchResponse, error)
- func (c *Client) SearchWithTags(ctx context.Context, status string, tags map[string]string) (*SearchResponse, error)
- func (c *Client) SendMessage(ctx context.Context, sessionID string, message *Message) (*MessageResponse, error)
- func (c *Client) Start(ctx context.Context, req *StartRequest) (*StartResponse, error)
- func (c *Client) StreamEvents(ctx context.Context, sessionID string) (<-chan string, <-chan error)
- type DeleteResponse
- type Message
- type MessageResponse
- type MessagesResponse
- type SearchResponse
- type SessionInfo
- type StartRequest
- type StartResponse
- type StatusResponse
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Client ¶
type Client struct {
// contains filtered or unexported fields
}
Client represents an agentapi-proxy client
func (*Client) DeleteSession ¶ added in v0.11.0
DeleteSession terminates and deletes a session
func (*Client) GetMessages ¶
GetMessages retrieves conversation history from an agentapi session
func (*Client) SearchWithTags ¶ added in v0.5.0
func (c *Client) SearchWithTags(ctx context.Context, status string, tags map[string]string) (*SearchResponse, error)
SearchWithTags lists and filters sessions with tag support
func (*Client) SendMessage ¶
func (c *Client) SendMessage(ctx context.Context, sessionID string, message *Message) (*MessageResponse, error)
SendMessage sends a message to an agentapi session
func (*Client) Start ¶
func (c *Client) Start(ctx context.Context, req *StartRequest) (*StartResponse, error)
Start creates a new agentapi session
type DeleteResponse ¶ added in v0.11.0
DeleteResponse represents the response from deleting a session
type Message ¶
type Message struct {
Content string `json:"content"`
Type string `json:"type"` // "user" or "raw"
Role string `json:"role,omitempty"`
Timestamp time.Time `json:"timestamp,omitempty"`
ID string `json:"id,omitempty"`
}
Message represents an agentapi message
type MessageResponse ¶
type MessageResponse struct {
Message
}
MessageResponse represents the response from sending a message
type MessagesResponse ¶
type MessagesResponse struct {
Messages []Message `json:"messages"`
}
MessagesResponse represents the response from getting messages
type SearchResponse ¶
type SearchResponse struct {
Sessions []SessionInfo `json:"sessions"`
}
SearchResponse represents the response from searching sessions
type SessionInfo ¶
type SessionInfo struct {
SessionID string `json:"session_id"`
UserID string `json:"user_id"`
Status string `json:"status"`
StartedAt time.Time `json:"started_at"`
Port int `json:"port"`
Tags map[string]string `json:"tags,omitempty"`
}
SessionInfo represents information about a session
type StartRequest ¶
type StartRequest struct {
Environment map[string]string `json:"environment,omitempty"`
Tags map[string]string `json:"tags,omitempty"`
}
StartRequest represents the request body for starting a new agentapi server
type StartResponse ¶
type StartResponse struct {
SessionID string `json:"session_id"`
}
StartResponse represents the response from starting a new agentapi server
type StatusResponse ¶
type StatusResponse struct {
Status string `json:"status"` // "stable" or "running"
}
StatusResponse represents the agent status