Prerequisites
- An environment with Python 3.10 or later installed.
- Blocks account and API key.
- Completed onboarding.
If you’d like to use Blocks with other providers such as Gitlab or Bitbucket, please reach out: dev@blocksorg.com.
1
Install Blocks
2
Initialize Blocks
.blocks
directory in the current working directory.3
Create an agent
The easiest way to create an agent is to use the This will create a new agent in the Below is an example agent you can copy to get started that uses Smolagents to implement a simple Slack agent that responds in the same thread as the user that mentioned it.
create
command..blocks
directory with the following structure:4
Register an agent
Agents are registered with the
push
command; specify the filename relative to your current working directory. All agents defined the file will be registered, however you can only register one file at a time.Project Structure
The.blocks
directory is where agent source code is defined. A typical project structure looks like the following:
pip
packages.