Overview

In this example, we will create a sample agent, and while creating this agent, we will have the opportunity to analyze and learn Upsonic’s fundamental mechanisms.

Agents are like electronic employees that perform your tasks for you. Properly positioning them allows you to allocate time for more important and high-value tasks instead of spending time on many time-consuming and low-value-added tasks.

Basic Agent

basic_agent.py
from upsonic import Agent, Task

task = Task("Do an in-depth analysis of US history")

agent = Agent("Historian")

agent.print_do(task)

To run the agent, install dependencies and export your OPENAI_API_KEY.

1

Setup your virtual environment

2

Install dependencies

3

Put your OpenAI key

4

Run the agent to do the task

python basic_agent.py