Video Tutorial: Your First Agent

Create Your First Agent

Let’s create a project with our default Eliza character that can chat and take actions.
1

Create Your Project

Create a new elizaOS project using the interactive CLI:
Terminal
elizaos create
The CLI is for building agents and projects. The monorepo is only for contributing to elizaOS core. See CLI vs Monorepo.
2

Configure Your Project

During the interactive setup, you’ll be prompted to make the following selections:
  1. Project Name: Enter your desired project name
  2. Database: Select pglite for a lightweight, local PostgreSQL option
  3. Model Provider: Select OpenAI for this quickstart guide
  4. API Key: You’ll be prompted to enter your OpenAI API key
You can get an OpenAI API key from the OpenAI Platform.
Both database and model provider choices can be reconfigured later.
3

Navigate to Your Project

Change directory to your newly created project (replace with your project name):
Terminal
cd my-eliza-project
4

Start Your Agent

Launch your elizaOS project:
Terminal
elizaos start
Wait a few seconds for the server to start up.
5

Chat with Your Agent

Open your browser and navigate to:
http://localhost:3000
Start chatting with Eliza through the web interface!

Troubleshooting

If you’re getting authentication or configuration errors:Open your project in Cursor (or any IDE) and look at the .env file in your project root. Make sure these are set correctly:
OPENAI_API_KEY=your-actual-api-key-here
PGLITE_DATA_DIR=/path/to/your/project/.eliza/.elizadb
Common issues:
  • OpenAI API key is missing, invalid, or has extra spaces/quotes
  • Wrong OpenAI API key format (should start with sk-)
  • OpenAI account has no credits remaining
Note: You can also configure environment variables in the terminal with elizaos env
If you’re having database issues, check your .env file for the database path:
PGLITE_DATA_DIR=/path/to/your/project/.eliza/.elizadb
Common issues:
  • Database path is incorrect in .env file
  • .eliza/.elizadb directory doesn’t exist or has wrong permissions
  • Database corruption (recreate the project if this happens)
When in doubt, turn it off and on again:
  • Stop the server with Ctrl+C, then start it again with elizaos start
  • Check the installation guide to confirm you installed everything correctly
Still can’t access the frontend after 10 seconds?
  • If you can’t reach http://localhost:3000, delete your project and start fresh
  • Navigate to the folder containing your project, then run:
Terminal
rm -rf my-eliza-project && elizaos create
  • Follow the Quickstart steps again carefully