Skip to main content

Workshop 5: DeepAgents & Automation

Duration: 60 minutes | Level: Advanced | Prerequisites: Workshops 1-4

What You’ll Master

DeepAgents transforms your expert from a chatbot into an autonomous agent that can complete complex, multi-step tasks.
1

Understanding DeepAgents

Learn how autonomous agents differ from standard chatbots
2

Workspace Management

Create and manage persistent file systems
3

Task Automation

Build and track task lists for complex workflows
4

Code Execution

Enable your expert to write and run code
5

HITL Control

Configure human-in-the-loop for safety

What are DeepAgents?

DeepAgents are AI agents that can:
β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
β”‚                    DEEPAGENT CAPABILITIES                        β”‚
β”œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€
β”‚                                                                 β”‚
β”‚   β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”   β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”   β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”          β”‚
β”‚   β”‚    Tasks    β”‚   β”‚    Files    β”‚   β”‚    Code     β”‚          β”‚
β”‚   β”‚  Management β”‚   β”‚   System    β”‚   β”‚  Execution  β”‚          β”‚
β”‚   β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜   β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜   β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜          β”‚
β”‚         β”‚                 β”‚                 β”‚                   β”‚
β”‚         β–Ό                 β–Ό                 β–Ό                   β”‚
β”‚   Create todos      Read/write        Run Python,              β”‚
β”‚   Track progress    files             JavaScript,              β”‚
β”‚   Multi-step        Persistent        Shell commands           β”‚
β”‚   workflows         storage                                     β”‚
β”‚                                                                 β”‚
β”‚   β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”   β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”   β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”          β”‚
β”‚   β”‚   Memory    β”‚   β”‚   Search    β”‚   β”‚   Browser   β”‚          β”‚
β”‚   β”‚   System    β”‚   β”‚     Web     β”‚   β”‚ Automation  β”‚          β”‚
β”‚   β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜   β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜   β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜          β”‚
β”‚         β”‚                 β”‚                 β”‚                   β”‚
β”‚         β–Ό                 β–Ό                 β–Ό                   β”‚
β”‚   Remember context  Research topics   Navigate websites         β”‚
β”‚   across sessions   Find information  Extract data              β”‚
β”‚                                                                 β”‚
β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜

Standard Chat vs DeepAgents

FeatureStandard ChatDeepAgents
Conversationsβœ…βœ…
File AccessβŒβœ…
Task ManagementβŒβœ…
Code ExecutionβŒβœ…
Multi-step WorkflowsLimitedβœ…
Persistent StateLimitedβœ…
Autonomous ActionsβŒβœ…

Enabling DeepAgents Mode

Activate in Chat

1

Open Settings

Click the settings icon in the chat top bar
2

Enable Deep Mode

Toggle β€œDeep Mode” or β€œDeepAgents Mode”
3

View Workspace

The workspace drawer appears on the right side
DeepAgents Workspace

The Workspace Interface

Tasks Panel

View and manage todos:
  • See all created tasks
  • Track completion status
  • Add manual tasks
  • Delete or modify

Files Panel

Access the file system:
  • Browse created files
  • Edit content
  • Download files
  • Upload new files

Task Management

Task Statuses

StatusIconMeaning
PendingβšͺNot started yet
In ProgressπŸ”΅Currently working
Completed🟒Finished successfully
FailedπŸ”΄Encountered errors
Cancelled🟠Manually cancelled

Creating Tasks

You can create tasks by:
  1. Asking the Agent: β€œCreate a task to analyze the sales data”
  2. Natural Language: β€œI need you to do X, Y, and Z”
  3. Manual Addition: Click β€œAdd Task” in the workspace

Task Hierarchy

DeepAgents supports nested tasks:
πŸ“‹ Main Project
β”œβ”€β”€ πŸ“‹ Research Phase
β”‚   β”œβ”€β”€ βœ… Gather requirements
β”‚   β”œβ”€β”€ πŸ”΅ Analyze competitors
β”‚   └── βšͺ Summarize findings
β”œβ”€β”€ πŸ“‹ Development Phase
β”‚   β”œβ”€β”€ βšͺ Design architecture
β”‚   └── βšͺ Implement features
└── πŸ“‹ Testing Phase
    └── βšͺ Write tests

🎯 Exercise: Task Workflow

Try this conversation with your DeepAgent:
You: I need to create a marketing report. Can you help me plan this out?

Agent: I'll create a structured plan for your marketing report. Let me set up the tasks:

πŸ“‹ Tasks Created:
1. βšͺ Define report objectives and target audience
2. βšͺ Research market trends and competitors
3. βšͺ Gather internal performance data
4. βšͺ Create outline and structure
5. βšͺ Write executive summary
6. βšͺ Design visualizations
7. βšͺ Review and finalize

Should I start with the first task?

File System Operations

Available File Operations

Read Files

Access and analyze existing files
"Read the contents of report.md"

Write Files

Create new files or update existing
"Create a file called notes.txt with..."

Search Files

Find content across files
"Search for 'revenue' in all documents"

Edit Files

Modify specific parts of files
"Update the introduction section of report.md"

File Types Supported

TypeExtensionsUse Cases
Text.txt, .md, .jsonNotes, configs, data
Code.py, .js, .ts, .html, .cssScripts, websites
Data.csv, .jsonDatasets, exports
Docs.md, .htmlReports, documentation

🎯 Exercise: File Operations

1

Create a File

Ask: β€œCreate a markdown file called project-plan.md with a basic outline for a mobile app project”
2

Read and Modify

Ask: β€œRead project-plan.md and add a timeline section”
3

Create Related File

Ask: β€œCreate a tasks.json file listing the tasks from the project plan”

Code Execution

Enabling Code Execution

DeepAgents can execute code in isolated sandboxes:
Code execution is powerful but requires caution. Always review code before approving execution in HITL mode!

Supported Languages

Python

Full Python 3.x support with common libraries

JavaScript

Node.js runtime for JS/TypeScript

Shell

Bash commands for system operations

Code Execution Examples

You: Analyze this CSV data and create a summary

Agent: I'll write Python code to analyze the data:

[Creates and runs Python script]

Results:
- Total records: 1,245
- Average value: $847.32
- Top category: Electronics (34%)

E2B Workspace Templates

DeepAgents uses E2B (Execution to Browser) for code execution:
TemplateUse CaseFeatures
Python Data ScienceAnalysis, MLpandas, numpy, matplotlib
Node.jsWeb dev, APIsnpm packages, TypeScript
Next.js + TailwindFull-stack webReact, Tailwind CSS
Vite + ReactFrontend appsFast builds, HMR

Human-in-the-Loop (HITL)

What is HITL?

HITL mode requires human approval before the agent takes actions:
β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
β”‚                         HITL FLOW                                β”‚
β”œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€
β”‚                                                                 β”‚
β”‚   Agent Plans Action                                            β”‚
β”‚        β”‚                                                        β”‚
β”‚        β–Ό                                                        β”‚
β”‚   β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”                  β”‚
β”‚   β”‚  "I want to create 3 files and          β”‚                  β”‚
β”‚   β”‚   execute this Python script.           β”‚                  β”‚
β”‚   β”‚   Should I proceed?"                    β”‚                  β”‚
β”‚   β”‚                                         β”‚                  β”‚
β”‚   β”‚   [Approve]  [Reject]  [Modify]         β”‚                  β”‚
β”‚   β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜                  β”‚
β”‚        β”‚                                                        β”‚
β”‚        β–Ό                                                        β”‚
β”‚   Human Reviews and Decides                                     β”‚
β”‚        β”‚                                                        β”‚
β”‚        β–Ό                                                        β”‚
β”‚   Agent Executes (if approved)                                  β”‚
β”‚                                                                 β”‚
β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜

HITL vs Auto Mode

ModeBehaviorBest For
AutoAgent acts immediatelyTrusted tasks, speed
HITLAsks for approvalSensitive operations, learning

Configuring HITL

1

Open Settings

Click settings in the chat interface
2

Toggle HITL

Enable β€œHuman in the Loop” mode
3

Set Thresholds (Optional)

Configure which actions need approval

🎯 Exercise: HITL Workflow

  1. Enable HITL mode
  2. Ask the agent to create a complex project structure
  3. Review each proposed action
  4. Approve, reject, or modify as needed
  5. Observe how the agent adapts to your feedback

Complex Workflow Example

Building a Web App with DeepAgents

Let’s walk through a complete workflow:
1

Define the Project

You: Create a simple todo app using React and Tailwind CSS
Agent creates task list:
  • βšͺ Set up project structure
  • βšͺ Create React components
  • βšͺ Style with Tailwind
  • βšͺ Add functionality
  • βšͺ Test and refine
2

Execute Tasks

The agent works through each task, creating files:
πŸ“ Created files:
β”œβ”€β”€ index.html
β”œβ”€β”€ App.jsx
β”œβ”€β”€ components/
β”‚   β”œβ”€β”€ TodoList.jsx
β”‚   β”œβ”€β”€ TodoItem.jsx
β”‚   └── AddTodo.jsx
└── styles/
    └── app.css
3

Test the Result

Agent runs the preview server:
πŸš€ Preview available at: https://sandbox-xxx.e2b.dev
4

Iterate

You: Add dark mode support
Agent updates the code and shows results

Best Practices

Start with HITL

Enable HITL when learning or working with new workflows

Break Down Tasks

Complex projects work better with clear subtasks

Review Generated Code

Always check code before running in production

Use Templates

E2B templates provide stable, tested environments

Advanced Features

Memory Integration

DeepAgents remember context across sessions:
  • Project state is preserved
  • Preferences are learned
  • Previous decisions inform future actions

Multi-Agent Collaboration

Combine DeepAgents with team members:
TechSupport AI (DeepAgent)
β”œβ”€β”€ ResearchBot (gathers information)
β”œβ”€β”€ CodeHelper (writes and reviews code)
└── DocWriter (creates documentation)

Scheduled Automation

Set up recurring DeepAgent tasks:
  • Daily reports
  • Weekly summaries
  • Automated data processing

🎯 Challenge Exercise

Complete this comprehensive project:
1

Create a Data Dashboard

Ask DeepAgent to create a web dashboard showing sales data
2

Include Charts

Add visualizations using a charting library
3

Make it Interactive

Add filters and date range selection
4

Document

Have the agent create README documentation

Key Takeaways

Autonomous Power

DeepAgents can complete complex multi-step tasks independently

Persistent Workspace

Files and state persist across conversations

Code Execution

Write, run, and iterate on code in real-time

Safe Control

HITL mode provides oversight for critical operations

Next Steps