English

Product LaunchesImp

Imp Brings DSPy-style Declarative LLM Programming to Elixir

Imp, a full port of the DSPy framework to the BEAM, has been released as an experimental library for Elixir. The library allows developers to create declarative, self-improving language-model programs by describing required input and output signatures rather than writing manual prompts or parsers.

By using Imp, LLM calls are treated as declared, typed functions that can be measured and optimized. The library utilizes optimizers such as GEPA, which can reflect on agent runs and rewrite instructions to improve performance against provided examples. Other available optimizers include LabeledFewShot, BootstrapFewShot, MIPROv2, and SIMBA.

Built for the Elixir ecosystem, Imp enables agents to run as OTP processes. This allows for high reliability and concurrency, where agents can maintain their own state, receive messages, and run under supervisors alongside other application components.

The library includes features like Imp.chain_of_thought/2 for reasoning and Imp.react/3 for tool use. It requires Elixir 1.19 or later and a C/C++ compiler for certain dependencies. As of version 0.5, the library is experimental and the API is subject to change.

Sources

  1. Imp is a full port of DSPy to the BEAM (Hacker News Frontpage, 2026-09-27)