NornsSdk.Worker (norns_sdk v0.1.0)

Copy Markdown View Source

Worker that connects to Norns, registers agents/tools, and handles tasks.

Uses ReqLLM for LLM calls, supporting any provider (Anthropic, OpenAI, Google, etc.). The provider is inferred from the agent's model string (e.g. "anthropic:claude-sonnet-4-20250514" or just "claude-sonnet-4-20250514").

Add to your supervision tree:

children = [
  {NornsSdk.Worker,
   url: "http://localhost:4000",
   api_key: "nrn_...",
   llm_api_key: "sk-ant-...",
   agent: my_agent}
]

The llm_api_key option is passed per-request to ReqLLM. You can also configure API keys via environment variables (ANTHROPIC_API_KEY, OPENAI_API_KEY, etc.) or application config — see ReqLLM docs.

Summary

Functions

child_spec(init_arg)

start_link(opts)