agent visits: track when agents successfully process nodes
New append-only visits.capnp log records which agent processed which
node and when. Only recorded on successful completion — transient
errors don't mark nodes as "seen."
Schema: AgentVisit{nodeUuid, nodeKey, agent, timestamp, outcome}
Storage: append_visits(), replay_visits(), in-memory VisitIndex
Recording: daemon records visits after successful LLM call
API: agent_prompt() returns AgentBatch{prompt, node_keys} so callers
know which nodes to mark as visited.
Groundwork for using visit recency in agent node selection — agents
will deprioritize recently-visited nodes.
This commit is contained in:
parent
9f14a29181
commit
0e1e5a1981
6 changed files with 237 additions and 34 deletions
|
|
@ -101,3 +101,19 @@ struct NodeLog {
|
|||
struct RelationLog {
|
||||
relations @0 :List(Relation);
|
||||
}
|
||||
|
||||
# Agent visit tracking — separate append-only log.
|
||||
# Records when an agent successfully processed a node.
|
||||
# Used to deprioritize recently-visited nodes in agent selection.
|
||||
|
||||
struct AgentVisit {
|
||||
nodeUuid @0 :Data; # 16 bytes — which node
|
||||
nodeKey @1 :Text; # human-readable key (for debugging)
|
||||
agent @2 :Text; # agent type: "linker", "rename", "replay", etc.
|
||||
timestamp @3 :Int64; # unix epoch seconds
|
||||
outcome @4 :Text; # "processed", "skipped", "modified" — optional detail
|
||||
}
|
||||
|
||||
struct AgentVisitLog {
|
||||
visits @0 :List(AgentVisit);
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue