Documentation
¶
Overview ¶
Package trace records the agent's decision path — goal, model turns, tool calls, observations, final answer, and learned lessons — as JSONL. One run is one trajectory; the file is the future training dataset (state → action → observation → outcome).
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type FileTracer ¶
type FileTracer struct {
// contains filtered or unexported fields
}
FileTracer appends JSONL records to a file. Emit is safe for concurrent use.
func NewFileTracer ¶
func NewFileTracer(path, runID string) (*FileTracer, error)
NewFileTracer opens (creating + appending) the trace file at path, tagging every record with runID.
func (*FileTracer) Emit ¶
func (t *FileTracer) Emit(kind string, fields map[string]any)
Emit writes one JSONL record: the standard time/run/kind fields plus the caller's fields, with credentials masked (internal/redact). The log keeps every command and tool output, and outlives the session: a token that once passed through the agent would otherwise go wherever the file goes next.