agentos-project / agentos

The Python Component System (PCS) is an API and CLI for building, running, and sharing Python code. AgentOS is a set of libraries built on top of PCS that make it easy to build, run, and share agents that use Reinforcement Learning.
https://agentos.org
Apache License 2.0
13 stars 4 forks source link

Update example agent to use AgentRun #405

Closed nickjalbert closed 2 years ago

nickjalbert commented 2 years ago

This updates the default agent (created by agentos init) to use AgentRun so that it's compatible with the web frontend. This is part of a larger push to automatically populate the web with data for testing and demo purposes.

This also updates example_agent/random to match the default agent.

Demo:

# Start the local web server in a separate tab
# Clear the local DB by visiting http://localhost:8000/empty_database in your browser
mkdir demo
cd demo
agentos init .
agentos run agent
USE_LOCAL_SERVER=True agentos publish <agent run ID printed out after previous previous command>
# Now visit http://localhost:8000 and see the result of your run

The leaderboard will show something like the following after running the demo script:

Screenshot 2022-06-18 at 16-52-56 AgentOS Leaderboard