Method
agent_finished
(
self,
record: AgentRecord,
*,
status: AgentStatus,
tokens: int = 0,
error: Optional[str] = None,
tool_count: int = 0,
)
Source from the content-addressed store, hash-verified
| 110 | return record |
| 111 | |
| 112 | def agent_finished( |
| 113 | self, |
| 114 | record: AgentRecord, |
| 115 | *, |
| 116 | status: AgentStatus, |
| 117 | tokens: int = 0, |
| 118 | error: Optional[str] = None, |
| 119 | tool_count: int = 0, |
| 120 | ) -> None: |
| 121 | record.status = status |
| 122 | record.tokens = tokens |
| 123 | record.error = error |
| 124 | record.tool_count = tool_count |
| 125 | if record.started_at is not None: |
| 126 | record.elapsed = time.monotonic() - record.started_at |
| 127 | self._changed() |
| 128 | |
| 129 | # ── reads ────────────────────────────────────────────────────────────── |
| 130 | @property |