> ## 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.

# Basic Autonomous Agent Example

> A quick example to get started with AutonomousAgent

Build a working autonomous agent in just a few lines of code. The `AutonomousAgent` comes pre-configured with filesystem and shell tools, automatic storage, and workspace sandboxing.

## Basic 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>

## What's Included by Default

When you create an `AutonomousAgent`, you get:

* **InMemoryStorage** as the default storage backend
* **Full session memory** enabled for conversation history persistence
* **Filesystem toolkit** for file operations (read, write, edit, search, etc.)
* **Shell toolkit** for terminal command execution
* **Workspace sandboxing** for security
