Today's AI BETA
All Examples

How to run a coding agent in a sandbox with OpenHands

OpenHands Agent Canvas · by Anwar Zahid

Code generation — give an agent a plain-English brief and it plans, writes a Python project, runs the tests, and shows the output. All inside a Docker container.

Hosted on our YouTube channel Watch on YouTube ↗

Prompt
Build a small, dependency-free Python gradebook application in this empty workspace.

Requirements:
1. Create gradebook.py with a Student dataclass and a Gradebook class.
2. Gradebook must add students, reject duplicate IDs, record scores from 0 through 100, and compute each student's average.
3. Add a command-line demo under `if __name__ == "__main__"` that prints a readable summary for at least two students.
4. Create tests/test_gradebook.py using only unittest. Include tests for the normal path, duplicate IDs, invalid scores, and averages.
5. Create a short README.md with run and test commands.
6. Run the complete test suite and the command-line demo. Fix any failures.

Before editing, give me a short plan. At the end, summarize the files created and quote the final test result. Do not install third-party packages and do not modify anything outside this workspace.