This repository demonstrates how to set up a basic agent with tool calling.
Follow the step-by-step tutorial on how to customize the agent tool example/
- 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 -p 9233:9233 -p 10233:10233 ghcr.io/restackio/restack:mainIf using uv:
uv venv && source .venv/bin/activateIf using pip:
python -m venv .venv && source .venv/bin/activateIf using uv:
uv sync
uv run devIf using pip:
pip install -e .
python -c "from src.services import watch_services; watch_services()"Duplicate the env.example file and rename it to .env.
Obtain a Restack API Key to interact with the 'gpt-4.1-mini' model at no cost from Restack Cloud
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/AgentChatToolFunctions
{
"agentId": "{agent_id}",
"runId": "{run_id}",
"eventName": "messages",
"eventInput": {
"messages": [{"role": "user", "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/AgentChatToolFunctions/:agentId/:runId
and the payload:
{
"eventName": "messages",
"eventInput": {
"messages": [{"role": "user", "content": "What clothes are currently on sale?"}]
}
}
You can replay and follow the agent run in the UI.
Now, you can simply trigger more events from the Developer UI by clicking in the timeline on 'Send again' for the event and change the payload.
To deploy the application on Restack, you can create an account at https://console.restack.io



