This repository contains a quickstart for Restack. It demonstrates how to set up a basic agent with tool call with a basic workflow and functions.
- Docker (for running Restack)
- Python 3.10 or higher
To start the Restack, use the following Docker command:
docker run -d --pull always --name restack -p 5233:5233 -p 6233:6233 -p 7233:7233 ghcr.io/restackio/restack:main
If using uv:
uv venv && source .venv/bin/activate
If using pip:
python -m venv .venv && source .venv/bin/activate
If using uv:
uv sync
uv run dev
If using pip:
pip install -e .
python -c "from src.services import watch_services; watch_services()"
You can run agents from the UI by clicking the "Run" button.
You can run agents from the API by using the generated endpoint:
POST http://localhost:6233/api/agents/AgentTodo
You can run agents with any client connected to Restack, for example:
If using uv:
uv run schedule
If using pip:
python -c "from schedule import run_schedule; run_schedule()"
executes schedule.py
which will connect to Restack and execute the AgentTodo
agent.
In our example we will ask the AI agent to create a todo.
{
"agentId": "{agent_id}",
"runId": "{run_id}",
"eventName": "message",
"eventInput": {
"content": "Can you send an email to the CEO?"
}
}
You can send events to the agent by using the generated endpoint:
PUT http://localhost:6233/api/agents/AgentTodo/:agentId/:runId
and the payload:
{
"eventName": "message",
"eventInput": {
"content": "Can you send an email to the CEO?"
}
}
The LLM will use tool call to create the todo. The creation of the todo will be done in a simple function.
You can replay and follow the agent run in the UI.
Now, you can simply trigger more events from the Developer UI.
In this case, the agent will ask permission to execute the todo.
If confirmed, this time the agent will execute the todo in a 2-step workflow.
To deploy the application on Restack, you can create an account at https://console.restack.io