events
Class info¶
Classes¶
| Name | Children | Inherits |
|---|---|---|
| ChatMessage llmling_agent.messaging.messages Common message format for all UI types. |
||
| CommandCompleteEvent llmling_agent.agent.events Event indicating slash command execution is complete. |
||
| CommandOutputEvent llmling_agent.agent.events Event for slash command output. |
||
| CustomEvent llmling_agent.agent.events Generic custom event that can be emitted during tool execution. |
||
| DiffContentItem llmling_agent.agent.events File modification shown as a diff. |
||
| FileEditProgressEvent llmling_agent.agent.events Event for file edit progress with diff information. |
||
| FileOperationEvent llmling_agent.agent.events Event for filesystem operations. |
||
| LocationContentItem llmling_agent.agent.events A file location being accessed or modified. |
||
| PlanUpdateEvent llmling_agent.agent.events Event indicating plan state has changed. |
||
| ProcessExitEvent llmling_agent.agent.events Event for process completion. |
||
| ProcessKillEvent llmling_agent.agent.events Event for process termination. |
||
| ProcessOutputEvent llmling_agent.agent.events Event for process output updates. |
||
| ProcessReleaseEvent llmling_agent.agent.events Event for process resource cleanup. |
||
| ProcessStartEvent llmling_agent.agent.events Event for process start operations. |
||
| RunErrorEvent llmling_agent.agent.events Signals an error during an agent run. |
||
| RunStartedEvent llmling_agent.agent.events Signals the start of an agent run. |
||
| StreamCompleteEvent llmling_agent.agent.events Event indicating streaming is complete with final message. |
||
| TerminalContentItem llmling_agent.agent.events Embed a terminal for live output display. |
||
| TextContentItem llmling_agent.agent.events Simple text content. |
||
| ToolCallCompleteEvent llmling_agent.agent.events Event indicating tool call is complete with both input and output. |
||
| ToolCallProgressEvent llmling_agent.agent.events Enhanced tool call progress event with rich content support. |
||
| ToolCallStartEvent llmling_agent.agent.events Event indicating a tool call has started with rich ACP metadata. |
🛈 DocStrings¶
Event stream events.
TODO: The specialized process and file events (ProcessStartEvent, ProcessExitEvent, FileOperationEvent, etc.) are essentially domain-specific versions of ToolCallProgressEvent. These could potentially be merged into a single, more flexible ToolCallProgressEvent that carries rich content (terminals, diffs, locations) and domain metadata. This would align better with the ACP protocol's tool call structure and reduce event type proliferation.
CommandCompleteEvent
dataclass
¶
Event indicating slash command execution is complete.
Source code in src/llmling_agent/agent/events.py
193 194 195 196 197 198 199 200 201 202 | |
CommandOutputEvent
dataclass
¶
Event for slash command output.
Source code in src/llmling_agent/agent/events.py
181 182 183 184 185 186 187 188 189 190 | |
CustomEvent
dataclass
¶
Generic custom event that can be emitted during tool execution.
Source code in src/llmling_agent/agent/events.py
225 226 227 228 229 230 231 232 233 234 235 236 | |
event_kind
class-attribute
instance-attribute
¶
event_kind: Literal['custom'] = 'custom'
Event type identifier.
event_type
class-attribute
instance-attribute
¶
event_type: str = 'custom'
Type identifier for the custom event.
source
class-attribute
instance-attribute
¶
source: str | None = None
Optional source identifier (tool name, etc.).
DiffContentItem
dataclass
¶
File modification shown as a diff.
Source code in src/llmling_agent/agent/events.py
72 73 74 75 76 77 78 79 80 81 82 83 | |
old_text
class-attribute
instance-attribute
¶
old_text: str | None = None
The original content (None for new files).
FileEditProgressEvent
dataclass
¶
Event for file edit progress with diff information.
Source code in src/llmling_agent/agent/events.py
284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 | |
changed_lines
class-attribute
instance-attribute
¶
Line numbers that were changed.
event_kind
class-attribute
instance-attribute
¶
event_kind: Literal['file_edit_progress'] = 'file_edit_progress'
Event type identifier.
status
instance-attribute
¶
status: Literal['in_progress', 'completed', 'failed']
Current status of the edit operation.
tool_call_id
class-attribute
instance-attribute
¶
tool_call_id: str | None = None
Tool call ID for ACP notifications.
FileOperationEvent
dataclass
¶
Event for filesystem operations.
Source code in src/llmling_agent/agent/events.py
251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 | |
error
class-attribute
instance-attribute
¶
error: str | None = None
Error message if operation failed.
event_kind
class-attribute
instance-attribute
¶
event_kind: Literal['file_operation'] = 'file_operation'
Event type identifier.
kind
class-attribute
instance-attribute
¶
kind: str | None = None
Tool operation kind (edit, read, write, etc.).
locations
class-attribute
instance-attribute
¶
File paths affected by the operation.
operation
instance-attribute
¶
operation: Literal['read', 'write', 'delete', 'list', 'edit']
The filesystem operation performed.
raw_input
class-attribute
instance-attribute
¶
raw_input: dict[str, Any] = field(default_factory=dict)
Original tool input arguments.
raw_output
class-attribute
instance-attribute
¶
raw_output: Any = None
Tool result data for failed operations.
size
class-attribute
instance-attribute
¶
size: int | None = None
Size of file in bytes (for successful operations).
title
class-attribute
instance-attribute
¶
title: str | None = None
Display title for the operation.
tool_call_id
class-attribute
instance-attribute
¶
tool_call_id: str | None = None
Tool call ID for ACP notifications.
LocationContentItem
dataclass
¶
A file location being accessed or modified.
Source code in src/llmling_agent/agent/events.py
86 87 88 89 90 91 92 93 94 95 | |
PlanUpdateEvent
dataclass
¶
Event indicating plan state has changed.
Source code in src/llmling_agent/agent/events.py
239 240 241 242 243 244 245 246 247 248 | |
ProcessExitEvent
dataclass
¶
Event for process completion.
Source code in src/llmling_agent/agent/events.py
352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 | |
event_kind
class-attribute
instance-attribute
¶
event_kind: Literal['process_exit'] = 'process_exit'
Event type identifier.
final_output
class-attribute
instance-attribute
¶
final_output: str | None = None
Final process output.
success
instance-attribute
¶
success: bool
Whether the process completed successfully (exit_code == 0).
tool_call_id
class-attribute
instance-attribute
¶
tool_call_id: str | None = None
Tool call ID for notifications.
truncated
class-attribute
instance-attribute
¶
truncated: bool = False
Whether output was truncated due to limits.
ProcessKillEvent
dataclass
¶
Event for process termination.
Source code in src/llmling_agent/agent/events.py
373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 | |
ProcessOutputEvent
dataclass
¶
Event for process output updates.
Source code in src/llmling_agent/agent/events.py
331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 | |
event_kind
class-attribute
instance-attribute
¶
event_kind: Literal['process_output'] = 'process_output'
Event type identifier.
stderr
class-attribute
instance-attribute
¶
stderr: str | None = None
Standard error (if separated).
stdout
class-attribute
instance-attribute
¶
stdout: str | None = None
Standard output (if separated).
tool_call_id
class-attribute
instance-attribute
¶
tool_call_id: str | None = None
Tool call ID for notifications.
truncated
class-attribute
instance-attribute
¶
truncated: bool = False
Whether output was truncated due to limits.
ProcessReleaseEvent
dataclass
¶
Event for process resource cleanup.
Source code in src/llmling_agent/agent/events.py
390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 | |
error
class-attribute
instance-attribute
¶
error: str | None = None
Error message if release failed.
event_kind
class-attribute
instance-attribute
¶
event_kind: Literal['process_release'] = 'process_release'
Event type identifier.
tool_call_id
class-attribute
instance-attribute
¶
tool_call_id: str | None = None
Tool call ID for notifications.
ProcessStartEvent
dataclass
¶
Event for process start operations.
Source code in src/llmling_agent/agent/events.py
304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 | |
args
class-attribute
instance-attribute
¶
Command arguments.
env
class-attribute
instance-attribute
¶
env: dict[str, str] = field(default_factory=dict)
Environment variables.
event_kind
class-attribute
instance-attribute
¶
event_kind: Literal['process_start'] = 'process_start'
Event type identifier.
output_limit
class-attribute
instance-attribute
¶
output_limit: int | None = None
Maximum bytes of output to retain.
success
class-attribute
instance-attribute
¶
success: bool = True
Whether the process started successfully.
tool_call_id
class-attribute
instance-attribute
¶
tool_call_id: str | None = None
Tool call ID for notifications.
RunErrorEvent
dataclass
¶
Signals an error during an agent run.
Source code in src/llmling_agent/agent/events.py
43 44 45 46 47 48 49 50 51 52 53 54 55 56 | |
agent_name
class-attribute
instance-attribute
¶
agent_name: str | None = None
Name of the agent that errored.
event_kind
class-attribute
instance-attribute
¶
event_kind: Literal['run_error'] = 'run_error'
Event type identifier.
run_id
class-attribute
instance-attribute
¶
run_id: str | None = None
ID of the agent run that failed.
RunStartedEvent
dataclass
¶
Signals the start of an agent run.
Source code in src/llmling_agent/agent/events.py
29 30 31 32 33 34 35 36 37 38 39 40 | |
StreamCompleteEvent
dataclass
¶
Event indicating streaming is complete with final message.
Source code in src/llmling_agent/agent/events.py
112 113 114 115 116 117 118 119 | |
event_kind
class-attribute
instance-attribute
¶
event_kind: Literal['stream_complete'] = 'stream_complete'
Event type identifier.
message
instance-attribute
¶
message: ChatMessage[TContent]
The final chat message with all metadata.
TerminalContentItem
dataclass
¶
Embed a terminal for live output display.
Source code in src/llmling_agent/agent/events.py
62 63 64 65 66 67 68 69 | |
TextContentItem
dataclass
¶
Simple text content.
Source code in src/llmling_agent/agent/events.py
98 99 100 101 102 103 104 105 | |
ToolCallCompleteEvent
dataclass
¶
Event indicating tool call is complete with both input and output.
Source code in src/llmling_agent/agent/events.py
205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 | |
event_kind
class-attribute
instance-attribute
¶
event_kind: Literal['tool_call_complete'] = 'tool_call_complete'
Event type identifier.
ToolCallProgressEvent
dataclass
¶
Enhanced tool call progress event with rich content support.
This event can carry various types of rich content (terminals, diffs, locations, text) and maps directly to ACP tool call notifications. It serves as a unified replacement for specialized events like ProcessStartEvent, FileOperationEvent, etc.
Source code in src/llmling_agent/agent/events.py
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 | |
event_kind
class-attribute
instance-attribute
¶
event_kind: Literal['tool_call_progress'] = 'tool_call_progress'
Event type identifier.
items
class-attribute
instance-attribute
¶
Rich content items (terminals, diffs, locations, text).
message
class-attribute
instance-attribute
¶
message: str | None = None
Progress message (falls back to TextContentItem).
progress
class-attribute
instance-attribute
¶
progress: int | None = None
The current progress of the tool call.
status
class-attribute
instance-attribute
¶
status: Literal['pending', 'in_progress', 'completed', 'failed'] = 'in_progress'
Current execution status.
title
class-attribute
instance-attribute
¶
title: str | None = None
Human-readable title describing the operation.
tool_input
class-attribute
instance-attribute
¶
tool_input: dict[str, Any] | None = None
The input provided to the tool.
tool_name
class-attribute
instance-attribute
¶
tool_name: str | None = None
The name of the tool being called.
total
class-attribute
instance-attribute
¶
total: int | None = None
The total progress of the tool call.
ToolCallStartEvent
dataclass
¶
Event indicating a tool call has started with rich ACP metadata.
Source code in src/llmling_agent/agent/events.py
122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 | |
content
class-attribute
instance-attribute
¶
Content produced by the tool call.
event_kind
class-attribute
instance-attribute
¶
event_kind: Literal['tool_call_start'] = 'tool_call_start'
Event type identifier.
kind
class-attribute
instance-attribute
¶
kind: ToolKind = 'other'
Tool kind (read, edit, delete, move, search, execute, think, fetch, other).
locations
class-attribute
instance-attribute
¶
locations: list[LocationContentItem] = field(default_factory=list)
File locations affected by this tool call.
raw_input
class-attribute
instance-attribute
¶
raw_input: dict[str, Any] = field(default_factory=dict)
The raw input parameters sent to the tool.