Skip to main content

Agent Defaults

The agents.defaults section configures the default behavior for all agents in PicoClaw.

Configuration Structure

Configuration Options

workspace

Type: string
Default: ~/.picoclaw/workspace
Environment: PICOCLAW_AGENTS_DEFAULTS_WORKSPACE
Working directory where the agent operates. All agent data is stored here:

restrict_to_workspace

Type: boolean
Default: true
Environment: PICOCLAW_AGENTS_DEFAULTS_RESTRICT_TO_WORKSPACE
When enabled, restricts agent file and command access to the workspace directory only. Protected tools:
  • read_file - Only files within workspace
  • write_file - Only files within workspace
  • list_dir - Only directories within workspace
  • edit_file - Only files within workspace
  • append_file - Only files within workspace
  • exec - Command paths must be within workspace
Security example:
With this enabled, the agent cannot access /etc/passwd or any files outside the workspace.
Setting restrict_to_workspace: false allows the agent to access any path on your system. Only use this in controlled environments.

allow_read_outside_workspace

Type: boolean
Default: false
Environment: PICOCLAW_AGENTS_DEFAULTS_ALLOW_READ_OUTSIDE_WORKSPACE
When enabled (and restrict_to_workspace is true), allows read-only access outside the workspace but still restricts writes and execution.

model_name

Type: string
Default: "" (uses first configured model)
Environment: PICOCLAW_AGENTS_DEFAULTS_MODEL_NAME
The model to use for agent operations. Must match a model_name from your model_list configuration.

max_tokens

Type: integer
Default: 32768
Environment: PICOCLAW_AGENTS_DEFAULTS_MAX_TOKENS
Maximum number of tokens the model can generate in a single response.
Different models have different context limits. GPT-5.2 supports 128K tokens, while some models are limited to 8K.

temperature

Type: float (0.0 - 2.0)
Default: null (uses provider default, typically 0.7)
Environment: PICOCLAW_AGENTS_DEFAULTS_TEMPERATURE
Controls randomness in model responses:
  • 0.0 - Deterministic, focused responses
  • 0.7 - Balanced creativity and focus (recommended)
  • 1.0 - More creative and varied
  • 2.0 - Highly random and creative

max_tool_iterations

Type: integer
Default: 50
Environment: PICOCLAW_AGENTS_DEFAULTS_MAX_TOOL_ITERATIONS
Maximum number of tool calls the agent can make in a single conversation turn. This prevents infinite loops and controls execution cost:
If the agent reaches this limit, it will respond with current progress and stop.

max_media_size

Type: integer (bytes)
Default: 20971520 (20 MB)
Environment: PICOCLAW_AGENTS_DEFAULTS_MAX_MEDIA_SIZE
Maximum size for uploaded media files (images, audio, documents).

Model Fallbacks

You can configure fallback models that PicoClaw will try if the primary model fails:
PicoClaw will:
  1. Try gpt4 first
  2. If it fails, try claude-sonnet-4.6
  3. If that fails, try gemini-2.0-flash
  4. If all fail, return an error

Image Model Configuration

Configure a separate model for vision/image tasks:

Security Best Practices

  1. Keep workspace restrictions enabled in production
  2. Set appropriate max_tool_iterations to prevent runaway costs
  3. Use dedicated workspaces for different use cases
  4. Limit max_media_size to prevent abuse

Environment Variable Examples

Next Steps