A coding agent you can read

Fast, correct, autonomous.
Pick two.

elelem is a coding agent for your terminal. The core is 978 lines of Ruby. Models, tools, and interfaces are plugins, and every one of them is short enough to read.

gem install elelem elelem-builtins
Quickstart
Sessionelelem chat -p ollama
> the date parser drops time zones. find out why and fix it.

  grep  parse_date  lib/
  read  lib/calendar/parser.rb
  edit  lib/calendar/parser.rb
  execute  bundle exec rspec spec/parser_spec.rb
  12 examples, 0 failures

The parser called Time.parse on the date portion only, so the
offset was discarded. It now parses the full string and keeps the zone.

An illustration of a session. Tools shown come from elelem-builtins and elelem-tools.

978lines in the core, comments included
16plugin gems, from providers to a web UI
3ways to run a model on your own machine
1Ruby file is all a plugin needs

Principles

  1. Small enough to read.

    You hand an agent your codebase and a shell. You should be able to read the agent. elelem's core fits in an afternoon: the loop, the conversation, the toolbox, the plugin registry. No framework underneath.

  2. Everything else is a plugin.

    Models, tools, slash commands, even the terminal UI. A plugin is a Ruby file that calls Elelem.configure. Drop it in .agents/plugins/ and it loads. Package it as a gem to share it.

  3. Your model, your machine.

    Use Claude, OpenAI, or Ollama. Or load a GGUF file straight into the elelem process with llama.cpp and keep every token on your laptop. No server, no API key, no network.

  4. Unix at heart.

    elelem chat for a session. elelem ask reads stdin and writes stdout, so it fits in a pipe, a git hook, or a Makefile.

How it fits together

A small loop in the middle. Plugins on every side.

The core sends the conversation to a provider, runs the tools the model asks for, and repeats until the model is done. Everything it talks to is swappable.

How the agent loop works

Plugins

Install what you need. Nothing else.

All 16 plugins

Extend it

A tool is a block of Ruby.

Describe the parameters, return a hash. elelem validates the arguments against the schema, calls your block, and hands the result back to the model. Save the file and start a session.

Write your first tool
.agents/plugins/word_count.rb
Elelem.configure do |config|
  config.setup(:word_count) do |agent|
    agent.toolbox.add("word_count",
                      description: "Count words in a file",
                      params: { path: { type: "string" } },
                      required: ["path"]) do |args|
      { words: File.read(args["path"]).split.size }
    end
  end
end

Guides

From first session to your own provider.

All guides
  1. Your first session Install elelem with the default tools and Ollama, chat with a local model, and ask a one-shot question. Beginner10 minutes, plus the model download
  2. Run elelem fully offline Run a GGUF model inside the elelem process with elelem-llama, with GPU offload and a context size you choose. Intermediate30 minutes, most of it compiling and downloading
  3. Write a tool plugin Add a tool the model can call, in one Ruby file, then package it as a gem. Beginner15 minutes

Start with one command.

gem install elelem elelem-builtins elelem-ollama

Requires Ruby 4.0 or later. Then run elelem chat -p ollama. Installation details