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.
Understanding DeepAgents
Learn how autonomous agents differ from standard chatbots
Workspace Management
Create and manage persistent file systems
Task Automation
Build and track task lists for complex workflows
Code Execution
Enable your expert to write and run code
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
Feature Standard Chat DeepAgents Conversations β
β
File Access β β
Task Management β β
Code Execution β β
Multi-step Workflows Limited β
Persistent State Limited β
Autonomous Actions β β
Enabling DeepAgents Mode
Activate in Chat
Open Settings
Click the settings icon in the chat top bar
Enable Deep Mode
Toggle βDeep Modeβ or βDeepAgents Modeβ
View Workspace
The workspace drawer appears on the right side
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
Status Icon Meaning Pending βͺ Not started yet In Progress π΅ Currently working Completed π’ Finished successfully Failed π΄ Encountered errors Cancelled π Manually cancelled
Creating Tasks
You can create tasks by:
Asking the Agent : βCreate a task to analyze the sales dataβ
Natural Language : βI need you to do X, Y, and Zβ
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
Type Extensions Use Cases Text .txt, .md, .json Notes, configs, data Code .py, .js, .ts, .html, .css Scripts, websites Data .csv, .json Datasets, exports Docs .md, .html Reports, documentation
π― Exercise: File Operations
Create a File
Ask: βCreate a markdown file called project-plan.md with a basic outline for a mobile app projectβ
Read and Modify
Ask: βRead project-plan.md and add a timeline sectionβ
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
Data Analysis
File Processing
API Integration
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%)
You: Convert all the markdown files to HTML
Agent: I'll create a script to batch convert:
[Creates and runs conversion script]
β
Converted 5 files:
- intro.md β intro.html
- chapter1.md β chapter1.html
...
You: Fetch the latest weather for New York
Agent: I'll query the weather API:
[Executes API call]
Current weather in New York:
π‘οΈ Temperature: 72Β°F
βοΈ Conditions: Partly cloudy
π¨ Wind: 8 mph
E2B Workspace Templates
DeepAgents uses E2B (Execution to Browser) for code execution:
Template Use Case Features Python Data Science Analysis, ML pandas, numpy, matplotlib Node.js Web dev, APIs npm packages, TypeScript Next.js + Tailwind Full-stack web React, Tailwind CSS Vite + React Frontend apps Fast 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
Mode Behavior Best For Auto Agent acts immediately Trusted tasks, speed HITL Asks for approval Sensitive operations, learning
Configuring HITL
Open Settings
Click settings in the chat interface
Toggle HITL
Enable βHuman in the Loopβ mode
Set Thresholds (Optional)
Configure which actions need approval
π― Exercise: HITL Workflow
Enable HITL mode
Ask the agent to create a complex project structure
Review each proposed action
Approve, reject, or modify as needed
Observe how the agent adapts to your feedback
Complex Workflow Example
Building a Web App with DeepAgents
Letβs walk through a complete workflow:
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
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
Test the Result
Agent runs the preview server: π Preview available at: https://sandbox-xxx.e2b.dev
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:
Create a Data Dashboard
Ask DeepAgent to create a web dashboard showing sales data
Include Charts
Add visualizations using a charting library
Make it Interactive
Add filters and date range selection
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