crv.core.schema
Experimental API
crv.core.schema
Pydantic v2 models for core payloads, decisions, context/persona/affect, and row schemas. Validators normalize fields to canonical lower_snake using grammar helpers and enforce cross-field combination rules (notably for identity_edges).
Responsibilities - Define the canonical Pydantic models for payloads, decisions, context/persona/affect, and rows. - Normalize enum-like strings to lower_snake via grammar helpers. - Enforce cross-field combination rules and value ranges (e.g., IdentityEdgeRow). - Provide docstrings with Table mappings and, where applicable, Math mapping examples.
Style - Zero-IO (stdlib + pydantic only). - Google-style docstrings with sections such as Attributes, Args, Returns, Raises, Examples, and Notes. - Row models include “Table mappings” and, where relevant, a “Math mapping” under Notes.
References - specs: src/crv/core/.specs/spec-0.1.md, spec-0.2.md - grammar: src/crv/core/grammar.py (enums, EBNF, normalization helpers) - errors: src/crv/core/errors.py (SchemaError, GrammarError) - tests: tests/core/*
crv.core.schema.Utterance
Bases: pydantic.BaseModel
Textual utterance structure used by messaging channels.
Attributes:
| Name | Type | Description |
|---|---|---|
act |
str
|
Speech act label. |
topic |
str
|
Topic label. |
stance |
str | None
|
Optional stance label. |
claims |
list[dict[str, typing.Any]]
|
Structured claim list (free-form schema). |
style |
dict[str, typing.Any]
|
Rendering or rhetorical style. |
audience |
list[str]
|
Target audience hints. |
Notes
Field names are lower_snake; free-form strings are kept verbatim.
Examples:
>>> from crv.core.schema import Utterance
>>> Utterance(act="say", topic="token_alpha", stance=None)
Source code in src/crv/core/schema.py
crv.core.schema.Utterance.model_config
class-attribute
instance-attribute
crv.core.schema.Utterance.claims
class-attribute
instance-attribute
crv.core.schema.Utterance.style
class-attribute
instance-attribute
crv.core.schema.Interpretation
Bases: pydantic.BaseModel
Agent’s interpretation of an event.
Attributes:
| Name | Type | Description |
|---|---|---|
event_type |
str
|
Interpreted event kind label. |
targets |
list[str]
|
Target identifiers (agents/tokens). |
inferred |
dict[str, typing.Any]
|
Derived attributes (free-form). |
salience |
float
|
Perceived salience in [0, 1]. |
Raises:
| Type | Description |
|---|---|
pydantic.ValidationError
|
If salience is outside [0, 1]. |
Examples:
>>> from crv.core.schema import Interpretation
>>> Interpretation(event_type="endorsement", targets=["agent_j"], salience=0.7)
Source code in src/crv/core/schema.py
crv.core.schema.Interpretation.model_config
class-attribute
instance-attribute
crv.core.schema.Interpretation.targets
class-attribute
instance-attribute
crv.core.schema.Interpretation.inferred
class-attribute
instance-attribute
crv.core.schema.AppraisalVector
Bases: pydantic.BaseModel
Psychological appraisals used by value readout.
Attributes:
| Name | Type | Description |
|---|---|---|
valence |
float
|
In [0, 1]. |
arousal |
float
|
In [0, 1]. |
certainty |
float
|
In [0, 1]. |
novelty |
float
|
In [0, 1]. |
goal_congruence |
float
|
In [0, 1]. |
Notes
Components correspond to scalar channels used in bounded valuation V(token).
Raises:
| Type | Description |
|---|---|
pydantic.ValidationError
|
If any component is outside [0, 1]. |
Source code in src/crv/core/schema.py
crv.core.schema.AppraisalVector.model_config
class-attribute
instance-attribute
crv.core.schema.AppraisalVector.valence
class-attribute
instance-attribute
crv.core.schema.AppraisalVector.arousal
class-attribute
instance-attribute
crv.core.schema.AppraisalVector.certainty
class-attribute
instance-attribute
crv.core.schema.AppraisalVector.novelty
class-attribute
instance-attribute
crv.core.schema.GraphEdit
Bases: pydantic.BaseModel
Canonical graph edit instruction applied to the agent's identity/affect representation.
Attributes:
| Name | Type | Description |
|---|---|---|
operation |
str
|
One of: {"set_identity_edge_weight","adjust_identity_edge_weight","decay_identity_edges","remove_identity_edge"}. |
edge_kind |
str
|
RepresentationEdgeKind serialized value (lower_snake). |
subject_id |
str | None
|
Subject agent identifier (when applicable). |
object_id |
str | None
|
Object/other agent identifier (when applicable). |
related_agent_id |
str | None
|
Related agent identifier for agent-pair cases. |
token_id |
str | None
|
Token identifier (when applicable). |
new_weight |
float | None
|
New weight for set operations. |
delta_weight |
float | None
|
Delta for adjust operations. |
scope_selector |
str | None
|
Selector used for decay scope (implementation-defined). |
decay_lambda |
float | None
|
Decay factor in [0, 1]. |
Raises:
| Type | Description |
|---|---|
crv.core.errors.GrammarError
|
If operation or edge_kind is invalid or not lower_snake. |
pydantic.ValidationError
|
If decay_lambda is outside [0, 1]. |
Examples:
- Token–token association: {"operation": "set_identity_edge_weight", "edge_kind": "object_to_object", "subject_id": "TokenA", "object_id": "TokenB", "new_weight": 0.75}
- Positive valence trace: {"operation": "adjust_identity_edge_weight", "edge_kind": "object_to_positive_valence", "token_id": "TokenX", "delta_weight": 0.10}
- Negative valence trace: {"operation": "adjust_identity_edge_weight", "edge_kind": "object_to_negative_valence", "token_id": "TokenX", "delta_weight": -0.05}
- Agent friend channel (positive): {"operation": "adjust_identity_edge_weight", "edge_kind": "agent_to_positive_valence", "subject_id": "AgentJ", "delta_weight": 0.20}
- Self positive anchor: {"operation": "set_identity_edge_weight", "edge_kind": "self_to_positive_valence", "new_weight": 0.80}
Source code in src/crv/core/schema.py
160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 | |
crv.core.schema.GraphEdit.model_config
class-attribute
instance-attribute
crv.core.schema.GraphEdit.subject_id
class-attribute
instance-attribute
crv.core.schema.GraphEdit.related_agent_id
class-attribute
instance-attribute
crv.core.schema.GraphEdit.new_weight
class-attribute
instance-attribute
crv.core.schema.GraphEdit.delta_weight
class-attribute
instance-attribute
crv.core.schema.GraphEdit.scope_selector
class-attribute
instance-attribute
crv.core.schema.RepresentationPatch
Bases: pydantic.BaseModel
Container for graph edits applied at the t+1 barrier.
Attributes:
| Name | Type | Description |
|---|---|---|
edits |
list[crv.core.schema.GraphEdit]
|
Ordered list of canonical graph edits. |
energy_delta |
float | None
|
Optional diagnostic indicating BIT energy change. |
Notes
Groups canonical GraphEdit operations that, when applied by the world barrier, mutate the unified identity/affect representation.
Examples:
>>> from crv.core.schema import GraphEdit, RepresentationPatch
>>> patch = RepresentationPatch(
... edits=[
... GraphEdit(operation="set_identity_edge_weight",
... edge_kind="object_to_object",
... subject_id="TokenA", object_id="TokenB",
... new_weight=0.75),
... GraphEdit(operation="adjust_identity_edge_weight",
... edge_kind="object_to_positive_valence",
... token_id="Alpha", delta_weight=0.1),
... ]
... )
>>> len(patch.edits)
2
Source code in src/crv/core/schema.py
crv.core.schema.RepresentationPatch.model_config
class-attribute
instance-attribute
crv.core.schema.RepresentationPatch.edits
class-attribute
instance-attribute
crv.core.schema.ActionCandidate
Bases: pydantic.BaseModel
One scored action option with explicit parameters.
Attributes:
| Name | Type | Description |
|---|---|---|
action_type |
str
|
Known ActionKind serialized value (lower_snake). |
parameters |
dict[str, typing.Any]
|
Typed payload for the action (e.g., {"agent_id": "..."}). |
score |
float
|
Unnormalized score/logit used by the decision sampler. |
key |
str
|
Compact, human-friendly label; program logic MUST NOT parse this. |
Raises:
| Type | Description |
|---|---|
crv.core.errors.GrammarError
|
If action_type is not lower_snake or not a known ActionKind. |
Examples:
>>> from crv.core.schema import ActionCandidate
>>> cand = ActionCandidate(
... action_type="acquire_token",
... parameters={"agent_id": "i001", "token_id": "Alpha", "quantity": 1},
... score=1.23,
... key="acquire_token:token_id=Alpha",
... )
>>> cand.action_type
'acquire_token'
Source code in src/crv/core/schema.py
crv.core.schema.ActionCandidate.model_config
class-attribute
instance-attribute
crv.core.schema.ActionCandidate.parameters
class-attribute
instance-attribute
crv.core.schema.DecisionHead
Bases: pydantic.BaseModel
Decision head output for an agent at a tick.
Attributes:
| Name | Type | Description |
|---|---|---|
token_value_estimates |
dict[str, float]
|
Estimated bounded valuation per token. |
action_candidates |
list[crv.core.schema.ActionCandidate]
|
Candidate actions and scores. |
abstain |
bool
|
Whether the agent abstains this tick. |
temperature |
float
|
Sampling temperature for decision. |
Notes
token_value_estimates[token_id] ≈ V_agent(token) used to rank actions.
Examples:
>>> from crv.core.schema import DecisionHead, ActionCandidate
>>> DecisionHead(action_candidates=[ActionCandidate(action_type="acquire_token", parameters={}, score=0.2, key="k")])
Source code in src/crv/core/schema.py
crv.core.schema.DecisionHead.model_config
class-attribute
instance-attribute
crv.core.schema.DecisionHead.token_value_estimates
class-attribute
instance-attribute
crv.core.schema.DecisionHead.action_candidates
class-attribute
instance-attribute
crv.core.schema.ScenarioContext
Bases: pydantic.BaseModel
Observer-centric scenario context snapshot used for valuation and decisions.
Attributes:
| Name | Type | Description |
|---|---|---|
token_id |
str | None
|
Optional token identifier. |
owner_status |
str | None
|
Ownership status label. |
peer_alignment_label |
str | None
|
Peer alignment label. |
group_label |
str | None
|
Group label. |
visibility_scope |
str | None
|
Normalized to {'public','group','room','dm'}. |
channel_name |
str | None
|
Channel name (e.g., "group:G1"). |
salient_agent_pairs |
list[dict[str, typing.Any]]
|
Salient agent pairs. |
exchange_snapshot |
dict[str, typing.Any]
|
Snapshot of exchange info (may include baseline_value). |
recent_affect_index |
float | None
|
Recent affect index scalar. |
salient_other_agent_id |
str | None
|
Salient other agent for this context. |
Raises:
| Type | Description |
|---|---|
crv.core.errors.GrammarError
|
On invalid visibility_scope. |
Notes
visibility_scope is normalized via grammar.normalize_visibility. exchange_snapshot.baseline_value corresponds to B_token(t) when emitted by a venue.
Source code in src/crv/core/schema.py
crv.core.schema.ScenarioContext.model_config
class-attribute
instance-attribute
crv.core.schema.ScenarioContext.token_id
class-attribute
instance-attribute
crv.core.schema.ScenarioContext.owner_status
class-attribute
instance-attribute
crv.core.schema.ScenarioContext.peer_alignment_label
class-attribute
instance-attribute
crv.core.schema.ScenarioContext.group_label
class-attribute
instance-attribute
crv.core.schema.ScenarioContext.visibility_scope
class-attribute
instance-attribute
crv.core.schema.ScenarioContext.channel_name
class-attribute
instance-attribute
crv.core.schema.ScenarioContext.salient_agent_pairs
class-attribute
instance-attribute
crv.core.schema.ScenarioContext.exchange_snapshot
class-attribute
instance-attribute
crv.core.schema.ScenarioContext.recent_affect_index
class-attribute
instance-attribute
crv.core.schema.Persona
Bases: pydantic.BaseModel
Persona descriptor used to parameterize agent behavior.
Attributes:
| Name | Type | Description |
|---|---|---|
persona_id |
str
|
Stable identifier for the persona. |
label |
str
|
Human-readable label. |
traits |
dict[str, typing.Any]
|
Free-form trait mapping used by downstream modules. |
Source code in src/crv/core/schema.py
crv.core.schema.Persona.model_config
class-attribute
instance-attribute
crv.core.schema.AffectState
Bases: pydantic.BaseModel
Coarse affect state bounded to [0, 1].
Attributes:
| Name | Type | Description |
|---|---|---|
valence |
float
|
In [0, 1]. Defaults to 0.5. |
arousal |
float
|
In [0, 1]. Defaults to 0.5. |
stress |
float
|
In [0, 1]. Defaults to 0.0. |
Source code in src/crv/core/schema.py
crv.core.schema.AffectState.model_config
class-attribute
instance-attribute
crv.core.schema.AffectState.valence
class-attribute
instance-attribute
crv.core.schema.AffectState.arousal
class-attribute
instance-attribute
crv.core.schema.EventEnvelopeRow
Bases: pydantic.BaseModel
Envelope capturing scheduled actions or derived observations.
Attributes:
| Name | Type | Description |
|---|---|---|
time_created |
int
|
Time created. |
scheduled_step |
int
|
Scheduled step. |
envelope_kind |
str
|
One of {"action","observation"}. |
actor_agent_id |
str | None
|
Actor agent id. |
observer_agent_id |
str | None
|
Observer agent id. |
channel_name |
str | None
|
Channel name. |
visibility_scope |
str | None
|
One of {'public','group','room','dm'}. |
payload |
crv.core.typing.JsonDict
|
Payload dictionary. |
origin |
crv.core.typing.JsonDict
|
Origin metadata. |
status |
str
|
One of {"pending","executed","rejected"}. |
Raises:
| Type | Description |
|---|---|
crv.core.errors.GrammarError
|
For invalid envelope_kind/status/visibility. |
Notes
Logical staging structure; not a persisted table descriptor here. Downstream IO layers may map to event logs. visibility_scope is normalized via grammar.normalize_visibility (if present).
Source code in src/crv/core/schema.py
487 488 489 490 491 492 493 494 495 496 497 498 499 500 501 502 503 504 505 506 507 508 509 510 511 512 513 514 515 516 517 518 519 520 521 522 523 524 525 526 527 528 529 530 531 532 533 534 535 536 537 538 539 540 541 542 543 544 545 546 547 548 549 550 551 552 553 554 555 556 557 558 559 560 561 562 563 564 565 566 567 568 569 570 571 572 573 574 575 576 577 578 579 580 581 582 583 584 585 | |
crv.core.schema.EventEnvelopeRow.model_config
class-attribute
instance-attribute
crv.core.schema.EventEnvelopeRow.actor_agent_id
class-attribute
instance-attribute
crv.core.schema.EventEnvelopeRow.observer_agent_id
class-attribute
instance-attribute
crv.core.schema.EventEnvelopeRow.channel_name
class-attribute
instance-attribute
crv.core.schema.EventEnvelopeRow.visibility_scope
class-attribute
instance-attribute
crv.core.schema.EventEnvelopeRow.payload
class-attribute
instance-attribute
crv.core.schema.EventEnvelopeRow.origin
class-attribute
instance-attribute
crv.core.schema.MessageRow
Bases: pydantic.BaseModel
Communication events emitted by agents.
Attributes:
| Name | Type | Description |
|---|---|---|
tick |
int
|
Tick at which the message is emitted. |
sender_agent_id |
str
|
Sender agent id. |
channel_name |
str
|
Channel name (e.g., "group:G1"). |
visibility_scope |
str
|
One of {'public','group','room','dm'}. |
audience |
typing.Any
|
Structured audience payload. |
speech_act |
str
|
Speech act label. |
topic_label |
str
|
Topic label. |
stance_label |
str | None
|
Optional stance label. |
claims |
typing.Any
|
Structured claims payload. |
style |
typing.Any
|
Rhetorical/formatting style. |
Raises:
| Type | Description |
|---|---|
crv.core.errors.GrammarError
|
On invalid visibility. |
Notes
Table mappings: messages (see tables.MESSAGES_DESC). visibility_scope is normalized via grammar.normalize_visibility.
Source code in src/crv/core/schema.py
crv.core.schema.MessageRow.model_config
class-attribute
instance-attribute
crv.core.schema.MessageRow.stance_label
class-attribute
instance-attribute
crv.core.schema.MessageRow.claims
class-attribute
instance-attribute
crv.core.schema.ExchangeRow
Bases: pydantic.BaseModel
Generalized ownership/exchange events (beyond finance).
Attributes:
| Name | Type | Description |
|---|---|---|
tick |
int
|
Tick at which the event occurs. |
venue_id |
str
|
Venue identifier. |
token_id |
str
|
Token identifier. |
exchange_event_type |
str
|
Exchange kind (lower_snake). |
side |
str | None
|
One of {"buy","sell"}. |
quantity |
float | None
|
Quantity transacted. |
price |
float | None
|
Price. |
actor_agent_id |
str | None
|
Actor agent id. |
counterparty_agent_id |
str | None
|
Counterparty agent id. |
baseline_value |
float | None
|
Baseline value emitted by venue, if any. |
additional_payload |
dict[str, typing.Any]
|
Venue-specific payload. |
Raises:
| Type | Description |
|---|---|
crv.core.errors.GrammarError
|
On invalid exchange_event_type/side. |
Notes
Table mappings: exchange (see tables.EXCHANGE_DESC). exchange_event_type is normalized via grammar.exchange_kind_from_value. side is normalized case-insensitively to {"buy","sell"}.
Source code in src/crv/core/schema.py
646 647 648 649 650 651 652 653 654 655 656 657 658 659 660 661 662 663 664 665 666 667 668 669 670 671 672 673 674 675 676 677 678 679 680 681 682 683 684 685 686 687 688 689 690 691 692 693 694 695 696 697 698 699 700 701 702 703 704 705 706 707 708 709 710 711 712 713 714 715 716 717 718 719 720 721 722 723 724 725 726 727 728 | |
crv.core.schema.ExchangeRow.model_config
class-attribute
instance-attribute
crv.core.schema.ExchangeRow.quantity
class-attribute
instance-attribute
crv.core.schema.ExchangeRow.actor_agent_id
class-attribute
instance-attribute
crv.core.schema.ExchangeRow.counterparty_agent_id
class-attribute
instance-attribute
crv.core.schema.ExchangeRow.baseline_value
class-attribute
instance-attribute
crv.core.schema.IdentityEdgeRow
Bases: pydantic.BaseModel
Unified identity/affect edge snapshots/deltas written to identity_edges.
Attributes:
| Name | Type | Description |
|---|---|---|
tick |
int
|
Tick at which the snapshot/delta is recorded. |
observer_agent_id |
str
|
Observer agent identifier. |
edge_kind |
str
|
RepresentationEdgeKind serialized value (lower_snake). |
subject_id |
str | None
|
Subject agent identifier. |
object_id |
str | None
|
Object/other agent identifier. |
related_agent_id |
str | None
|
Related agent identifier (for agent-pair cases). |
token_id |
str | None
|
Token identifier (when applicable). |
edge_weight |
float
|
Measured edge weight. |
edge_sign |
int | None
|
Optional sign encoding (0/1 or -1/1). |
Raises:
| Type | Description |
|---|---|
crv.core.errors.GrammarError
|
On invalid edge_kind. |
crv.core.errors.SchemaError
|
When required field combinations are not met. |
Notes
- edge_kind is normalized via grammar.edge_kind_from_value.
- Required field combinations are enforced via model_validator (see tests).
Math mapping: - self_to_positive_valence -> s^+{agent} - self_to_negative_valence -> s^-{agent} - self_to_object -> s_{agent,token} - self_to_agent -> a_{agent,other_agent} - agent_to_positive_valence -> u^+{agent,other_agent} - agent_to_negative_valence -> u^-{agent,other_agent} - agent_to_object -> b_{agent,other_agent,token} - agent_to_agent -> d_{agent,other_a,other_b} - agent_pair_to_object -> q_{agent,other_a,other_b,token} - object_to_positive_valence -> r^+{agent,token} - object_to_negative_valence -> r^-{agent,token} - object_to_object -> c_{agent,token_a,token_b}
Source code in src/crv/core/schema.py
731 732 733 734 735 736 737 738 739 740 741 742 743 744 745 746 747 748 749 750 751 752 753 754 755 756 757 758 759 760 761 762 763 764 765 766 767 768 769 770 771 772 773 774 775 776 777 778 779 780 781 782 783 784 785 786 787 788 789 790 791 792 793 794 795 796 797 798 799 800 801 802 803 804 805 806 807 808 809 810 811 812 813 814 815 816 817 818 819 820 821 822 823 824 825 826 827 828 829 830 831 832 833 834 835 836 837 838 839 840 841 842 | |
crv.core.schema.IdentityEdgeRow.model_config
class-attribute
instance-attribute
crv.core.schema.IdentityEdgeRow.subject_id
class-attribute
instance-attribute
crv.core.schema.IdentityEdgeRow.object_id
class-attribute
instance-attribute
crv.core.schema.IdentityEdgeRow.related_agent_id
class-attribute
instance-attribute
crv.core.schema.IdentityEdgeRow.token_id
class-attribute
instance-attribute
crv.core.schema.ScenarioRow
Bases: pydantic.BaseModel
Persisted observer-centric scenario context row used to reconstruct inputs.
Attributes:
| Name | Type | Description |
|---|---|---|
tick |
int
|
Tick of the scenario snapshot. |
observer_agent_id |
str
|
Observer agent identifier. |
token_id |
str | None
|
Optional token identifier. |
owner_status |
str | None
|
Ownership status label. |
peer_alignment_label |
str | None
|
Peer alignment label. |
group_label |
str | None
|
Group label. |
visibility_scope |
str | None
|
Normalized to {'public','group','room','dm'}. |
channel_name |
str | None
|
Channel name. |
salient_agent_pairs |
list[dict[str, typing.Any]]
|
Salient agent pairs. |
exchange_snapshot |
dict[str, typing.Any]
|
Exchange snapshot (may include baseline_value). |
recent_affect_index |
float | None
|
Recent affect index. |
salient_other_agent_id |
str | None
|
Salient other agent id. |
context_hash |
str
|
Canonical context hash. |
Raises:
| Type | Description |
|---|---|
crv.core.errors.GrammarError
|
On invalid visibility_scope. |
Notes
Table mappings: scenarios_seen (see tables.SCENARIOS_SEEN_DESC). visibility_scope is normalized via grammar.normalize_visibility. exchange_snapshot.baseline_value corresponds to B_token(t).
Source code in src/crv/core/schema.py
crv.core.schema.ScenarioRow.model_config
class-attribute
instance-attribute
crv.core.schema.ScenarioRow.owner_status
class-attribute
instance-attribute
crv.core.schema.ScenarioRow.peer_alignment_label
class-attribute
instance-attribute
crv.core.schema.ScenarioRow.group_label
class-attribute
instance-attribute
crv.core.schema.ScenarioRow.visibility_scope
class-attribute
instance-attribute
crv.core.schema.ScenarioRow.channel_name
class-attribute
instance-attribute
crv.core.schema.ScenarioRow.salient_agent_pairs
class-attribute
instance-attribute
crv.core.schema.ScenarioRow.exchange_snapshot
class-attribute
instance-attribute
crv.core.schema.ScenarioRow.recent_affect_index
class-attribute
instance-attribute
crv.core.schema.ScenarioRow.salient_other_agent_id
class-attribute
instance-attribute
crv.core.schema.DecisionRow
Bases: pydantic.BaseModel
Agent decision outputs per tick.
Attributes:
| Name | Type | Description |
|---|---|---|
tick |
int
|
Tick of the decision. |
agent_id |
str
|
Agent identifier. |
chosen_action |
dict[str, typing.Any]
|
Chosen action payload. |
action_candidates |
list[dict[str, typing.Any]]
|
Candidate actions payloads. |
token_value_estimates |
dict[str, float]
|
Estimated values per token. |
Notes
Table mappings: decisions (see tables.DECISIONS_DESC).
Source code in src/crv/core/schema.py
crv.core.schema.DecisionRow.model_config
class-attribute
instance-attribute
crv.core.schema.DecisionRow.action_candidates
instance-attribute
crv.core.schema.OracleCallRow
Bases: pydantic.BaseModel
LLM/tooling calls with persona/context and cache metadata.
Attributes:
| Name | Type | Description |
|---|---|---|
tick |
int
|
Tick of the call. |
agent_id |
str
|
Agent identifier. |
engine |
str
|
Inference engine label. |
signature_id |
str
|
Signature identifier. |
persona_id |
str
|
Persona identifier. |
persona_hash |
str
|
Canonical persona hash. |
representation_hash |
str
|
Canonical representation hash. |
context_hash |
str
|
Canonical context hash. |
value_json |
str
|
Serialized value JSON. |
latency_ms |
int
|
Latency in milliseconds. |
cache_hit |
bool
|
Whether cache was hit. |
n_tool_calls |
int
|
Number of tool calls. |
tool_seq |
dict[str, typing.Any]
|
Tool call sequence metadata. |
Notes
Table mappings: oracle_calls (see tables.ORACLE_CALLS_DESC). cache_hit is persisted as i64 (0/1) in descriptors to adhere to allowed dtypes.