Skip to content

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

lutzroeder/agents

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

10 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 200 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 200 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

No packages published

Languages