deepagents-quickstarts  by langchain-ai

Agent harness for complex task execution and delegation

Created 2 months ago
462 stars

Top 65.7% on SourcePulse

GitHubView on GitHub
Project Summary

This repository provides quickstart examples for the deepagents library, an open-source agent harness designed for building sophisticated AI agents. It addresses the need for agents capable of planning, interacting with computer environments (shell, filesystem), and delegating tasks to sub-agents. The primary benefit is simplifying the development of complex agent workflows, demonstrated through practical use-cases like multi-step web research.

How It Works

Deepagents utilizes a harness architecture incorporating planning, computer access, and sub-agent delegation. Agents can execute shell commands and interact with a filesystem through dedicated middleware. Task delegation allows for isolated execution of sub-tasks by specialized sub-agents. This approach is advantageous for managing complexity by breaking down problems, enabling parallel processing, and ensuring robust execution through features like automatic context summarization and file-based context offloading.

Quick Start & Requirements

  • Primary Usage: Quickstarts are demonstrated via Jupyter Notebook or LangGraph Server (e.g., "Deep Research").
  • Prerequisites: Requires the deepagents package. Specific quickstarts may have additional dependencies (e.g., Tavily for web research). The execute tool requires a backend implementing SandboxBackendProtocol.
  • Links: URLs for official documentation and the core deepagents repository are mentioned but not provided in the text.

Highlighted Details

  • Built-in Tools: Includes file system operations (ls, read_file, write_file, edit_file, glob, grep), task management (write_todos), and shell command execution (execute).
  • Middleware System: Extensible middleware layer handles core functionalities like filesystem access (FilesystemMiddleware), sub-agent delegation (SubAgentMiddleware), conversation summarization (SummarizationMiddleware), prompt caching for Anthropic models (AnthropicPromptCachingMiddleware), and human approval workflows (HumanInTheLoopMiddleware).
  • Context Management: FilesystemMiddleware automatically saves large tool results to files to prevent context overflow, and SummarizationMiddleware summarizes conversation history exceeding 20K tokens while preserving recent messages.
  • Agent Customization: Allows custom system prompts appended to default middleware instructions for tailored agent behavior and workflow definition.

Maintenance & Community

Information regarding maintainers, community channels (Discord/Slack), or roadmap is not present in the provided text.

Licensing & Compatibility

The license type and compatibility notes are not specified in the provided README content.

Limitations & Caveats

The execute tool's availability is contingent on the backend implementing SandboxBackendProtocol. The HumanInTheLoopMiddleware requires specific configuration (interrupt_on) to activate human approval workflows. The README does not detail the installation process for the deepagents package itself, only how quickstarts are run.

Health Check
Last Commit

4 days ago

Responsiveness

Inactive

Pull Requests (30d)
3
Issues (30d)
2
Star History
57 stars in the last 30 days

Explore Similar Projects

Feedback? Help us improve.