Skip to content

Deep Agents CLI: A Terminal-Based AI Coding Assistant

Purpose

I wanted an AI coding assistant that works in my terminal. I use Claude Code sometimes, but I wanted something open-source that works with different LLM providers. Deep Agents CLI seemed like a good option - it’s a pre-built terminal agent that supports multiple models.

What is Deep Agents CLI?

Deep Agents CLI is a terminal-based AI coding assistant. It’s similar to Claude Code or Cursor, but:

  • Works with any LLM that supports tool calling (not just Claude)
  • Open-source and extensible
  • Supports custom skills via slash commands
  • Can run in remote sandboxes

Environment

  • macOS or Linux
  • Terminal
  • An LLM API key (Anthropic, OpenAI, etc.)

How to Install

One-Line Install

The fastest way is using the install script:

Install Deep Agents CLI
curl -LsSf https://raw.githubusercontent.com/langchain-ai/deepagents/main/libs/cli/scripts/install.sh | bash

Or with uv

If you already have uv installed:

Install with uv
uv tool install 'deepagents-cli[nvidia,ollama]'

The extras in brackets add support for specific providers. Use nvidia for NVIDIA NIM, ollama for Ollama models.

Features I Found Useful

Interactive TUI

After installing, I run:

Start the CLI
deepagents

This opens an interactive terminal interface with streaming responses. I can type prompts, see the agent think and act, and continue the conversation.

Conversation Resume

The CLI remembers conversations. When I start it again, I can pick up where I left off. This is useful for long coding sessions where I need to step away.

The agent can search the web to ground its responses. This helps when I ask about recent library versions or current documentation.

Persistent Memory

The agent remembers context across conversations. If I tell it about my project structure, it recalls that information later.

Headless Mode

For CI/CD pipelines or scripts, I can run non-interactively:

Headless mode
deepagents --headless "Fix the linting errors in src/"

Human-in-the-Loop

I can configure the CLI to ask for approval before executing tool calls. This gives me control over what the agent does.

Custom Skills

I can extend the agent with custom slash commands. Skills are stored in a skills repository and can be loaded at runtime.

To use a skills repo:

Load custom skills
deepagents --skills-repo myorg/skills-repo

GitHub Actions Integration

Deep Agents CLI includes a GitHub Action for automated workflows:

.github/workflows/agent.yml
jobs:
agent:
runs-on: ubuntu-latest
steps:
- uses: langchain-ai/deepagents/action@main
with:
prompt: "Review and fix linting errors"
model: "claude-3-5-sonnet"
enable_memory: true
timeout: 30

The action parameters:

  • prompt - What to tell the agent
  • model - Which LLM to use
  • enable_memory - Persist memory across runs
  • skills_repo - Load custom skills from GitHub
  • timeout - Maximum runtime in minutes

Remote Sandboxes

The CLI can run code in isolated environments instead of my local machine. Supported sandboxes:

Sandbox architecture
┌─────────────┐ ┌─────────────┐
│ Local CLI │────▶│ Sandbox │
└─────────────┘ └─────────────┘
┌─────────────────┼─────────────────┐
▼ ▼ ▼
┌─────────┐ ┌─────────┐ ┌─────────┐
│ Modal │ │ Daytona │ │Runloop │
└─────────┘ └─────────┘ └─────────┘

This is useful when:

  • Running untrusted code
  • Testing in fresh environments
  • Isolating dependencies

Summary

In this post, I showed how to install and use Deep Agents CLI. It provides a terminal-based AI coding assistant with an interactive TUI, conversation persistence, web search, custom skills, and remote sandbox support. The one-line install makes it easy to get started, and the extensibility lets me customize it for my workflow.

Final Words + More Resources

My intention with this article was to help others share my knowledge and experience. If you want to contact me, you can contact by email: Email me

Here are also the most important links from this article along with some further resources that will help you in this scope:

Oh, and if you found these resources useful, don’t forget to support me by starring the repo on GitHub!

Comments