> ## Documentation Index
> Fetch the complete documentation index at: https://docs.upsonic.ai/llms.txt
> Use this file to discover all available pages before exploring further.

# Autonomous Agent

> Pre-configured agent with filesystem and shell capabilities

<iframe src="https://www.youtube.com/embed/GOYko0KfBtg" title="YouTube video player" frameborder="0" className="w-full aspect-video rounded-xl" allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture; web-share" allowfullscreen />

Build powerful autonomous agents that can read, write, and execute code in your workspace.

The `AutonomousAgent` class extends the base `Agent` with built-in filesystem and shell tools, automatic storage setup, and workspace sandboxing. It's the ideal choice for coding assistants, DevOps automation, and any task requiring file or terminal access.

## Overview

`AutonomousAgent` inherits from `Agent` and comes pre-configured with:

* **Default InMemoryStorage**: Automatic session storage without any configuration
* **Full Session Memory Enabled**: Conversation history is preserved by default
* **Filesystem Toolkit** for file operations (read, write, edit, search, etc.)
* **Shell Toolkit** for terminal command execution
* **Workspace Sandboxing** for security

## Key Features

* **Zero Configuration**: Works out of the box with sensible defaults
* **Built-in System Prompt**: Automatically configured with tool usage guidelines
* **Filesystem Tools**: Read, write, edit, search, list, move, copy, delete files
* **Shell Commands**: Execute terminal commands with timeout and output capture
* **Workspace Security**: All operations sandboxed to the workspace directory
* **Read-Before-Edit**: Enforces reading files before editing for safety
* **Inherits All Agent Features**: Memory, policies, streaming, caching, and more

## Quick Example

```python theme={null}
from upsonic import AutonomousAgent, Task

# Create an autonomous agent with workspace
agent = AutonomousAgent(
    model="anthropic/claude-sonnet-4-5",
    workspace="/path/to/project"
)

# The agent can read, write, and execute in the workspace
task = Task("Read the main.py file and explain what it does")
agent.print_do(task)
```

<Warning>
  All file and shell operations are restricted to the workspace directory. Attempting to access files outside the workspace will be blocked for security.
</Warning>
