Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func AgentsMDMessage ¶
func AgentsMDMessage(content, path string) taskengine.Message
func ComposeUserInput ¶ added in v0.36.0
ComposeUserInput renders the effective user message the model sees: per-turn context artifacts (from Beam's ArtifactRegistry, sent as {artifacts: [{kind, payload}, ...]}) are prepended as an "Additional context" block. Plain input passes through unchanged.
Types ¶
type Agent ¶
type Agent interface {
Capabilities(ctx context.Context) (*AgentCapabilities, error)
SessionNew(ctx context.Context, name string) (string, error)
SessionList(ctx context.Context) ([]*SessionInfo, error)
SessionLoad(ctx context.Context, name string) (contenoxSessionID string, messages []taskengine.Message, err error)
// SessionResume switches to an existing session without loading its
// message history — the reconnect path for clients that kept their
// transcript.
SessionResume(ctx context.Context, name string) (contenoxSessionID string, err error)
// SessionDelete removes a session and its messages by name; missing
// sessions are not an error (delete is idempotent).
SessionDelete(ctx context.Context, name string) error
SessionEnsureDefault(ctx context.Context) (string, error)
Prompt(ctx context.Context, req PromptRequest) (*PromptResponse, error)
}
type AgentCapabilities ¶
type NoopObserver ¶
type NoopObserver struct{}
func (NoopObserver) OnStepCompleted ¶
func (NoopObserver) OnStepCompleted(taskengine.CapturedStateUnit)
type Observer ¶
type Observer interface {
OnStepCompleted(step taskengine.CapturedStateUnit)
}
type PromptRequest ¶
type PromptRequest struct {
SessionID string
Input string
InputType taskengine.DataType
InputValue any
Chain *taskengine.TaskChainDefinition
TemplateVars map[string]string
ToolsAllowlist []string
ContextLength int
HistoryTrim int
Observer Observer
AgentsMD string
AgentsMDSource string
// Per-turn context artifacts from Beam ({artifacts: []ChatContextArtifact-like}),
// injected into the model-visible user message by ComposeUserInput.
Context map[string]any
// ChainRef is the chain path used for this turn (e.g. "default-chain.json").
// Stamped onto persisted messages as turn provenance; not used for execution.
ChainRef string
}
type PromptResponse ¶
type PromptResponse struct {
Output any
OutputType taskengine.DataType
Steps []taskengine.CapturedStateUnit
StopReason StopReason
}
type StopReason ¶
type StopReason string
const ( StopEndTurn StopReason = "end_turn" StopMaxTokens StopReason = "max_tokens" StopMaxTurnRequests StopReason = "max_turn_requests" StopCancelled StopReason = "cancelled" )
func InferStopReason ¶
func InferStopReason(err error, steps []taskengine.CapturedStateUnit) StopReason
Click to show internal directories.
Click to hide internal directories.