← all modules

Std.Ai.Agent

Std.Ai.Agent

Types
  type alias Input = { messages : List Message }
  type alias Output = { answer : String , usage : Provider.Usage }
  type alias ToolOutput = { answer : String }
  type Action
  type alias Parsed = { tool : Maybe String , args : Maybe String , answer : Maybe String }

Values
  inputCodec : Codec Input
  nativeToolLoop : String -> Provider -> String -> List Tool -> Int -> Durable.WorkflowDef Input ToolOutput
      Like `toolLoop`, but uses the provider's NATIVE function-calling API
  oneShot : String -> Provider -> String -> Durable.WorkflowDef Input Output
      A one-shot durable agent: prepend `systemPrompt`, call `provider` once inside
  outputCodec : Codec Output
  toolLoop : String -> Provider -> String -> List Tool -> Int -> Durable.WorkflowDef Input ToolOutput
      A tool-calling agent as a durable workflow. The model is told the `tools` and