Documentation
¶
Overview ¶
Package agentrt is a small runtime for executing tool-using agents under deterministic control. The runtime owns the step loop, argument validation, policy evaluation, limits, persistence, and the audit event log. The agent owns only the decision of what to do next.
Milestone 0A implements one scripted run: decide, validate, evaluate policy, execute, observe, persist, repeat, and stop on a step limit. Approvals, resumption, model accounting, loop detection, and recovery are documented in docs/status.md and are not part of this package yet.
Index ¶
- Constants
- Variables
- func Approve(ctx context.Context, store *Store, obs Observer, ...) error
- func Cancel(ctx context.Context, store *Store, obs Observer, runID, by, note string) error
- func EstimateInputTokens(req ModelRequest) int
- func Reject(ctx context.Context, store *Store, obs Observer, ...) error
- type Agent
- type Approval
- type ApprovalStatus
- type Config
- type ContentBlock
- type Decision
- type DecisionKind
- type Driver
- func (d *Driver) Approve(ctx context.Context, runID, approvalID, by, note string) error
- func (d *Driver) Cancel(ctx context.Context, runID, by, note string) error
- func (d *Driver) Reject(ctx context.Context, runID, approvalID, by, note string) error
- func (d *Driver) Resume(ctx context.Context, runID string) (Run, error)
- func (d *Driver) Start(ctx context.Context, goal string, limits Limits) (Run, error)
- func (d *Driver) StartWithID(ctx context.Context, id, goal string, limits Limits) (Run, error)
- type ErrAbortRun
- type ErrLimit
- type ErrModelUnavailable
- type Event
- type Limits
- type Message
- type Micros
- type Model
- type ModelCall
- type ModelCallStatus
- type ModelCaller
- type ModelConfig
- type ModelRequest
- type ModelResponse
- type Observation
- type ObservationKind
- type Observer
- type Policy
- type PolicyDecision
- type PolicyFunc
- type PolicyOutcome
- type Price
- type PriceTable
- type ReconcileOutcome
- type Reconciliation
- type Run
- type RunStatus
- type RunView
- type SideEffect
- type SideEffectPolicy
- type Step
- type StepInput
- type StepStatus
- type Store
- func (s *Store) Close() error
- func (s *Store) CreateRun(ctx context.Context, r Run) error
- func (s *Store) DB() *sql.DB
- func (s *Store) GetApproval(ctx context.Context, runID, id string) (Approval, error)
- func (s *Store) GetRun(ctx context.Context, id string) (Run, error)
- func (s *Store) ListApprovals(ctx context.Context, runID string) ([]Approval, error)
- func (s *Store) ListEvents(ctx context.Context, runID string) ([]Event, error)
- func (s *Store) ListModelCalls(ctx context.Context, runID string) ([]ModelCall, error)
- func (s *Store) ListRuns(ctx context.Context) ([]Run, error)
- func (s *Store) ListSteps(ctx context.Context, runID string) ([]Step, error)
- type TerminalReason
- type Tool
- type ToolCall
- type ToolRequest
- type ToolResult
- type ToolSpec
- type ToolUse
- type TransientError
- type Usage
Constants ¶
const ( EventRunCreated = "run.created" EventRunStarted = "run.started" EventRunFinished = "run.finished" EventStepStarted = "step.started" EventStepDecided = "step.decided" EventStepPolicy = "step.policy" EventStepToolStarted = "step.tool_started" EventStepToolFinished = "step.tool_finished" EventStepFailed = "step.failed" EventApprovalRequested = "approval.requested" EventLimitExceeded = "limit.exceeded" EventLoopDetected = "loop.detected" EventApprovalDecided = "approval.decided" EventRunResumed = "run.resumed" EventRunInterrupted = "run.interrupted" EventStepInterrupted = "step.interrupted" EventModelDispatched = "model.dispatched" EventModelCompleted = "model.completed" EventModelFailed = "model.failed" )
Event types written by the driver.
Variables ¶
var ErrApprovalHash = errors.New("agentrt: approval hash does not match its recorded request")
ErrApprovalHash means a stored approval no longer matches its own fields.
var ErrNotFound = errors.New("agentrt: not found")
ErrNotFound is returned when a run does not exist.
Functions ¶
func Approve ¶
func Approve(ctx context.Context, store *Store, obs Observer, runID, approvalID, by, note string) error
Approve records an approval decision without a driver, for command-line front ends that decide approvals in a process that will not resume the run. The hash is recomputed from the stored fields first.
func Cancel ¶ added in v0.1.1
Cancel is Driver.Cancel without a driver, for command-line tools that decide on runs they did not start.
func EstimateInputTokens ¶
func EstimateInputTokens(req ModelRequest) int
EstimateInputTokens is the conservative input estimate the limits use: one token per three bytes of the serialized request. Consumers can use it to budget before a run.
Types ¶
type Approval ¶
type Approval struct {
ID string `json:"id"`
RunID string `json:"run_id"`
StepID string `json:"step_id"`
Kind string `json:"kind"`
Capability json.RawMessage `json:"capability"`
Presentation json.RawMessage `json:"presentation"`
Request ToolRequest `json:"request"`
Hash string `json:"hash"`
Status ApprovalStatus `json:"status"`
CreatedAt time.Time `json:"created_at"`
ExpiresAt time.Time `json:"expires_at,omitempty"`
DecidedAt time.Time `json:"decided_at,omitempty"`
DecidedBy string `json:"decided_by,omitempty"`
Note string `json:"note,omitempty"`
}
Approval is a durable, hash-bound request for a human decision. Its hash covers the kind, capability, presentation, and the exact tool request, so a changed request cannot inherit an old approval. On resume the runtime executes the recorded request and nothing else.
type ApprovalStatus ¶
type ApprovalStatus string
ApprovalStatus is the state of an approval.
const ( ApprovalPending ApprovalStatus = "pending" ApprovalApproved ApprovalStatus = "approved" ApprovalRejected ApprovalStatus = "rejected" ApprovalExpired ApprovalStatus = "expired" )
type Config ¶
type Config struct {
Store *Store
Agent Agent
Policy Policy
Tools []Tool
Observer Observer
// Model, when set, is wrapped in a ModelCaller that agents receive in
// StepInput. Scripted agents leave it nil.
Model *ModelConfig
// Reconcile, when set, runs before a run found mid-step is continued by
// Resume. Consumers reconcile their own journaled operations and say
// whether the run continues, completed, waits, or is in conflict.
Reconcile func(ctx context.Context, view RunView) (Reconciliation, error)
// Now and NewID may be overridden by tests.
Now func() time.Time
NewID func() string
}
Config configures a Driver.
type ContentBlock ¶
type ContentBlock struct {
Type string `json:"type"`
// Text applies to text blocks.
Text string `json:"text,omitempty"`
// ToolUseID, Name, and Input apply to tool_use blocks; ToolUseID also
// links a tool_result block to the call it answers.
ToolUseID string `json:"tool_use_id,omitempty"`
Name string `json:"name,omitempty"`
Input json.RawMessage `json:"input,omitempty"`
// Content and IsError apply to tool_result blocks.
Content string `json:"content,omitempty"`
IsError bool `json:"is_error,omitempty"`
}
ContentBlock is one part of a message. Types are text, tool_use, and tool_result, matching native tool-use APIs closely enough that a provider adapter is a mapping, not a redesign.
type Decision ¶
type Decision struct {
Kind DecisionKind `json:"kind"`
// Tool and Args apply to tool_call.
Tool string `json:"tool,omitempty"`
Args json.RawMessage `json:"args,omitempty"`
// Reason is the agent's stated rationale, recorded as data.
Reason string `json:"reason,omitempty"`
// Result applies to complete.
Result json.RawMessage `json:"result,omitempty"`
// Message applies to fail.
Message string `json:"message,omitempty"`
}
Decision is the agent's output for one step. It is recorded verbatim before it is validated, so the audit log shows what the agent asked for even when the request was invalid.
type DecisionKind ¶
type DecisionKind string
DecisionKind classifies what the agent asked for.
const ( DecideToolCall DecisionKind = "tool_call" DecideComplete DecisionKind = "complete" DecideFail DecisionKind = "fail" )
type Driver ¶
type Driver struct {
// contains filtered or unexported fields
}
Driver runs the step loop. It is safe to reuse for many runs but a single run is executed by one call at a time.
func (*Driver) Approve ¶
Approve marks a pending approval approved after recomputing its hash from the stored fields. The run stays WAITING until Resume.
func (*Driver) Cancel ¶ added in v0.1.1
Cancel ends a run that is not terminal as CANCELLED with reason operator_cancelled. It is for a run the operator no longer wants: one waiting for an approval, one already approved but not yet resumed, or one left interrupted. The caller must ensure no process is executing the run; the runtime does not lock. A step still in flight is failed with an observation naming the cancellation, and pending approvals are left as they are.
func (*Driver) Resume ¶
Resume continues a run. A WAITING run needs an approved approval for its awaiting step: policy is re-evaluated, and the recorded request is executed only if policy allows it or asks for exactly the approval that was granted. A RUNNING run with in-flight work was interrupted: the step is failed with an interrupted observation, the consumer's reconciliation runs, and the loop continues.
type ErrAbortRun ¶
type ErrAbortRun struct {
Detail string
}
ErrAbortRun may be returned by a tool to end the run as FAILED with reason tool_abort. It is for conditions that make continuing pointless, such as a frozen proposal found invalid at publication.
func (ErrAbortRun) Error ¶
func (e ErrAbortRun) Error() string
type ErrLimit ¶
type ErrLimit struct {
Reason TerminalReason
Detail string
}
ErrLimit is returned by a ModelCaller when a run limit would be exceeded.
type ErrModelUnavailable ¶
type ErrModelUnavailable struct {
}
ErrModelUnavailable is returned when every attempt failed.
func (ErrModelUnavailable) Error ¶
func (e ErrModelUnavailable) Error() string
func (ErrModelUnavailable) Unwrap ¶
func (e ErrModelUnavailable) Unwrap() error
type Event ¶
type Event struct {
Seq int64
RunID string
StepID string
At time.Time
Type string
Payload json.RawMessage
}
Event is one row of the append-only audit log.
type Limits ¶
type Limits struct {
// MaxSteps is the maximum number of steps a run may start.
MaxSteps int `json:"max_steps"`
// MaxConsecutiveToolFailures ends the run when this many consecutive steps
// produced a failure observation (tool error, policy denial, or an invalid
// decision).
MaxConsecutiveToolFailures int `json:"max_consecutive_tool_failures"`
// LoopThreshold ends the run when the same tool call with the same
// arguments has produced the same observation this many times in a row.
// Repeating a call whose result changed is progress and is allowed.
LoopThreshold int `json:"loop_threshold"`
// MaxModelCalls counts every attempt, including retries and ambiguous
// ones. Zero means unlimited.
MaxModelCalls int `json:"max_model_calls,omitempty"`
// MaxOutputTokensPerCall caps each request's output. Zero leaves the
// agent's value.
MaxOutputTokensPerCall int `json:"max_output_tokens_per_call,omitempty"`
// MaxTotalTokens and MaxEstimatedCost are estimated limits: they are
// checked before each call against totals plus a conservative estimate
// for the call. Zero means unlimited.
MaxTotalTokens int `json:"max_total_tokens,omitempty"`
MaxEstimatedCost Micros `json:"max_estimated_cost_micros,omitempty"`
// MaxActiveTime bounds the sum of step durations while RUNNING;
// approval waits are excluded. MaxElapsedTime is an absolute deadline
// from creation, including waits. ApprovalTTL expires a pending
// approval and cancels the run when it is next touched. Zero disables
// each.
MaxActiveTime time.Duration `json:"max_active_time,omitempty"`
MaxElapsedTime time.Duration `json:"max_elapsed_time,omitempty"`
ApprovalTTL time.Duration `json:"approval_ttl,omitempty"`
}
Limits are the caps the driver enforces before each step. Only the limits implemented in this milestone are present.
type Message ¶
type Message struct {
Role string `json:"role"` // user or assistant
Content []ContentBlock `json:"content"`
}
Message is one turn of the conversation the agent renders for the model.
type Model ¶
type Model interface {
// Name identifies the model for accounting and pricing.
Name() string
Generate(ctx context.Context, req ModelRequest) (ModelResponse, error)
}
Model generates responses. Implementations are provider adapters; the runtime wraps every Model in a ModelCaller and agents only see that.
type ModelCall ¶
type ModelCall struct {
ID string
RunID string
StepID string
Attempt int
Status ModelCallStatus
Model string
Usage Usage
Cost Micros
Latency time.Duration
Error string
DispatchedAt time.Time
CompletedAt time.Time
}
ModelCall is one persisted attempt.
type ModelCallStatus ¶
type ModelCallStatus string
ModelCallStatus is the outcome of one attempt.
const ( CallDispatched ModelCallStatus = "dispatched" CallOK ModelCallStatus = "ok" CallError ModelCallStatus = "error" // CallAmbiguous means the request was sent and no answer came back, so // the provider may or may not have charged for it. It counts as a call // and is charged conservatively. CallAmbiguous ModelCallStatus = "ambiguous" )
type ModelCaller ¶
type ModelCaller interface {
Generate(ctx context.Context, req ModelRequest) (ModelResponse, error)
}
ModelCaller is the agent's only handle to the model. It enforces limits before every call, records every attempt, and applies prices.
type ModelConfig ¶
type ModelConfig struct {
Model Model
Prices PriceTable
CallTimeout time.Duration // per attempt; default 2 minutes
MaxRetries int // transient retries per Generate; default 2
Backoff time.Duration // base backoff; default 1 second
}
ModelConfig configures the wrapper.
type ModelRequest ¶
type ModelRequest struct {
System string `json:"system,omitempty"`
Messages []Message `json:"messages"`
Tools []ToolSpec `json:"tools,omitempty"`
MaxOutputTokens int `json:"max_output_tokens,omitempty"`
}
ModelRequest is one generation request.
type ModelResponse ¶
type ModelResponse struct {
Text string `json:"text,omitempty"`
ToolUses []ToolUse `json:"tool_uses,omitempty"`
StopReason string `json:"stop_reason,omitempty"`
Usage Usage `json:"usage"`
Raw json.RawMessage `json:"raw,omitempty"`
}
ModelResponse is one generation result.
type Observation ¶
type Observation struct {
Kind ObservationKind `json:"kind"`
Content json.RawMessage `json:"content,omitempty"`
Summary string `json:"summary,omitempty"`
// ContentHash is the SHA-256 of the canonical JSON content. It is recorded
// now so that later no-progress detection can key on it.
ContentHash string `json:"content_hash,omitempty"`
}
Observation is what a step produced for the agent to consider next.
func (Observation) Failure ¶
func (o Observation) Failure() bool
Failure reports whether the observation counts toward the consecutive failure limit.
type ObservationKind ¶
type ObservationKind string
ObservationKind classifies what the agent sees after a step.
const ( ObserveToolResult ObservationKind = "tool_result" ObserveToolError ObservationKind = "tool_error" ObservePolicyDenied ObservationKind = "policy_denied" ObserveInvalidDecision ObservationKind = "invalid_decision" ObserveInterrupted ObservationKind = "interrupted" )
type Observer ¶
type Observer func(Event)
Observer receives every event after it has been committed.
type Policy ¶
type Policy interface {
Evaluate(ctx context.Context, req ToolRequest, view RunView) (PolicyDecision, error)
}
Policy decides whether a validated tool request may execute. It is evaluated by the runtime and the agent has no influence over it.
type PolicyDecision ¶
type PolicyDecision struct {
Outcome PolicyOutcome `json:"outcome"`
Reason string `json:"reason,omitempty"`
// Kind, Capability, and Presentation apply to require_approval. In this
// milestone the run pauses and records them; the approval record and
// resumption arrive with durable approvals.
Kind string `json:"kind,omitempty"`
Capability json.RawMessage `json:"capability,omitempty"`
Presentation json.RawMessage `json:"presentation,omitempty"`
}
PolicyDecision is the policy's answer for one request.
type PolicyFunc ¶
type PolicyFunc func(ctx context.Context, req ToolRequest, view RunView) (PolicyDecision, error)
PolicyFunc adapts a function to the Policy interface.
func (PolicyFunc) Evaluate ¶
func (f PolicyFunc) Evaluate(ctx context.Context, req ToolRequest, view RunView) (PolicyDecision, error)
Evaluate implements Policy.
type PolicyOutcome ¶
type PolicyOutcome string
PolicyOutcome is what the policy decided about a tool request.
const ( Allow PolicyOutcome = "allow" RequireApproval PolicyOutcome = "require_approval" Deny PolicyOutcome = "deny" Abort PolicyOutcome = "abort" )
type Price ¶
type Price struct {
InputPerMTok Micros `json:"input_per_mtok"`
OutputPerMTok Micros `json:"output_per_mtok"`
CachedInputPerMTok Micros `json:"cached_input_per_mtok"`
}
Price is a model's price per million tokens.
type PriceTable ¶
PriceTable maps model names to prices. A model absent from the table costs nothing, which is the right answer for local models and the wrong one for paid ones, so consumers pass a table for every paid model.
type ReconcileOutcome ¶
type ReconcileOutcome string
ReconcileOutcome is what a consumer's reconciliation concluded about a run found mid-step.
const ( // ReconcileContinue means the loop may proceed with the next decision. ReconcileContinue ReconcileOutcome = "continue" // ReconcileCompleted means the interrupted operation had already // succeeded; the run completes with Result and no further decision. ReconcileCompleted ReconcileOutcome = "completed" // ReconcileWaiting means the run must wait for an approval again. ReconcileWaiting ReconcileOutcome = "waiting" // ReconcileConflict means external state contradicts the record; the // run fails with reconcile_conflict and Detail. ReconcileConflict ReconcileOutcome = "conflict" )
type Reconciliation ¶
type Reconciliation struct {
Outcome ReconcileOutcome
Result json.RawMessage
Detail string
}
Reconciliation is the structured result of a consumer's reconciliation.
type Run ¶
type Run struct {
ID string
Goal string
Status RunStatus
Reason TerminalReason
ReasonDetail string
Limits Limits
// StepCount is the number of steps started, including the current one.
StepCount int
CreatedAt time.Time
StartedAt time.Time
FinishedAt time.Time
// Result is the payload of a Complete decision, if any.
Result json.RawMessage
// Model accounting totals across every attempt.
ModelCalls int
Usage Usage
EstimatedCost Micros
// ActiveTime is the sum of finished step durations.
ActiveTime time.Duration
}
Run is the persisted state of one execution.
type RunStatus ¶
type RunStatus string
RunStatus is the lifecycle state of a run.
const ( StatusCreated RunStatus = "CREATED" StatusRunning RunStatus = "RUNNING" StatusWaitingForApproval RunStatus = "WAITING_FOR_APPROVAL" // StatusInterrupted marks a run found RUNNING with in-flight work by a // process that did not start it; Resume reconciles and continues it. StatusInterrupted RunStatus = "INTERRUPTED" StatusCompleted RunStatus = "COMPLETED" StatusFailed RunStatus = "FAILED" StatusCancelled RunStatus = "CANCELLED" )
type SideEffect ¶
type SideEffect string
SideEffect classifies what a tool may do. Policy is evaluated on it.
const ( ReadOnly SideEffect = "read_only" LocalMutation SideEffect = "local_mutation" RemoteMutation SideEffect = "remote_mutation" Destructive SideEffect = "destructive" )
type SideEffectPolicy ¶
type SideEffectPolicy map[SideEffect]PolicyOutcome
SideEffectPolicy maps each side-effect class to an outcome. It is the runtime's only built-in policy; consumers wrap or replace it.
func DefaultPolicy ¶
func DefaultPolicy() SideEffectPolicy
DefaultPolicy allows reads and local mutations, requires approval for remote mutations, and denies destructive tools.
func (SideEffectPolicy) Evaluate ¶
func (p SideEffectPolicy) Evaluate(_ context.Context, req ToolRequest, _ RunView) (PolicyDecision, error)
Evaluate implements Policy. A side-effect class with no mapping is denied.
type Step ¶
type Step struct {
ID string
RunID string
Index int
Status StepStatus
Decision *Decision
Policy *PolicyDecision
Observation *Observation
StartedAt time.Time
FinishedAt time.Time
}
Step is one iteration of the loop: a decision and what it caused.
type StepInput ¶
type StepInput struct {
Run Run
Steps []Step
Approvals []Approval
Tools []ToolSpec
// Model is the agent's only handle to the model. It is nil when the
// driver was configured without one, as for scripted agents.
Model ModelCaller
}
StepInput is everything the agent receives when asked to decide. Steps are all prior steps in order; the agent is stateless between calls.
type StepStatus ¶
type StepStatus string
StepStatus is the state of one step.
const ( StepDeciding StepStatus = "deciding" StepAwaitingApproval StepStatus = "awaiting_approval" StepExecuting StepStatus = "executing" StepDone StepStatus = "done" StepFailed StepStatus = "failed" StepInterrupted StepStatus = "interrupted" )
type Store ¶
type Store struct {
// contains filtered or unexported fields
}
Store persists runs, steps, and events in SQLite. It is the single implementation; there is no store interface until a second one is needed.
A Store opened on ":memory:" lives for the life of the connection and is meant for unit tests. A file-backed store uses WAL mode and survives process restarts.
func (*Store) CreateRun ¶
CreateRun inserts a new run. The caller is responsible for the run.created event; the driver writes it in the same transaction.
func (*Store) DB ¶
DB exposes the underlying database for consumers that keep their own tables in the same file and for tests. The runtime's tables are its own.
func (*Store) GetApproval ¶
GetApproval loads one approval.
func (*Store) ListApprovals ¶
ListApprovals returns a run's approvals in creation order.
func (*Store) ListEvents ¶
ListEvents returns the events of a run in sequence order.
func (*Store) ListModelCalls ¶
ListModelCalls returns a run's model call attempts in dispatch order.
type TerminalReason ¶
type TerminalReason string
TerminalReason explains why a run reached a terminal status. Reasons are generic to the runtime; consumers record their own outcome codes separately.
const ( ReasonGoalCompleted TerminalReason = "goal_completed" ReasonGoalFailed TerminalReason = "goal_failed" ReasonLimitSteps TerminalReason = "limit_steps" ReasonLimitModelCalls TerminalReason = "limit_model_calls" ReasonLimitTokens TerminalReason = "limit_tokens" ReasonLimitCost TerminalReason = "limit_cost" ReasonLimitActiveTime TerminalReason = "limit_active_time" ReasonLimitElapsedTime TerminalReason = "limit_elapsed_time" ReasonApprovalExpired TerminalReason = "approval_expired" ReasonRepeatedToolFailures TerminalReason = "repeated_tool_failures" ReasonLoopDetected TerminalReason = "loop_detected" ReasonPolicyAbort TerminalReason = "policy_abort" ReasonToolAbort TerminalReason = "tool_abort" ReasonApprovalRejected TerminalReason = "approval_rejected" ReasonOperatorCancelled TerminalReason = "operator_cancelled" ReasonReconcileConflict TerminalReason = "reconcile_conflict" ReasonAgentError TerminalReason = "agent_error" ReasonInternalError TerminalReason = "internal_error" )
type Tool ¶
type Tool interface {
Spec() ToolSpec
Call(ctx context.Context, call ToolCall) (ToolResult, error)
}
Tool is a capability the agent may request. The runtime validates arguments against Spec().InputSchema and evaluates policy before Call is invoked.
type ToolCall ¶
type ToolCall struct {
RunID string
StepID string
Args json.RawMessage
}
ToolCall carries the driver-supplied execution identity into a tool.
type ToolRequest ¶
type ToolRequest struct {
RunID string `json:"run_id"`
StepID string `json:"step_id"`
Spec ToolSpec `json:"spec"`
Args json.RawMessage `json:"args"`
}
ToolRequest is a schema-validated request handed to the policy.
type ToolResult ¶
type ToolResult struct {
Content json.RawMessage
Summary string
}
ToolResult is what a tool returns on success.
type ToolSpec ¶
type ToolSpec struct {
Name string `json:"name"`
Description string `json:"description"`
InputSchema json.RawMessage `json:"input_schema"`
SideEffect SideEffect `json:"side_effect"`
// Timeout bounds a single call. It is required.
Timeout time.Duration `json:"timeout"`
// Terminal tools complete the run when they succeed; their result
// becomes the run result and no further decision is requested.
Terminal bool `json:"terminal,omitempty"`
}
ToolSpec describes a tool to the runtime and to the agent.
type ToolUse ¶
type ToolUse struct {
ID string `json:"id"`
Name string `json:"name"`
Args json.RawMessage `json:"args"`
}
ToolUse is a tool call the model asked for.
type TransientError ¶
type TransientError struct {
Err error
}
TransientError marks a provider failure worth retrying, such as a rate limit or a 5xx response.
func (TransientError) Error ¶
func (e TransientError) Error() string
func (TransientError) Unwrap ¶
func (e TransientError) Unwrap() error
Directories
¶
| Path | Synopsis |
|---|---|
|
bench
module
|
|
|
examples
|
|
|
scripted
command
Command scripted runs one deterministic agent run against in-memory tools and prints the persisted event trace.
|
Command scripted runs one deterministic agent run against in-memory tools and prints the persisted event trace. |
|
live
module
|
|
|
mcp
module
|
|
|
mcp
module
|
|
|
providers
|
|
|
anthropic
module
|
|
|
ollama
module
|
|
|
openai
module
|
|
|
Package replay provides Model implementations that need no provider: a scripted model for unit tests, and a recorder and replayer pair so that a real model's responses can be captured once and served deterministically afterwards.
|
Package replay provides Model implementations that need no provider: a scripted model for unit tests, and a recorder and replayer pair so that a real model's responses can be captured once and served deterministically afterwards. |
|
Package scripted provides an Agent that replays a fixed list of decisions.
|
Package scripted provides an Agent that replays a fixed list of decisions. |