Manage Traits
gnosari_manage_traitsCreate, list, get, update, delete, assign, or remove personality traits.
Traits shape how an agent communicates. Use assign/remove to link traits to an agent.
To change a trait's behavioral instructions, prefer action="update"
with anchored instructions_edits: only the changed span is sent,
everything else stays byte-identical, and the response's
applied[].excerpt shows what landed so no second read is needed.
Pass whole instructions only to write a completely new set.
The usual flow is action="get" (read instructions_version) →
action="update" with expected_version set; every read and write
returns the instructions_version for the next call.
Raises:
ValueError: VALIDATION_ERROR for a malformed call, ANCHOR_NOT_FOUND
or ANCHOR_AMBIGUOUS for an unusable anchor, or CONFLICT for a
stale expected_version.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| name | No | Trait name (create/update) | |
| action | Yes | Action to perform on traits | |
| search | No | Search query (list) | |
| weight | No | Influence weight 0.0-10.0 (create/update) | |
| trait_id | No | Trait ID (get/update/delete) | |
| trait_ids | No | Trait IDs to assign/remove | |
| gnosari_id | No | Agent ID (assign/remove, or create+assign) | |
| is_default | No | Auto-assign this trait to newly created agents in this account (create/update) | |
| description | No | Trait description (create/update) | |
| instructions | No | Behavioral instructions (create/update). On update this REPLACES the whole text — prefer instructions_edits for any change to existing instructions. Never combine the two. A trait's instructions are mandatory: an empty string is refused | |
| confirm_replace | No | Deliberate-overwrite flag. Required when passing 'instructions' would discard more than 2000 stored characters; ignored otherwise | |
| expected_version | No | The instructions_version from your last action="get" (or from the previous update response). Strongly recommended with instructions_edits: if the stored text changed underneath you the call is refused with CONFLICT and nothing is written | |
| instructions_edits | No | Anchored partial edits to a trait's instructions (update) — prefer this over 'instructions' for any change to existing text. Each edit is {op, old, new}, where op is replace/insert_before/insert_after/delete/append/prepend. 'old' is matched exactly, whitespace-significant, and must occur exactly once unless replace_all=True — if it is ambiguous, widen it with surrounding lines. Edits apply in order, all-or-nothing: any failing edit writes nothing and names its index. Never re-send the whole text to change part of it. Maximum 20 per call |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| result | Yes |