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

Skip to content

Local Development with Sagentic ​

Developing autonomous agents with Sagentic is streamlined and efficient, thanks to the local development server that features hot reload. Here's how to utilize it effectively.

Starting the Dev Server ​

To launch your local development server, navigate to your project directory and execute the folowing command:

bash
npm run dev
bash
yarn dev
bash
sagentic run .

Hot Reload and Automatic Compilation ​

The local development server watches for code changes and automatically compiles the project, loading updated agent classes into its namespace. This hot reload feature allows for immediate feedback and iteration, enhancing the development experience.

HTTP API and GUI ​

The server operates on port 3000 and exposes an HTTP API, which can be accessed programmatically, via curl, or through HTTP clients like Insomnia.

TIP

A development GUI is also in the works and will soon provide an intuitive interface for managing and testing your agents.

Spawning Agents with CURL ​

To spawn an agent, use the following curl command, replacing ...agent input data with the JSON data that matches your agent's input schema, and AgentType with the name of your agent's class:

bash
curl -X POST http://localhost:3000/spawn -H "Content-Type: application/json" -d '{
  "type": "AgentType",
  "options": {
    ...agent input data
  }
}'

The response will conform to the agent's output type, allowing you to validate the agent's functionality.

Listing Loaded Agents with CURL ​

To retrieve a list of currently loaded agents, use this curl command:

bash
curl http://localhost:3000/

This will give you a quick overview of the agents ready to be spawned.

One-Command Deployment ​

Forget the hassle of API development; Sagentic.ai plans to provide a hosting platform that mirrors the local development server's functionality. Deploying your agents, regardless of scale, will be as straightforward as running:

bash
npm run deploy
bash
yarn deploy
bash
sagentic deploy

This command can be integrated into your local development workflow or your CI pipeline, ensuring a smooth transition from development to live environments.

TIP

This feature is coming soon! In the meantime, you can deploy your project with the development server bundled on monk.io.