The agent harness for Ruby applications.

watch it work ↓
demos

Watch it work.

Five short recordings of real runs, replayed in the browser. No model behind them, so click around as much as you like.

quickstart

A tool-using agent in one file.

Define a tool, hand it to an agent, stream the run. The block gets every event as it happens.

weather.rb
require "mistri"
weather = Mistri::Tool.define(
"get_weather", "Current weather for a city.",
schema: -> { string :city, "City name", required: true },
) do |args|
Weather.for(args["city"])
end
agent = Mistri.agent("claude-opus-4-8", tools: [weather])
agent.run("What should I wear in Lahore today?") do |event|
print event.delta if event.type == :text_delta
end
capabilities

What it handles.

The parts you would otherwise build and babysit yourself. Every panel is the real API, not pseudocode.

approval.rb
send_gift = Mistri::Tool.define(
"send_gift", "Sends a real gift.",
needs_approval: ->(args) { args["amount"].to_i > 100 },
) { |args| Gifts.send!(args) }
result = agent.run("Send Ana a $200 gift")
result.awaiting_approval? # => true, nothing executed
# Days later, from a controller, then a worker:
session.approve(call_id)
agent.resume
get started

Put a mistri in your app.