Getting Started

In this guide, we'll walk you through the installation and setup process, provide a "Hello World!" example, and explain the basics of creating and executing tools with the agent. By the end of this guide, you'll have everything you need to start using yAgents effectively.

Installation and Setup

Before you begin, ensure that you have git and pip installed on your system. If not, please follow the installation instructions for git and pip.

To install yAgents, open your terminal and run the following commands:

pip install yeagerai-agent
yeagerai-agent

This will install the necessary dependencies and set up yAgents on your system. After the first run, yAgents will create a .env file (if it doesn't, create one yourself). Open the .env file and add your OpenAI API key as follows:

OPENAI_API_KEY=<your_openai_api_key_here>

We recommend using GPT-4, as yAgents is designed to work seamlessly with this language model. However, the tool can also work with GPT-3 if the problem is broken down sufficiently.

Note: A section on connecting other LLMs will be added soon.

Creating and Executing Tools with yAgents

yAgents makes it easy to create and execute AI-powered tools. Here's a brief overview of the process:

  1. Create a tool: To create a tool, provide a natural language prompt to yAgents. The prompt should clearly describe the tool's purpose and functionality. For example:

create a tool that returns the n-th prime number
  1. Write tests, code, and solution sketches: For more complex tools or agents, you may need to provide multiple prompts to guide yAgents through the development process. A solution sketch is a high-level description or outline of the tool, which helps yAgents understand the structure and requirements of the tool. For instance:

Let's work on the solution sketch of an agent that can search GitHub for LangChain-related projects, read their README.md files, and summarize them using GPT-4
  1. Load the tool into the toolkit: To load a tool into yAgents, simply provide a command to yAgents that says so. For example:

load the tool that you just created it into your toolkit
  1. Execute the tool: To run a tool or agent, simply provide a command to yAgents that includes the name of the tool and any required parameters. For example:

generate the 50th prime number

As you become more familiar with yAgents, you can create more advanced tools and agents to automate your work and enhance your productivity. Happy coding!

"Hello World!"

When you prompt yAgents with "create a tool that prints hello world", it will generate a simple tool that can print the message "Hello, World!". Here's a breakdown of the steps yAgents takes to create this tool:

  1. Defines the tool's specifications and solution sketch

  2. Generates the test suite and the source code

  3. Attempts to run the tool

  4. If it finds an issue it attempts to fix it

  5. Attempts to run it again

  6. Loads the tool

  7. You can call him by saying "execute hello world"

This example demonstrates how yAgents can create simple tools by understanding the requirements and generating the necessary code.

The run mechanism and self-improvement tool are planned for future development, which will allow tests to be run and code to be improved once an issue has been found.

As you explore yAgents and create more tools, remember that the agent is designed to work seamlessly with GPT-4 but can also be used with GPT-3 if necessary. Just ensure that the problem is broken down into smaller tasks for GPT-3 compatibility.

Last updated