# Rules

**Rules are the cornerstone of processing pipelines.** They contain the logic about how to change, enrich, route, and drop messages.

To avoid the complexities of a complete programming language, leona supports a small rule language to express processing logic. The rule language is intentionally limited to allow for easier understanding, faster learning, and better runtime optimization.

The real work of rules is done in *functions*, which are completely pluggable. Leona already ships with a great number of built-in functions, providing data conversion, string manipulation, data retrieval using [lookup tables](/leona/making-sense/enrichment/lookup-tables.md), JSON parsing, and much more.

We expect that special purpose functions will be written and shared by the community, enabling faster innovation and problem-solving than previously possible.


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://ciusji.gitbook.io/leona/making-sense/pipelines/rules.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
