Skip to main content
Minimal agent with a system prompt, LLM client, and a single blocking Run(). Use this to verify your LLM credentials and SDK install before adding tools or a durable runtime. Source: examples/simple_agent/

What it demonstrates

  • NewAgent with WithLLMClient and WithSystemPrompt
  • Blocking Run()Get() returning AgentRunResult
  • Optional token usage footer via SHOW_LLM_USAGE=true

Run

From examples/:

Key code

The example loads LLM settings from examples/.env and calls Run once:
For a from-scratch module without the examples helper package, follow the Quickstart.

Expected output

The LLM response varies; the optional usage footer appears only when SHOW_LLM_USAGE=true.

Learn more

Quickstart

Build an agent in your own module

Run

AgentRun — Get, Done, Status, Cancel

Tools

Add built-in and custom tools