timbal start runs uv for each workforce member and bun for the API and UI, and it stops if either tool is missing.
Run without an API key
TestModel answers from a list you provide. It does not call a provider and does not need a key. Import it from timbal.core.
collect() is a method of the object agent(...) returns, not of Agent. Pass responses or a handler(messages); do not pass both. model.call_count increments once per model call. Swap the same agent to a string model (openai/gpt-5-mini and an OPENAI_API_KEY, or platform auth from timbal configure) when you want a live answer. A voice session cannot use TestModel for speech; see Your first voice agent.
Create a Timbal Project
Run the following Timbal CLI command to create a new project:Project Structure
After running the command, your project will look like this:Run locally
Runtimbal configure before your first timbal start — it stores your Timbal credentials locally. For model calls, platform auth from configure is enough; otherwise set OPENAI_API_KEY in <project>/.env (or the key for whichever provider your model uses).
From the project directory, start the full stack — API, workforce (your Python agents/workflows), and UI if you included one:
timbal start prints the local URLs and keeps services running until you quit (q). While it’s running you can press o to open the UI in your browser, or h for other commands.
If <project>/.env exists, timbal start loads it automatically and injects those variables into every service (UI, API, and all workforce members). Per-member overrides can live in workforce/<name>/.env. See Environment variables for scoping, precedence, and overrides.
Customize your agent
timbal create scaffolds a starter agent.py (or workflow.py) under workforce/<name>/. Open that file and edit the Agent definition.
A minimal agent needs only a name and model:
agent.py
If you use your own provider key instead of platform auth, set it in a
.env file at the project root (e.g. OPENAI_API_KEY for OpenAI models) — timbal start picks it up automatically. Never commit .env to version control.main() at the bottom of agent.py). After editing, restart with timbal start to pick up changes in the full app, or run the file directly for a quick loop.
You can learn more about the Agent class and all the available options in the Agents section.
Adding Tools
Agents become powerful with tools. In Timbal, you can use both built-in tools and custom tools (functions you write yourself).Built-in tools
Timbal includes several ready-to-use tools. For example, theWebSearch tool allows your agent to search the internet for real-time information:
agent.py
Custom Tools
Creating custom tools is straightforward—just write a function. Here’s a simple example that returns the current date and time:agent.py