ToolCallProfile#
Create, compose, unload, and save session-local Python tools. See the guide.
- class zett_agent.jit_harness.profiling.ToolCallProfile(*, call_id, tool_name, origin, status, duration_ms, input_chars=None, output_chars=None, caller_tool_name=None, error_type=None)[source]#
One finished dispatch attempt, without argument or result contents.
call_idis the join key: a model-requested call keeps the conversation’s ToolCall id, a nested call carries the id the harness assigned, and the same value appears in the JIT CUSTOM events and recent-error records.Character counts use compact Unicode JSON for arguments/structured results, plain string length for text results, and text-block lengths for multimodal results. Image data and URLs are excluded. None means unavailable, not zero. Counts stop at the harness measurement budget, so a value equal to it means “at least this many”. Duration includes validation and nested execution, but excludes surrounding middleware, lifecycle hooks, and telemetry measurement.
Create a new model by parsing and validating input data from keyword arguments.
Raises [ValidationError][pydantic_core.ValidationError] if the input data cannot be validated to form a valid model.
self is explicitly positional-only to allow self as a field name.
- Parameters:
call_id (str)
tool_name (str)
origin (ToolOrigin)
status (ToolCallStatus)
duration_ms (Annotated[float, Ge(ge=0)])
input_chars (Annotated[int | None, Ge(ge=0)])
output_chars (Annotated[int | None, Ge(ge=0)])
caller_tool_name (str | None)
error_type (str | None)
- call_id: str#
Invocation id, shared with the conversation ToolCall and the JIT events.
- tool_name: str#
Registered name that was dispatched.
- origin: ToolOrigin#
Registry that served the call; see ToolOrigin.
- status: ToolCallStatus#
How the attempt ended; see ToolCallStatus.
- duration_ms: float#
Elapsed dispatch time in milliseconds, measured as this class documents.
- input_chars: int | None#
Measured argument length, or null when the arguments are not JSON-representable.
- output_chars: int | None#
Result length, or the error-message length after a failure; null when unknown or cancelled.
- caller_tool_name: str | None#
Tool whose handler composed this call; null at the top level.
- error_type: str | None#
Exception class name for failures and rejections; the message lives in tool_errors().
Fields#
call_id(required)See the typed model signature for this field.
tool_name(required)See the typed model signature for this field.
origin(required)See the typed model signature for this field.
status(required)See the typed model signature for this field.
duration_ms(required)See the typed model signature for this field.
input_chars(optional)See the typed model signature for this field.
output_chars(optional)See the typed model signature for this field.
caller_tool_name(optional)See the typed model signature for this field.
error_type(optional)See the typed model signature for this field.