Skip to content

lutzroeder/agents

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

17 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Tiny Agents

Minimal coding, computer use, and research agents using the OpenAI Agents SDK.

  • code.py - A minimal coding agent in 250 lines of Python code.
  • cua.py - A minimal computer use agent in 100 lines of Python code.
  • research.py - A minimal research agent in 100 lines of Python code.

Get started

Clone this repository, install the OpenAI Agents SDK, and set the OpenAI API key

git clone https://github.com/lutzroeder/agents
pip install openai-agents
# Windows
set OPENAI_API_KEY=...
# macOS/Linux
export OPENAI_API_KEY=...

Coding Agent

A minimal coding agent inspired by Raising the bar on SWE-bench in 250 lines of Python code.

python code.py <directory>
👤 User: Explain this code to me
🤖 I'll help you understand the code in this repository. Let's first explore the repository structure to get a better understanding of what we're looking at.
🔍 > view .
Let's check the main code file, gpt2.py:
🔍 > view gpt2.py
Let's also check the README to understand more about this project:
🔍 > view README.md
This repository contains a minimalist implementation of OpenAI's GPT-2 language model using PyTorch.
...

Computer Use Agent

A minimal computer use agent in 100 lines of Python code.

pip install pyautogui
python cua.py
👤 User: Open browser at lutzroeder.com
   screenshot {}

🤖 Action: Opening web browser, checking Edge icon
   click {'button': 'left', 'x': 1388, 'y': 1544}
   wait {}

🤖 Action: Navigating to lutzroeder.com in Edge
   click {'button': 'left', 'x': 1056, 'y': 104}
   type {'text': 'lutzroeder.com'}
   keypress {'keys': ['ENTER']}
   wait {}

🤖 Agent: The website lutzroeder.com is open in the browser...

👤 User: 

Research Agent

A minimal research agent in 100 lines of Python code.

python research.py
👤 User: top news today
🤖 Planning ✔
🔍 Searching ✔
📝 Summarizing ✔

This comprehensive report synthesizes today's top news...

About

Minimal coding, computer-use and deep research agents using the OpenAI Agents SDK

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages