🔄 Big News! bazed.ai is now sagentic.ai. Same vision, new name!

Skip to content

Installation Guide for Sagentic AF ​

Just like kicking off a new React or Vue project, getting started with Sagentic is refreshingly simple — no surprises. Here's how you can set up your development environment and begin building your own autonomous agents.

Prerequisites ​

Before you install Sagentic AF, make sure you have the following:

  • Node.js version 20 or higher
  • npm (which includes npx)

If you don't have Node.js and npm installed on your machine, head over to the Node.js website to download and install them.

Optionally, in order to deploy your agents to the Sagentic platform, you'll need Sagentic API key. You can create one at any time in your sagentic.ai Dashboard.

Additionally, you'll need an OpenAI API key to interact with the OpenAI services. If you haven't already, you can obtain one from the OpenAI API portal.

Quick Start ​

To create a new Sagentic project, simply run the following command in your terminal:

bash
npx @sagentic-ai/sagentic-af init myproject

This will scaffold a new Sagentic project in the myproject directory. The project comes pre-configured with everything you need to get started.

If you're already in an empty directory where you'd like to initialize your project, you can run:

bash
npx @sagentic-ai/sagentic-af init

Install Dependencies ​

Navigate to your project directory and install the necessary dependencies:

bash
cd myproject
npm install
bash
cd myproject
yarn

Setting Up Your API Key ​

After creating your project, you'll need to set up your OpenAI API key. Locate the .env.example file in the root of your project directory and fill it out with your API keys like so:

bash
OPENAI_API_KEY=sk-...your_openai_api_key_here...
SAGENTIC_API_KEY=...your_sagentic_api_key_here...

Then, rename the file to .env:

bash
mv .env.example .env

This OpenAI API key is essential for the local Sagentic development server to provide an OpenAI API client to your agents.

The Sagentic API key is used to authenticate to Sagentic's cloud services. You can get one in your sagentic.ai Dashboard.

Global Installation ​

For those who prefer not to use npx every time, you can install the sagentic CLI globally on your system using either npm or Yarn. Here's how:

bash
npm install -g @sagentic-ai/sagentic-af
bash
yarn global add @sagentic-ai/sagentic-af

Once installed globally, you can run sagentic commands directly without prefixing them with npx.

That's it! You're now ready to start building with Sagentic. Happy coding!