Anthropic Computer Use - Hands On Tutorial
Key Takeaways
The video demonstrates hands-on use of Anthropic computer use models and tools, including setting up a Docker container, customizing system prompts, and interacting with the computer using the Anthropic interface. Tools such as Docker, Bash, and Text Editor are utilized to access and utilize the Anthropic key, with applications in agent-based systems and reinforcement learning.
Full Transcript
okay since I recorded the first video about the computer use on anthropic they've now released code and details of how to do that and in this video I'm going to show you just a quick walk through of how you can get this set up a little bit about how it works stuff like that as we go through it so the docs are up for computer use you can see there's quite a strong warning and I will suggest at the start probably best not to run this like on your main computer unless you're going to run a containerized version which is what I'm going to show you in here but there's some good things in here about how it basically works and stuff like that you can see we're just instantiating the anthropic client just like normal but one of the key things that we're doing is we're passing in these tools for a computer with a display size so that it can scale where to click and stuff like that we've got a text editor and we' also got bash that we can use so these are tools that they've created to be able to work with this and we can see that they've got a nice explanation of how the computer use Works in here that Claude will decide which tool to use and then give a response back and then you'll basically use that tool on your virtual machine to get the results out now the way it works is it's doing screenshots to see what's on the screen and doing things like that if you watch the agent s video one of the things that it does seem that they're lacking is they're not using any of the accessibility features or anything they're just using display features or just using screenshots in this case so like I mentioned before they're heavily on you know emphasizing that you probably should go with a containerized version of this be careful if you're going to run it on your local machine I don't suggest you start out doing like that I could imagine that you will end up customizing containers to have exactly what you want running in them and then be able to run it at as you go through that so they've got a nice repo that they've given here with the the demo code and stuff like that so we can come in we can see the whole idea of using it as a loop an agentic kind of loop is key in that you want it to basically get a screenshot send to the model get an updated action for the tool Etc take that action then get a new screenshot and that requires a loop going on in here if we jump into this we can also see that they've got a very specific system prompt going on in here as well so you could I I guess run this on sort of virtual Windows machines in the cloud and in that case you'd want to change the system prompt and the other thing too is you can change the system prompt a little bit to customize it to the particular tasks that you want to use this for if we come in here and look at the tools we can actually see that it can take actions of key type Mouse move left click left click drag right click middle click double cck click there's a whole bunch of things in there which we would expect to see and they've got some logic in there for dealing with different screen sizes Etc now coming down to show you how I'm going to use it in here again we've got more cautions about using a dedicated machine using something like this we're going to basically run it with this Docker container so the cool thing is they've made a Docker container where you can just take your anthropic key put it in there and then run this Docker container and it will access it for you you can also do this on bedrock and you can also do this on gcp or on vertex AI in here and if you are doing it on those you will basically want to connect in to access this because we're doing it locally I'm just going to use Local Host 880 in here okay so I've copied over you know that code for setting up with Docker in here and you'll be able to see that okay it it I'm going to basically start off by setting the key so I could run this as a file but I'm just going to run it in here um I'm going to kill the key obviously after the video just showing you that okay first off you just want to you know export to set up your key for this and then you just very simply want to run the docker container now I've already run it so it won't need to be pulled down again if you're running it the first time it will will actually pull down all of the docker containers and the files needed Etc to to do this here we can see it's just basically starting up and going if I come in here and look at my Docker desktop you can see that I'm using a laptop at the moment so I didn't have Docker on this I've just installed it one of the easiest ways to do that is just to go to Docker desktop it's shows me that I've basically brought in these images already and I've just started that container so this is the container all up and running for us to use now to use it I basically just launch Local Host 8080 and sure enough you'll see that now we've got the clawed interface set up here and I can come in and type different things okay so you can see I can do a search for something like find me the docs for anthropic computer use let's see if it will do this so it's going to start off by taking screenshot the screenshot that we've got nothing open on here it will then decide to do something and it will do you know a few different things okay it's opened up Firefox in this case now one of the places that it does seem to get stuck occasionally is if you've got popups that it doesn't know about I'm currently traveling in Spain so some of the things come up in Spanish and that seems to perhaps confuse it a little bit okay so in this case it's basically hasn't found what we wanted let's see how it recovers from the 404 I guess I should point out that at this point that I also find it a pain to often find the anthropic docks I think they're not under there's no link on the homepage to find them easily ah now it's gone to to docs. anthropic okay so you can see that it got to the page I found the docs didn't find the computer use docks and then finally we got rate limited so it actually had to stop working because of that just quickly to show you in here you have you your your setup so you can change your anthropic key Etc you can allow it to send number of images or you can have a custom system prompt Etc as you go through this and can reset it to this open up bash and see how big is my hard drive okay so now I'm going to try to do something that's not a browser element and by the way you up here here you can basically toggle things on so you could actually set up some of the things on the computer and stuff okay now I'm asking it open gedit which is the text editor here and write me a sonnet about anthropics goals so let's see how okay so it's opened up the app uh that we can see here it's taking a screenshot and we can see sure enough there it's writing out our little Sonet and we've got a rate limit again there uh stopping us but let's see please fix the indenting so that each line of the Sonet has a new line okay we can see that that didn't work out very well but it was able to open this was able to save it you can see that okay it's decided to call it the anthropic sonnet and save it in there so it's pretty interesting to look at how could we use this for various different tasks both running sort of a local container on our machine but also running a container in the cloud that you could imagine has access to other coded agents and that it just pings the anthropic one every now and then to make some decisions about things as well all right so I'll leave it there for the video I'll put the links below so that you can get you know started with this I may do a custom video on the patreon about how to customize the docker container and look at different things you could do with that as always if you've got any questions or comments please put them in the comments below if you found the video useful please click like And subscribe and I will talk to you in the next video bye for now
Original Description
In this video, I go through hands-on how to use the Anthropic computer use models and tools. Explain how they work and also show how you can get it started with Docker on your own computer.
For more tutorials on using LLMs and building agents, check out my Patreon
Patreon: https://www.patreon.com/SamWitteveen
Twitter: https://twitter.com/Sam_Witteveen
Computer Use: https://www.anthropic.com/news/developing-computer-use
Computer Use Docs: https://docs.anthropic.com/en/docs/build-with-claude/computer-use
👨💻Github: https://github.com/anthropics/anthropic-quickstarts/tree/main/computer-use-demo
🕵️ Interested in building LLM Agents? Fill out the form below
Building LLM Agents Form: https://drp.li/dIMes
⏱️Time Stamps:
00:00 Intro
00:17 Anthropic Docs
02:02 Anthropic Github Repo
03:50 Docker Setup
05:10 Testing Demo
Watch on YouTube ↗
(saves to browser)
Sign in to unlock AI tutor explanation · ⚡30
Playlist
Uploads from Sam Witteveen · Sam Witteveen · 0 of 60
← Previous
Next →
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
LangChain Basics Tutorial #1 - LLMs & PromptTemplates with Colab
Sam Witteveen
LangChain Basics Tutorial #2 Tools and Chains
Sam Witteveen
ChatGPT API Announcement & Code Walkthrough with LangChain
Sam Witteveen
Trying Out Flan 20B with UL2 - Working in Colab with 8Bit Inference
Sam Witteveen
LangChain - Conversations with Memory (explanation & code walkthrough)
Sam Witteveen
LangChain Chat with Flan20B
Sam Witteveen
LangChain - Using Hugging Face Models locally (code walkthrough)
Sam Witteveen
PAL : Program-aided Language Models with LangChain code
Sam Witteveen
Building a Summarization System with LangChain and GPT-3 - Part 1
Sam Witteveen
Building a Summarization System with LangChain and GPT-3 - Part 2
Sam Witteveen
Microsoft's Visual ChatGPT using LangChain
Sam Witteveen
Building a Summarization System with LangChain - Part 3 Using ChatGPT Turbo
Sam Witteveen
LangChain Agents - Joining Tools and Chains with Decisions
Sam Witteveen
Investigating Alpaca 7B - Finetuned LLaMa LLM
Sam Witteveen
Comparing LLMs with LangChain
Sam Witteveen
Running Alpaca7B in Colab
Sam Witteveen
How to finetune your own Alpaca 7B
Sam Witteveen
How to make a custom dataset like Alpaca7B
Sam Witteveen
Understanding Constitutional AI - the paper and key concepts
Sam Witteveen
Using Constitutional AI in LangChain
Sam Witteveen
Talking to Alpaca with LangChain - Creating an Alpaca Chatbot
Sam Witteveen
Text-to-video-synthesis with Diffusers and Colab
Sam Witteveen
Meet Dolly the new Alpaca model
Sam Witteveen
Checking out the Cerebras-GPT family of models
Sam Witteveen
A Step-by-Step Guide to Fine-Tuning Your Dolly Model (tutorial)
Sam Witteveen
Is GPT4All your new personal ChatGPT?
Sam Witteveen
Raven - RWKV-7B RNN's LLM Strikes Back
Sam Witteveen
Talk to your CSV & Excel with LangChain
Sam Witteveen
Vicuna - 90% of ChatGPT quality by using a new dataset?
Sam Witteveen
Koala Revealed: The ChatGPT Alternative You Need to Know! 🔍
Sam Witteveen
Running Koala for free in Colab. Your own personal ChatGPT? (tutorial)
Sam Witteveen
BabyAGI: Discover the Power of Task-Driven Autonomous Agents!
Sam Witteveen
Auto-GPT - How to Automate a Task Based AI with GPT-4
Sam Witteveen
Improve your BabyAGI with LangChain
Sam Witteveen
Generative Agents - Deep Dive and GPT-4 Recreation
Sam Witteveen
GPT4ALLv2: The Improvements and Drawbacks You Need to Know!
Sam Witteveen
Dolly 2.0 by Databricks: Open for Business but is it Ready to Impress!
Sam Witteveen
Red Pajama - Operation: Freeing LLaMA
Sam Witteveen
Investigating Open Assistant - Models, Datasets and Addons
Sam Witteveen
Investigating MiniGPT-4 - The Secret behind GPT-V?
Sam Witteveen
Stable LM 3B - The new tiny kid on the block.
Sam Witteveen
Bard can now code and put that code in Colab for you.
Sam Witteveen
Checking out Bark: a Text to Speech system by Suno AI
Sam Witteveen
Fine-tuning LLMs with PEFT and LoRA
Sam Witteveen
Master PDF Chat with LangChain - Your essential guide to queries on documents
Sam Witteveen
Using LangChain with DuckDuckGO Wikipedia & PythonREPL Tools
Sam Witteveen
Building Custom Tools and Agents with LangChain (gpt-3.5-turbo)
Sam Witteveen
StableVicuna: The New King of Open ChatGPTs?
Sam Witteveen
WizardLM: Evolving Instruction Datasets to Create a Better Model
Sam Witteveen
LaMini-LM - Mini Models Maxi Data!
Sam Witteveen
Finding the Best Free ChatGPT
Sam Witteveen
MPT-7B - The First Commercially Usable Fully Trained LLaMA Style Model
Sam Witteveen
LangChain Retrieval QA Over Multiple Files with ChromaDB
Sam Witteveen
LangChain Retrieval QA with Instructor Embeddings & ChromaDB for PDFs
Sam Witteveen
LangChain + Retrieval Local LLMs for Retrieval QA - No OpenAI!!!
Sam Witteveen
Transformers Agent - Is this Hugging Face's LangChain Competitor?
Sam Witteveen
StarCoder - The LLM to make you a coding star?
Sam Witteveen
Testing Starcoder for Reasoning with PAL
Sam Witteveen
The New Wizards - Unfiltered & Unaligned
Sam Witteveen
Camel + LangChain for Synthetic Data & Market Research
Sam Witteveen
More on: LLM Engineering
View skill →Related AI Lessons
Chapters (5)
Intro
0:17
Anthropic Docs
2:02
Anthropic Github Repo
3:50
Docker Setup
5:10
Testing Demo
🎓
Tutor Explanation
DeepCamp AI