Loading video player...
Today we're launching deep agent CLI.
Deep agent CLI is an open- source coding
tool built on top of the deep agents
package. It allows you to write, edit,
and understand code. One key
differentiator is that it has memory
baked in. What this means is that it
will learn alongside you and you can
save these memory profiles as different
agents that you can then access at
different points in time and port across
projects or across uh terminal windows
or anything like that. So, let me show
you how it works. First, I'm going to
set up my Python environment by setting
up a new virtual environment. Next, I'm
going to pip install the deep agent CLI.
In order to use it, I need to set either
an OpenAI or anthropic API key. I'm
going to use anthropic. So, I'm going to
set that now and then clear my terminal
so you don't see it. Now that it's all
set up, I can run deep agents and start
using it.
I can see I get this nice terminal
window. You'll notice that it says that
web search is disabled. If I had set a
Tavilla API key, what I could do is I
could use the Tavilli web search as a
way to augment this CLI. So, it has that
built in, but it does require that API
key. You'll also notice that it has this
little thing down here with manual
accept. So, some of the actions in here
like writing to files can be considered
dangerous or running bash commands or
things like that. And so, in order to do
those, right now it's in manual accept
mode. If I want to go into more of a
yolo mode and just let it run, I can do
control
and now it's in autoaccept. Let me go
back to the manual mode.
Let me ask it something like what's in
this repo?
I can see that it starts calling tools
that it has access to like the ls tool
to see what's going on. So it looks in
the workspace folder and then it looks
in the workspace deep agents folder. So
this is where I was actually building
the deep agents project. I can see that
it reads some files the readme and the
pi project toml
and now it responds. So it's talking
about the deep agents repository, a
Python package for building deep agents
with advanced capabilities. Has things
like planning, sub agents, file system
access, and detailed prompting. I can
ask it to do normal coding things like
let's tell it to add something to the
readme about the deep agent CLI.
We can see that it's exploring what's in
this workspace. So it's checking out the
libs folder and then the deep agent CLI
folder and then it's reading the readme
there and the pi project.toml and then
it's looking deeper inside the deep
agent CLI to try to get a sense of
what's going on. It's reading the CLI
file, the readme file, a main file and
here it's doing a write action. So now
it's paused and I have the human in the
loop. So I can either approve or reject
this. So let me approve this and then
we'll continue from here.
Great. So that's some basic usage of
depagent CLI. pretty similar to codeex
or factory CLI or any of those other
ones out there. Now, one of the cooler
things about this is that this takes
advantage of a memory system that we've
built into deep agents. So,
specifically, when I run the deep agent
command, it brings up a memory
associated with the agent that I choose.
Now, I ran just deep agents, so I hadn't
chosen any agent. So, under the hood is
actually using a default agent. But let
me do something where I'm going to
create a specific agent and then I can
show how I can add to and edit those
memories and then pull them back up at a
point in time. So I'm going to exit out
of this and now I'm going to run deep
agents
d- agent
and I'm going to make an agent that's
expert at building other deep agents. So
let me name this one deep agent.
Great. So now I'm going to tell it go
research deep agents.
I'm going to tell it where it is
and then remember
things about them.
So it's going to go off and do a bunch
of research. I can see now that it wants
to write a file. But let's look at where
this is. So it's actually in this
memories directory and this memories
directory alias is somewhere else in the
file system. I I'll show that later. But
the point is it's writing something to
this memories directory and this is the
long-term memory of the agent that will
persist over time. So it's writing this
deep agents overview MD. And so let's go
ahead and approve that
and then it's done. So let me exit out
of this CLI. Now let's me going to do
deep agents
list. And I can see here that I have two
available agents. So one is agent and
this is the default one that it comes
with. But then there's this other deep
agent one. This is the one that I just
created. And I can see here the file
path of where the actual information,
the memory of this agent lives. And so
let me look at what's inside this file
path here.
And we can see here that it's got this
agent.mmd and this is the default
instructions that we give it. It can
also edit those but in this case it
chose to write deep agents overview.md
that lives in this long-term memory. So
now what I can do is I can go to any
other part of my uh laptop. Let me go
into workplace and then let let me
launch deep agents again
and I'm going to specify the same agent
deep agent.
Now I'm going to ask it what do you know
about deep agents in your memory? And so
this is a very forced interaction to
force it and and make it check its
memory and and and and that's a little
bit of an overexaggeration. But here we
can see that it's looking at its
memories. It's seen that has access to
these files. It's reading this deep
agents overview and now it has all this
context. So this was an overly
simplistic example of how an agent can
write to and update and then and then
read its memory back in the future. But
the idea is the same. This is a way to
let agents accumulate context over time,
control their own context so they can
decide what to remember and what not to
remember and and then reference it again
in the future. So, we think this is a
really interesting way to have the
coding agents that you're using
alongside you or non-coding agents
because we also think deep agent CLI can
be used for non-coding tasks, but we
think this is an interesting way to let
them evolve and learn alongside you. I
hope that you'll try it out. It's just
pip install deep agent CLI builds on top
of all the other laying stack things
that we build. So, go for it and have
some fun. Thanks for watching.
Using the deepagents package, we built a simple coding CLI as an example of a coding application you could build on top of deepagents. We added in a concept of memory so that it would remember instructions and guidance over time. DeepAgents: https://github.com/langchain-ai/deepagents Blog: https://blog.langchain.com/introducing-deepagents-cli/