API Reference Puck v#0.2.8

View Source

Modules

Puck - An AI framework for Elixir.

Behaviour for LLM backend implementations.

Backend implementation using BAML for structured outputs.

Backend implementation using the Claude Agent SDK.

Mock backend for testing.

Backend implementation using the ReqLLM library.

Built-in BAML functions shipped with Puck.

Configuration struct for an LLM client.

Behaviour for context compaction strategies.

Sliding window compaction strategy.

LLM-based summarization compaction strategy.

Multi-modal content for messages.

A single content part within a message.

Protocol for converting content to Puck.Content.Part structs.

Conversation context with message history and metadata.

Evaluation primitives for testing agents built on Puck.

Captures trajectory from agent execution via telemetry.

Behaviour for evaluation graders.

Built-in graders for common evaluation patterns.

LLM-as-judge graders for subjective evaluation.

Debugging tools for trajectories and evaluation results.

Aggregates grader results from an evaluation.

Represents a single LLM call within a trajectory.

Captures what happened during an agent execution.

Multi-trial execution for measuring agent reliability and consistency.

Summary of multi-trial evaluation results.

Behaviour for lifecycle hooks.

A single message in a conversation.

Behaviour for prompt template engines.

Compile-time validated prompt template sigils.

Solid (Liquid) template engine for prompts.

A sandbox-aware HTTP proxy with domain allowlisting and credential injection.

Normalized response struct for LLM outputs.

Sandbox execution environments for isolated code execution.

In-process code evaluation in sandboxed interpreters.

Execute Lua code in a sandboxed environment.

Struct for LLM-generated Lua code execution actions.

Container-based sandbox management for isolated code execution.

Behaviour for runtime sandbox adapters.

In-memory test adapter for Puck.Sandbox.Runtime.

Struct representing the result of executing a command in a sandbox.

Struct representing a runtime sandbox instance.

Reusable sandbox configuration template.

Telemetry integration for observability.