# `Gralkor.Ontology`
[🔗](https://github.com/elimydlarz/jido_gralkor/blob/main/lib/gralkor/ontology.ex#L1)

Declare an entity-and-relationship ontology for graphiti's custom entity
extraction.

A consumer writes:

    defmodule MyOntology do
      use Gralkor.Ontology, entities: :strict, relationships: :scoped

      entity User do
        field :handle,   :string, required: true, doc: "stable login handle"
        field :timezone, :string,                  doc: "IANA tz"
      end

      entity Preference do
        field :description, :string, required: true
      end

      from User do
        prefers Preference do
          field :since, :string, doc: "date first observed"
        end
        trusts User
      end
    end

The macro produces `MyOntology.__ontology__/0` — a payload the Pythonx
layer translates into graphiti's `entity_types`, `edge_types`,
`edge_type_map`, and `excluded_entity_types`. The Elixir side never
constructs Pydantic classes.

See `ex-ontology` and `ex-ontology-payload` in `TEST_TREES.md`.

# `entity`
*macro* 

# `field`
*macro* 

# `from`
*macro* 

# `from_verb_call`
*macro* 

# `from_verb_call`
*macro* 

---

*Consult [api-reference.md](api-reference.md) for complete listing*
