Environment Setup

Before you can start running your oracle agent, you need to configure your environment variables and set up the necessary credentials for the LLM provider and social media platforms. This section will guide you through the process of setting up your .env file and obtaining the required tokens and credentials.
Configuring the .env File
-
In the root directory of your oracle framework project, locate the
.env.examplefile. -
Create a copy of this file and rename it to
.env. -
Open the
.envfile in your preferred text editor. -
Fill in the required environment variables as described in the following sections.
Note
The only REQUIRED fields are LLM_PROVIDER_URL and LLM_PROVIDER_API_KEY. You don't need to supply a Discord API key if you're not going to deploy your agent to Discord. The same applies to all platforms. You can always use the CLI mode to start interacting with your agent.
LLM Provider Credentials
oracle framework supports various LLM providers, such as OpenRouter, RedPill, and OpenAI. To use an LLM provider, you need to get the necessary credentials and add them to your .env file.
OpenRouter (Recommended)
-
Sign up for an account at OpenRouter.
-
Obtain your API key from the OpenRouter dashboard.
-
In your
.envfile, set the following variables:
RedPill
-
Sign up for an account at RedPill.
-
Obtain your API key from the RedPill dashboard.
-
In your
.envfile, set the following variables:
OpenAI
-
Sign up for an account at OpenAI.
-
Obtain your API key from the OpenAI dashboard.
-
In your
.envfile, set the following variables:
Twitter Account Credentials
To enable your oracle agent to interact with Twitter, you need to provide your Twitter account credentials in the .env file.
- In your
.envfile, set the following variable:
Telegram Bot Token
To run your oracle agent on Telegram, you need to create a bot and obtain its token.
-
Start a conversation with the BotFather on Telegram.
-
Follow the instructions to create a new bot and obtain its token.
-
In your
.envfile, set the following variable:
Discord Bot Token
To run your oracle agent on Discord, you need to create a bot and obtain its token.
-
Go to the Discord Developer Portal.
-
Create a new application and add a bot to it.
-
Obtain the bot token from the "Bot" section of your application settings.
-
In your
.envfile, set the following variable:
With your .env file configured and the necessary credentials in place, you're now ready to create your agent and start running it on various platforms.