Hey there.
Eden here.
And in this video, we'll be setting up our project for our reflection agent.
So we'll create the project directory, and we'll use poetry to create our virtual environment and to
install our dependencies.
We'll then open PyCharm and configure it to point to the virtual environment we are using.
And we'll create a dot env file that will hold all of our open AI API keys and API keys, because we're
going to be using Lindsmith for tracing.
Let's see into desktop and create a new directory and we'll call it reflection agent.
We'll CD into it.
And now we want to write poetry in it to initialize our virtual environment and to start installing
our packages.
So I'm going to see I have a pyproject.toml and now I want to install the dependencies.
We'll install Python Dotenv black eishort for formatting and environment variables.
And of course we'll install link chain link chain OpenAI I.
And how can we not forget landgraaf.
So this would take a couple of seconds.
And all of our dependencies are installed.
Now I want to create a new file a dot env file.
And let's now open PyCharm.
And open our project.
So I'm going to look for reflection agent.
And I'm going to open everything in our IDE.
Now notice on the bottom right that PyCharm detected our poetry virtual environment.
And our project interpreter is configured to point to the environment with the packages installed.
And lastly, we want to populate the dot env file with our environment variables.
So we need the open ai API key because we're going to talk to GPT four turbo.
We need the API key because we need a search engine to search online.
And we need the API key because we're going to be leveraging Langschmidt for monitoring and tracing.
So let's also set link length chain tracing v2 equals true.
And we'll call the link chain project reflection agent.
So that would be displayed in the UI.
All right.
So let's now create a new file the main file.
And let's write the boilerplate code if name equals main.
And we want to print hello reflection.
Let's configure our PyCharm runner.
So I'm going to click Edit Configurations I'm going to click the plus button I'm going to select Python.
Let's change the name here to be main.
And in the script I'm going to choose our Main.py file.
And let's click on apply.
And okay.
And let's add from Dotenv import Dotenv.
And let's load the environment variables and run everything.
And we can see it's working.
The environment variables are properly loaded.
And we're ready to continue and start writing our agent.