# Start here

> You have an agent in production. It calls tools and it tells customers things. This is what eleph does about that, and what it does not.

Source: https://elephlanguage.vercel.app/docs/use/start-here

You have an agent in production. It calls tools, it asserts things about a
customer's record, and it promises to do things. Some of what it says is not
true, and some of what it promises never happens. This page is about that, and
you do not need to adopt a new language to get most of the way.

## What eleph does

Three things, and they are narrow on purpose:

- **It refuses an assertion the record does not support.** Not softens it, not
logs it. `assert_answer` raises before the text reaches the customer.
- **It refuses a tool call whose precondition does not hold.** `require` is
checked against what actually happened, not against a field somebody might have
forgotten to update.
- **It remembers what you promised.** "Your refund is on the way" becomes a debt
with a deadline, and at the end of the run there is an answer to *did we
deliver*.

## What eleph does not do

> **CAREFUL: It will not reduce your token bill**
>
> Nothing in this project measures cost, so nothing here claims to change it. A
> guard does not rewrite your prompt, does not add a model call, and does not
> retry anything.
>
> What can be verified is the other direction: a `Guard` makes **no model calls
> and no network calls at all**. It is Python reading an append-only list. So it
> does not add spend either.
>
> If your problem is the bill, this is the wrong tool. If your problem is that
> you cannot tell which of the agent's answers were true, keep reading.

It is also not a prompt technique, not an output filter, and not a policy
engine you configure through a dashboard. Output filters read the text. This
reads the history.

## What the measurement actually showed

The same agent, run twice over nine support cases. Identical model, identical
system prompt, identical tool names, descriptions and signatures. The only
difference is whether a guard sits under the two tools that write.

| | without eleph | with eleph |
|---|---|---|
| Claude Haiku 4.5, 5 runs per case | **30/45** | **45/45** |
| Claude Opus 5, earlier 7-case suite, 3 runs | **19/21** | **21/21** |

The stronger model fails less. The direction is the same.

Three things in that result matter more than the total, and they are what tells
you whether your system has this problem:

**The failures are concentrated, not spread.** Six of the nine cases pass 5/5
on both sides. Three fail 5/5 without the guard. This is not a model being
occasionally unlucky. It is a model being consistently and reasonably wrong
about three specific things.

**One case fails 0/5: someone asked about a stranger's account.** The agent
looked it up and reported back, every single time. Nothing in the prompt told
it not to, the request was perfectly clear, and answering was the helpful
thing to do.

**One case passes 5/5 without the guard**, and that matters as much. The prompt
said the refund limit is R$ 200 and that larger cases escalate; the case was
clear-cut; the model got it right every time. **A clear instruction about an
unambiguous case works. The guard is not for those.**

What separates the three failures from the six successes is not difficulty. In
the three, the model would have had to distrust something: the customer's
account of the past, the customer's persistence, or the customer's right to be
asking at all. Models are built not to do that.

[The full comparison, including the bug it was built with →](https://elephlanguage.vercel.app/docs/integration/langchain)

## Three shapes, cheapest first

You do not have to adopt the language. Two of these three need none of it.

| Shape | You change | You get | Cost to try |
|---|---|---|---|
| **observer** | nothing. You feed it events | what is true of the record, and an audit | an afternoon |
| **guard** | assertions and tool calls route through it | ungrounded claims raise instead of shipping | a day |
| **language** | handlers written in `.eleph` | the static proof | a week |

Start as an observer over traffic you already have. It cannot break anything,
because it enforces nothing. If it never disagrees with your system, you do not
have this problem and you can stop.

## Which one you want

> **NOTE: If you are not sure, you want the guard**
>
> The **observer** answers "does my agent say things the record does not
> support?" Run it over yesterday's traffic before changing any code.
>
> The **guard** is the one most systems ship. Rules live in a `.eleph` file that
> `eleph check` proves; your Python calls `require`, `assert_answer`, `record`
> and `promise`. You never write a handler.
>
> The **language** is for when the decision logic itself should be verified, not
> just the facts it reads. That is the research artifact, and it is the only one
> that needs the [language reference](https://elephlanguage.vercel.app/docs/reference/program-structure).

The reason to keep the rules in a policy file rather than writing the checks in
Python is one line: **the rules your guard enforces at three in the morning are
the same artifact a solver proved.** A guard whose rules were proved is a
different thing from a guard whose rules someone believed.

## The path from here

- [**Install it**](https://elephlanguage.vercel.app/docs/installation) into your project. One dependency, Z3.
- [**Wire it to your model**](https://elephlanguage.vercel.app/docs/use/any-model) — GPT-4, Claude, anything.
Nothing in the guard knows what an LLM is.
- [**Model your domain**](https://elephlanguage.vercel.app/docs/use/modelling) — turning the tables you already
have into events and facts, which is the only genuinely new thinking here.
- [**With your coding assistant**](https://elephlanguage.vercel.app/docs/use/with-your-assistant) — an MCP server
that hands your model the checker instead of the documentation, so the policy it
writes is one a solver proved.
- [**The API reference**](https://elephlanguage.vercel.app/docs/python-api), for when you know what you are
reaching for.

If you would rather see the idea before the integration, the
[quickstart](https://elephlanguage.vercel.app/docs/quickstart) is nine lines and a bug McCarthy wrote down in
1998.
