x-dog

Tools for building AI agents and managing LLM deployments.

GitHub →

x-dog / Packages / agent / Features

What the agent runtime does today. Each capability is a small, testable unit of the loop.

Loop

Tool-calling loop
Stream → extract tool calls → execute → feed back → repeat until the model stops.
Parallel tool execution
Independent tool calls in a turn run concurrently; sequential mode is available. Parallel is the default.

Control

Steering
Interrupt the current turn mid-flight and skip its remaining tool calls.
Follow-up queue
Inject the next instruction after the turn completes, with ALL / ONE_AT_A_TIME draining.
Cancellation
abort() / reset_abort() drive an asyncio.Event that unwinds the loop.
Lifecycle events
Ten typed events (message update, tool start/end, turn end…) let a UI observe a run.

Extensibility

Hooks
before_tool_call / after_tool_call, transform_context, and convert_to_llm hook points around the loop.
Argument validation
Tool arguments are validated against the JSON schema before execute is called.
Incremental progress
A tool's on_update callback streams progress while it runs.
Shared tool context
A tool_ctx dict threads state between tools and back to the caller (the sink pattern).

Built-in tools

Built-in: filesystem
read / write / delete / edit / ls / grep / find as one multi-action tool.
Built-in: bash
Run shell commands from the agent.
Built-in: current_time
Inject the current time.
Built-in: submit_result
Schema-validated structured output — the agent returns a typed object, not prose.