NornsSdk.Agent (norns_sdk v0.1.0)

Copy Markdown View Source

Declarative agent definition.

Usage

agent = NornsSdk.Agent.new(
  name: "support-bot",
  model: "claude-sonnet-4-20250514",
  system_prompt: "You are a customer support agent.",
  tools: [MyTools.SearchDocs, MyTools.SendEmail],
  mode: :conversation,
  on_failure: :retry_last_step
)

Summary

Types

t()

@type t() :: %NornsSdk.Agent{
  checkpoint_policy: :every_step | :on_tool_call | :manual,
  context_strategy: :sliding_window | :none,
  context_window: pos_integer(),
  max_steps: pos_integer(),
  mode: :task | :conversation,
  model: String.t(),
  name: String.t(),
  on_failure: :stop | :retry_last_step,
  system_prompt: String.t(),
  tools: [module()]
}

Functions

new(opts)

to_registration(agent)