Define or change an entity
define_entityCreates or updates a personal knowledge entity, adds typed columns for facts to count or filter, and deletes it when needed.
Instructions
Create an entity in the personal knowledge store (a Term with its own table), add columns to it as you learn more, or delete it. Column types: text, integer, number, date, datetime, boolean, ref: (a link that becomes a relationship). Every record also gets id, _source_id, _source_locator, _evidence, _note and timestamps.
Storing knowledge (Auto Ontology's model applied to personal knowledge):
Reuse before you create: search_ontology for the thing first. One Term per real-world kind of thing, named in the singular as people say it (Receipt, Book, Person, Workout).
Entities hold facts you will count, sum, filter or compare. Give columns snake_case English names and the right type (text, integer, number, date, datetime, boolean, ref:). Put the unit in the name or description (amount_krw, distance_km). Use ref columns for things that recur (merchant, author, place) instead of repeating text; add_records creates the referenced rows by name. Set keys when a natural identifier exists (isbn, receipt_no) so re-ingesting updates instead of duplicating.
Concepts hold meaning: a one-sentence definition, a markdown body (what it is, how it works, examples, open questions) and typed relations: is_a, part_of, has_part, instance_of, related_to, depends_on, causes, used_for, contrasts_with, same_as, example_of. A Term can be both: an entity with records and a body that explains it.
Provenance on everything: pass source={title, kind, uri, ...} (or a source id) and, per record, _locator (page, timestamp, line) and _evidence (the quote or number as written).
Never invent values. Leave unknown fields out; record ambiguity in _note.
Certified means a person confirmed it. New knowledge is draft; do not certify on your own.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| keys | No | Columns that identify a record (e.g. ['isbn']); re-adding updates it. | |
| name | Yes | Entity (Term) name, singular, e.g. 'Receipt', 'Book', '운동 기록'. | |
| force | No | Allow deleting an entity that still has records. | |
| table | No | snake_case table name; required when the name is not English. | |
| delete | No | Delete the entity (and, with force, its records). | |
| columns | No | Columns to create or add. Existing columns keep their type. | |
| synonyms | No | Other names, e.g. the user's language. | |
| description | No | What one record is. |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||