-
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathrecord.schema.json
More file actions
200 lines (200 loc) · 5.55 KB
/
Copy pathrecord.schema.json
File metadata and controls
200 lines (200 loc) · 5.55 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
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
{
"$schema": "https://json-schema.org/draft/2020-12/schema",
"$id": "https://raw.githubusercontent.com/nikhilvdev/logquill-python/main/schema/record.schema.json",
"title": "LogQuill record",
"description": "One log record, as written by logquill (Python) and logquill-js. `meta` is free-form except for the named fields below, which both packages agree on. Records written by logquill 1.x have no `schema_version` and are not valid against this schema; read them with parse_record (Python), which labels them '1.0'.",
"type": "object",
"required": [
"schema_version",
"timestamp",
"level",
"logger",
"message",
"meta"
],
"additionalProperties": false,
"properties": {
"schema_version": {
"const": "2.0",
"description": "The record shape this schema describes."
},
"timestamp": {
"type": "string",
"format": "date-time",
"pattern": "^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}(\\.\\d+)?(Z|[+-]\\d{2}:\\d{2})$",
"description": "ISO 8601, e.g. 2026-01-01T00:00:00.000Z."
},
"level": {
"enum": [
"TRACE",
"DEBUG",
"INFO",
"WARN",
"ERROR",
"FATAL"
]
},
"logger": {
"type": "string",
"description": "Dotted logger name."
},
"message": {
"type": "string"
},
"meta": {
"$ref": "#/$defs/meta"
},
"llm": {
"$ref": "#/$defs/llm"
}
},
"$defs": {
"meta": {
"type": "object",
"description": "Free-form key/values. The keys named here have fixed meanings and types.",
"additionalProperties": true,
"properties": {
"kind": {
"type": "string",
"description": "thought | action | observation | decision; free-form otherwise (e.g. span, checkpoint)."
},
"run_id": {
"type": "string",
"description": "Groups one agent run."
},
"span_id": {
"type": "string"
},
"parent_span_id": {
"type": "string"
},
"trace_id": {
"type": "string",
"description": "Follows a request across services; distinct from run_id."
},
"thread_id": {
"type": "string",
"description": "A resumable conversation spanning several run_ids."
},
"node_name": {
"type": "string",
"description": "The graph node that produced the record."
},
"duration_ms": {
"type": "number",
"minimum": 0,
"description": "Set on span close."
},
"retry_count": {
"type": "integer",
"minimum": 0,
"description": "How many times this tool call has been retried."
},
"state_diff": {
"type": "object",
"description": "State captured before and after a span."
},
"mcp": {
"$ref": "#/$defs/mcp"
},
"stack": {
"type": "string",
"description": "Formatted traceback."
},
"hash": {
"type": "string",
"pattern": "^[0-9a-f]{64}$"
},
"prev_hash": {
"type": "string",
"pattern": "^[0-9a-f]{64}$"
},
"tool": {
"type": "string",
"description": "Name of the tool an action called."
},
"tool_call_id": {
"type": "string",
"description": "Identifies one tool call across its retries."
},
"provider": {
"type": "string",
"description": "The LLM provider, e.g. openai, anthropic."
},
"agent_name": {
"type": "string",
"description": "Human-readable name of the agent."
},
"agent_id": {
"type": "string"
},
"operation": {
"enum": [
"chat",
"text_completion",
"invoke_agent"
],
"description": "Overrides the operation inferred for OpenTelemetry export."
},
"response_model": {
"type": "string",
"description": "The model that actually answered, if it differs from llm.model."
},
"input_messages": {
"type": "array",
"description": "Opt-in prompt content; only exported to OpenTelemetry when content capture is on."
},
"output_messages": {
"type": "array",
"description": "Opt-in completion content."
}
}
},
"mcp": {
"type": "object",
"description": "Model Context Protocol fields.",
"additionalProperties": true,
"properties": {
"server": {
"type": "string"
},
"tool": {
"type": "string"
},
"run_id": {
"type": "string",
"description": "Informational: which client-side agent run triggered this MCP request. Never overrides this process's own run_id."
}
}
},
"llm": {
"type": "object",
"description": "An LLM call. Present only on LLM-call records; every field is optional.",
"additionalProperties": false,
"properties": {
"model": {
"type": "string"
},
"tokens_in": {
"type": "integer",
"minimum": 0
},
"tokens_out": {
"type": "integer",
"minimum": 0
},
"cost_usd": {
"type": "number",
"minimum": 0
},
"latency_ms": {
"type": "number",
"minimum": 0
},
"finish_reason": {
"type": "string"
}
}
}
}
}