Agent
The Agent (represented by Agent in the runtime) is the core operational unit in UClaw. Each agent represents an independent, stateful entity capable of executing reasoning steps, invoking tools, and maintaining its own durable state.
Core Features
- Durable & Stateful Memory: Unlike standard stateless LLM calls, a UClaw agent preserves its complete conversation state, variables, and memory blocks across WebSocket and HTTP requests.
- Durable Execution & Recovery: UClaw agents feature automatic Chat Recovery. If a network glitch occurs, the agent can reconstruct or resume its partial execution context seamlessly.
- Embedded Sandbox: Each agent comes with its own personal isolated workspace and execution tools, enabling it to write files, run code, and invoke APIs.
- Sub-Agent Spawning: Agents can recruit helper sub-agents (using the
ask_agenttool) to delegate sub-tasks, inheriting permissions and context constraints.
Agent Configuration
An agent is defined by its configuration (AgentConfig), which can be updated dynamically via RPC:
- model / modelTier: The LLM provider and selection tier.
- instructions: The system instructions/soul prompt driving the agent's behavior.
- extensions: Custom runtime tools.
- capabilities: Permission boundaries such as read, write, execute, database, network, and secret access.
- maxSteps: The maximum reasoning loop steps allowed per user turn.
To configure models, proceed to the Model Configuration guide.