News ·
Imp is a full port of DSPy to the BEAM
Imp is an experimental Elixir port of DSPy that brings declarative, self-improving language-model programs to the BEAM, with typed signatures, optimizers, and supervised OTP agent processes.
Imp is a full port of DSPy to the BEAM, offering declarative, self-improving language-model programs for Elixir. Instead of writing prompts and parsers, you describe what each model step takes and returns using signatures; Imp builds the prompt, validates replies against it, and returns typed fields or an error. Reasoning or tool use can be added with Imp.chain_of_thought/2 or Imp.react/3 without changing the signature.
Programs are improved by optimizers: you provide labeled trainset, valset, and testset lists plus a metric, and GEPA reads failures to rewrite instructions, while other optimizers include LabeledFewShot, BootstrapFewShot, MIPROv2, SIMBA, and fine-tuning with GRPO. Optimized programs remain readable and can be saved as JSON and reviewed as diffs. Tools are plain Elixir functions, agents are OTP processes that keep state and run under supervisors, and Imp.start_run/3 runs programs as supervised processes with deadlines and no silent retries of side-effecting tool calls. It also supports MCP tool import, ACP serving to clients like Zed, RLM for oversized inputs, and CodeAct-style sandboxed computation.
Imp 0.14 is experimental: its API may change and its optimizers need large-scale benchmarking. It requires Elixir 1.19 or later, a C/C++ compiler (for jaxon and erlexec), network access on first compile, and reaches models through ReqLLM, so any provider ReqLLM supports works. For builders in the Elixir ecosystem, it offers DSPy-style measured, optimizable LLM programs with OTP's supervision and concurrency as the substrate.
References
- Hacker News · github.com
Read the full story at Hacker News ↗Like, save or discuss on Buzz


