Directories
¶
| Path | Synopsis |
|---|---|
|
Package agent is a provider-neutral orchestration layer built on the llm package.
|
Package agent is a provider-neutral orchestration layer built on the llm package. |
|
harness
Package harness is a stateful orchestration layer over the core agent.
|
Package harness is a stateful orchestration layer over the core agent. |
|
example
|
|
|
agent/basic
command
Command basic runs one prompt through a stateful agent and prints the final assistant message from the transcript.
|
Command basic runs one prompt through a stateful agent and prints the final assistant message from the transcript. |
|
agent/events
command
Command events prints an agent run as it happens: assistant deltas, tool starts, tool progress updates, and tool completion events.
|
Command events prints an agent run as it happens: assistant deltas, tool starts, tool progress updates, and tool completion events. |
|
agent/tools
command
Command tools lets an agent run a typed tool loop for a weather question.
|
Command tools lets an agent run a typed tool loop for a weather question. |
|
llm/advanced
command
Command advanced shows two lower-level controls layered on a normal request:
|
Command advanced shows two lower-level controls layered on a normal request: |
|
llm/basic
command
Command basic sends a single prompt to a model and prints the reply.
|
Command basic sends a single prompt to a model and prints the reply. |
|
llm/conversation
command
Command conversation carries history across multiple turns.
|
Command conversation carries history across multiple turns. |
|
llm/model_switch
command
Command model_switch continues one conversation across two protocols.
|
Command model_switch continues one conversation across two protocols. |
|
llm/options
command
Command options sends a prompt with a system message and per-request options.
|
Command options sends a prompt with a system message and per-request options. |
|
llm/reasoning
command
Command reasoning asks a reasoning-capable model to think before answering and streams the reasoning and the final answer as separate phases.
|
Command reasoning asks a reasoning-capable model to think before answering and streams the reasoning and the final answer as separate phases. |
|
llm/streaming
command
Command streaming consumes a response as a live event stream instead of waiting for the final message.
|
Command streaming consumes a response as a live event stream instead of waiting for the final message. |
|
llm/tools
command
Command tools runs a streaming tool loop with reasoning: the model thinks, optionally calls a typed tool, sees the result, and continues until it gives a final answer.
|
Command tools runs a streaming tool loop with reasoning: the model thinks, optionally calls a typed tool, sees the result, and continues until it gives a final answer. |
|
Package llm is a unified, provider-neutral API for large language models.
|
Package llm is a unified, provider-neutral API for large language models. |
|
all
Package all registers every built-in protocol adapter into the llm package default registry.
|
Package all registers every built-in protocol adapter into the llm package default registry. |
|
anthropic
Package anthropic implements the Anthropic Messages protocol on top of the official anthropic-sdk-go.
|
Package anthropic implements the Anthropic Messages protocol on top of the official anthropic-sdk-go. |
|
internal/genmodels
command
Command genmodels builds llm's checked-in model catalog from public model catalogs.
|
Command genmodels builds llm's checked-in model catalog from public model catalogs. |
|
internal/jsonx
Package jsonx provides best-effort JSON recovery for model output.
|
Package jsonx provides best-effort JSON recovery for model output. |
Click to show internal directories.
Click to hide internal directories.