Modules
Declarative self-improving language-model programs for Elixir.
Runs an Imp.Module program behind an Agent Client Protocol endpoint.
A session-bound handle to capabilities supplied by an ACP host.
Local ACP attachment to a long-running application over a private UNIX socket.
Bounded ACP NDJSON transport over a local UNIX stream socket.
Derives an ACP tool kind from the MCP tool annotations a server declares.
Adapter behaviour for rendering prompts and parsing LM outputs.
Plain chat adapter: instructions plus field-labelled user content.
JSON-oriented adapter.
Imp extension adapter that asks the model to plan, then answer.
Concise, strict adapter for programs with exactly one output field.
Faithful port of DSPy 3.2.1 TwoStepAdapter (dspy/adapters/two_step_adapter.py).
Lightweight multimodal and tool-call value structs matching Imp's adapter vocabulary.
An inert audio value backed by in-memory base64 data.
A quoted passage with its source, rendered as the text followed by a
Source: line.
Typed source code used by signature-level code inputs and outputs.
A text document given to the model as its own content part.
An inert file attachment or pre-uploaded provider file reference.
Provider chat messages placed in a request as they are.
An inert image value backed by a remote reference or in-memory data.
Provider-native or prompt-generated reasoning with one stable value shape.
Provider-native tool call value with stable id, name, and arguments.
Collection of provider-native tool results.
Collection of provider-native tool calls.
Provider-native result for a previous tool call.
A wrapper that renders as the value it holds: to_openai/1 of a Type
is to_openai/1 of its value.
XML adapter with DSPy's field dialect and current output-completion contract.
A completion that could not be read as the signature's outputs.
Named runtime constraint for Imp predictions.
Small ETS-backed cache for Imp's configurable cache concept.
Runtime capability checks for provider features that cannot be inferred safely.
Databricks training job contract.
Provider trainer that submits finetuning data to HTTP APIs.
Supervised local serving for a verified fused MLXLMTrainer artifact.
Optional synchronous SFT backend for a pinned local MLX-LM model snapshot.
OpenAI fine-tuning job client.
Provider-neutral, explicit state for an iterative reinforcement training job.
Imp LM client backed by the Elixir req_llm ecosystem.
Provider-neutral, bounded, resumable execution for durable LM batches.
Content verification for artifacts produced through the Imp↔TRL protocol.
Runs a verified TRL LoRA artifact through a caller-supplied trusted runtime.
Local causal-LM view of the model owned by a running TRLTrainer session.
Local, process-supervised TRL reinforcement backend.
Behaviour for provider-specific training backends.
Provider-neutral finetuning or reinforcement-training job.
Confidence-aware evaluation for enum-constrained JSON classification.
Held-out reliability analysis for raw constrained-label confidence.
Source-faithful scoring strategies for correctness and joint token logprob.
Linear interpolation below a raw-confidence threshold.
Smooth sigmoid over raw confidence for correct answers.
Binary correctness gated by a raw-confidence threshold.
Provider-neutral LM messages and request/response values.
Assistant message content plus any normalized tool calls.
Developer instruction message for providers that support that role.
Provider-neutral LM generation configuration.
Provider-neutral LM request: messages, generation config, and metadata.
Provider-neutral LM response: normalized outputs, usage, cost, and raw data.
Generic provider-neutral message with role, content, and metadata.
System message content for provider-neutral LM requests.
User message content for provider-neutral LM requests.
Local dataset loaders for examples, JSONL, CSV, GSM8K, HotPotQA, MATH, and Colors records.
Simple color dataset helper.
Loader facade for JSONL/CSV records.
Dataset container with train/dev/test splits.
Raised by a file loader for a file it cannot read or a record it cannot
parse: path is the file, line the line number when there is one, and
record the value that could not be read.
GSM8K-style JSONL dataset loader.
HotPotQA-style JSONL dataset loader.
MATH-style JSONL dataset loader.
Process-scoped absolute deadlines for cooperative time budgets.
Embedding behaviour plus deterministic local bag-of-words embeddings.
Deterministic hashing bag-of-words embedder.
Raised by a function whose name ends in ! when the call ran and failed.
Reads the failure classes callers act on, through the wrappers Imp puts around an error.
Evaluate a program against examples and a metric.
LM-backed completeness and groundedness metric.
Evaluation result with aggregate score, per-example rows, and call errors.
LM-backed semantic precision/recall metric with deterministic F1 scoring.
Raised when an evaluation halts because :max_errors was reached.
Flexible row of named data used for train/dev/test sets.
Explicit, protocol-neutral capabilities for one program execution.
A protocol-neutral request to authorize one validated tool effect.
One public, fail-closed optimize/select/test lifecycle.
Canonical, non-secret runtime and provenance bootstrap for Imp experiments.
Disjoint train, selection, and untouched-test data for Imp.Experiment.check/5.
Durable result of a fail-closed Imp.Experiment.check/5 lifecycle.
Runs an executable with argv through Imp's shared process-group lifecycle.
A supervised external process group managed by Imp.ExternalCommand.
Public constructors and evaluators for GEPA candidate acceptance policies.
Public behaviour for trusted custom GEPA reflection strategies.
Small injectable HTTP boundary used by provider clients.
Immutable conversation history for signature-shaped Imp programs.
Behaviour for language model clients.
An LM decorator that enforces an Imp.Optimizer.Budget before transport.
Canonical boundary between LM output and provider metadata.
Deterministic local LM for examples, tests, and offline workflows.
A language-model request the provider did not answer with a completion.
Extracts joint token logprob for one enum-constrained JSON field.
An MCP tool call that got no answer from its tool.
Opens explicitly authorized MCP servers through ExMCP and imports their tools.
An owned remote tool catalog; cleanup closes its connections.
Browser-authorized OAuth credentials for remote HTTP MCP servers.
One authorization in progress.
Where a host keeps MCP OAuth credentials and what protects them.
Metrics for evaluation, selection, and optimization.
Normalized metric result with numeric score, pass/fail flag, feedback, and metadata.
Behaviour and safe dispatcher for executable Imp programs.
Public inspection, optimizer progress, and Imp-scoped logging controls.
A deterministic, redacted debugging snapshot, as returned by
Imp.Observability.inspect_artifact/2.
Handle returned by Imp.Observability.subscribe_optimizer/1.
Normalized status for long-running Imp work.
Result and ordered, redacted telemetry events captured by Imp.trace/2.
Marks a fail-closed operational error from a guarded LM or program call.
Optimizes text, named text components, and JSON-safe structured artifacts against evaluator feedback.
Immutable Optimize Anything result projected from the GEPA engine.
A checkpoint-safe mutation strategy for native structured Optimize Anything artifacts.
Canonical execution contract for program and training optimizers.
Durable champion/challenger lifecycle for portable optimizer outputs.
Rewrites Avatar actor instructions from positive and negative trajectories.
Evaluate-and-select meta-optimizer for prompt and weight optimization sequences.
DSPy-compatible bootstrap few-shot compilation.
DSPy 3.2.1 BootstrapFewShotWithRandomSearch, which DSPy also exports as
BootstrapRS.
Builds SFT jobs from successful, predictor-attributed teacher traces.
Prospective request, token, and cost limits for live optimizer work.
DSPy 3.2.1 coordinate prompt optimizer.
A program-owned description of one optimizable component.
Compile multiple programs into an ensemble program.
Program-level GEPA optimizer for Imp programs.
Stateful minibatch selection for GEPA.
Synchronous, observational callbacks for GEPA optimization.
Provider-neutral, iterative module-level mmGRPO compilation.
Stable, data-only callback identity for resumable GRPO jobs.
Induces natural-language rules from observed examples and selects them on a validation set.
LM-backed instruction proposal engine shared by prompt optimizers.
Search over candidate signature instructions and keep the best program.
Faithful port of DSPy 3.2.1 KNNFewShot (dspy/teleprompt/knn_fewshot.py).
Compile a program by attaching labeled examples as demonstrations.
Joint instruction and few-shot optimization using grounded proposals and categorical TPE.
A bounded, data-only optimizer parameter.
A replace-only parameter change guarded by the source content digest.
Immutable parameter state with playbook-style revision lineage.
Bounded optimization for persistent Imp.Playbook parameters.
Optimizer candidate history and diagnostic metadata.
Stochastic Introspective Mini-Batch Ascent over arbitrary Imp programs.
Deterministic sampling helpers for optimizers.
Optimizes one program signature instruction while leaving demonstrations unchanged.
Terminal training failure with the unrebound program and provider diagnostics.
Adopts a verified, already-completed Imp.Clients.TrainingJob as a workflow step.
Result of a training optimizer executed through Imp.train/4.
Versioned, provider-neutral execution envelope shared by all optimizers.
Evaluates examples into ordered, provider-neutral optimizer trajectories.
Provider-independent, immutable instructions with transactional evolution.
An ordered, atomic set of playbook operations with optional optimistic guards.
An immutable, normalized playbook entry with a stable identity and hash chain.
Adds one normalized entry.
Replaces two or more entries and tombstones every source entry.
Removes an entry while retaining a provenance tombstone.
Revises an entry while retaining its ID and linking to its prior hash.
Atomically increments an entry's helpful and harmful counters.
Hard limits and admission rules for a Imp.Playbook.
Bounded references to stable source identities and SHA-256 digests.
Removal and merge provenance retained in a playbook's hash chain.
Executes a program with active playbook guidance appended to every predictor.
Basic Imp program that maps signature inputs to typed outputs with an LM.
Aggregation helpers for multiple predictions or raw values.
Wraps an Imp program with assertion-guided self-refinement.
BEAM-native Avatar actor with typed actions and bounded tool execution.
Run a program multiple times and keep the prediction with the highest metric score.
Predict variant that asks for a :reasoning field before task outputs.
CodeAct-style module backed by Imp.Sandbox and explicit tool iterations.
An embedding-based nearest-neighbor retriever over a trainset, with the same
query and ranking semantics as DSPy 3.2.1 KNN.
Compare several candidate completions and ask a predictor for the final output.
Run a program across many inputs concurrently through a supervised BEAM task boundary.
Generates and executes a small BEAM-safe program, regenerating failed code.
Retrieval-augmented program wrapper.
Recursive Language Model module.
Lazy value handle for RLM variable-space exploration.
ReAct agent with two distinct contracts, selected by :mode.
Native-tool-aware ReAct loop with structured history and typed completion.
Iteratively call a program until a metric passes or attempts are exhausted.
Executes a bounded candidate search owned by one inference request.
Structured output from an Imp program.
Named optimizer lenses and typed parameter snapshots for Imp programs.
Shared redaction helpers for traces, telemetry, and runtime metadata.
Retriever behaviour and dispatch boundary for RAG-style Imp programs.
Token-overlap in-memory retriever for deterministic local workflows.
Databricks Vector Search retriever.
Generic HTTP retriever with injectable transport and response mapping.
Weaviate GraphQL retriever.
An addressable execution of an Imp program with ordered semantic events.
A single ordered, protocol-neutral execution event.
BEAM-safe expression sandbox for Program-of-Thought style code.
JSON save/load helpers for portable program state.
Immutable allowlist of named callbacks used to rebind portable program artifacts.
Schema constraints, validation, JSON Schema export, and retry feedback.
OTP-backed global settings with process-local overrides.
Input/output contract for an Imp program.
Metadata and construction rules for one signature field.
Raised when a signature string cannot be parsed.
Enumerable-friendly streaming helpers.
Streaming message structs for Imp's public streaming vocabulary.
Status event emitted by a streaming workflow.
Incremental, transparent stream observer.
One normalized stream event.
Tasks that carry the caller's Imp context.
Small telemetry boundary for Imp runtime events.
Tool definition for ReAct-style programs and supervised Elixir workflows.
The :tool_policy option of the tool-using programs (Imp.Predict.ReActV2,
Imp.Predict.ReAct, Imp.Predict.RLM, Imp.Predict.CodeAct,
Imp.Predict.Avatar): which of their tools the model may call.
Lifecycle contract implemented by experiment tracking backends.
MLflow tracking backend implemented over the official HTTP API.
Ordered, caller-owned fan-out across tracking backends.
HTTP boundary used by tracking backends.
Req-backed tracking transport.
Isolated client for the W&B 0.21.x run protocol.
Deterministically materializes Imp examples as MLX-LM chat JSONL.
Question-level rollout group with normalized training advantages.
Provider-neutral effects required by the Fast-Slow Algorithm 1 runner.
Named immutable limits and accumulated usage for a training run.
Portable trajectory retained for exact rollout reuse.
Versioned, checksummed persistence for Fast-Slow training state.
Immutable, credential-free configuration for Fast-Slow training runs.
Deterministic dataset cursor, epoch, and random-state snapshot.
Ordered durable operation event emitted by the Fast-Slow runner.
Prefetched minibatch window and deterministic dataset progress.
Durable intent and reconciliation state for one provider effect.
Bounded prompt population used by the fast adaptation phase.
Validated cache of portable rollout trajectories keyed by identity.
One verified slow-training rollout with token and reward provenance.
Executes the orchestration order of Algorithm 1 from "Learning, Fast and Slow" without binding to a provider.
Runtime-only backend and prefetched dataset context for a runner step.
Validated durable state for the Fast-Slow training state machine.
Terminal reason and details for a completed or stopped run.
Immutable policy parameter identity and lineage node.
ATIF-v1.8 projection of ordered native Imp.Run.Event observations.
Per-prediction LM usage ledger.