---
title: "TF2 Bot Commands: Add, Kick and Control Bots on Your Server"
description: "tf_bot_add, tf_bot_kick and tf_bot_quota explained from Valve's source code: why bots come back, bots on custom maps, and which commands need sv_cheats."
url: "https://www.gameserverkings.com/knowledge-base/team-fortress-2/tf2-bot-commands/"
category: "Team Fortress 2"
category_url: "https://www.gameserverkings.com/knowledge-base/team-fortress-2/"
published: "2026-09-28T03:14:09.224Z"
updated: "2026-09-28T03:14:09.224Z"
source_format: "markdown"
site: "GameServerKings"
---

# TF2 Bot Commands: Add, Kick and Control Bots on Your Server

TF2 bot commands come in two families, and only one of them works without cheats. The `tf_bot_*` commands control **TFBots**, the AI bots Valve built on the NextBot system. They don't need `sv_cheats`, and achievements stay enabled. The bare `bot` command spawns **puppet bots**, which stand still until you drive them, and it does nothing unless cheats are on. Most "my bot command doesn't work" questions come from using the second family on a server with cheats off.

This guide sticks to what Valve's own TF2 source code says the commands do. Valve published it in the Source SDK 2013 repository, and in one important place it contradicts the community wiki: how `tf_bot_quota` behaves. You will find the add, kick and quota commands, why bots return after you remove them, how to get bots moving on maps without official support, and the few commands that do need cheats.

## Where to Type TF2 Bot Commands

Every `tf_bot_*` command checks that it came from the server itself or from RCON. Typed into your game console on a dedicated server without `rcon`, it is silently ignored.

- **GSK panel:** open your server's **Console** tab and type the command as it is, e.g. `tf_bot_add 4`.
- **In-game:** authenticate once with `rcon_password YOUR_PASSWORD`, then prefix each command, e.g. `rcon tf_bot_add 4`. [Team Fortress 2 admin commands](/knowledge-base/team-fortress-2/admin-commands/) covers setting the RCON password in `tf/cfg/server.cfg`.

## Adding Bots with tf_bot_add

```
tf_bot_add [count] [class] [team] [difficulty] [name] [noquota]
```

Every argument is optional and they can come in any order. The server works out what each one is:

| Argument | Accepted values |
|---|---|
| count | Any number above 0 |
| class | `scout`, `soldier`, `pyro`, `demoman`, `heavyweapons`, `engineer`, `medic`, `sniper`, `spy` |
| team | `red` or `blue`. Leave it out to auto-assign |
| difficulty | `easy`, `normal`, `hard`, `expert` |
| name | Any other word. Only used when adding a single bot |
| `noquota` | Keeps the bot outside the quota system (see below) |

Examples:

```
tf_bot_add 6                         // six bots, random classes, auto-balanced teams
tf_bot_add 3 heavyweapons red easy   // three easy RED Heavies
tf_bot_add medic blue expert         // one expert BLU Medic
tf_bot_add sniper red "Crocodile"    // one named RED Sniper
```

Note that the Heavy is `heavyweapons`, not `heavy`. Any word the server doesn't recognise as a class, team or difficulty is taken as the bot's **name**, so `tf_bot_add 1 heavy` gives you a random-class bot called "heavy".

Bots take player slots. On your GSK server the player cap is the **Max Players** value on the Startup tab (set by your plan). With `tf_bot_auto_vacate` at its default of `1`, the quota system always leaves one slot free for a human to join. Adding bots beyond the slot count fails with a console error.

## Removing Bots with tf_bot_kick

```
tf_bot_kick all      // every bot
tf_bot_kick red      // every RED bot
tf_bot_kick blue     // every BLU bot
tf_bot_kick "Black Mesa"   // one bot by name; quote names with spaces
```

Add `moveToSpectatorTeam` to move the bots to spectator instead of kicking them. To kill bots without removing them, use `tf_bot_kill` with the same arguments.

Always remove bots with `tf_bot_kick`, not with `kick` or `kickid`. The reason is how the quota works.

## Why Bots Keep Coming Back: tf_bot_quota

This is where Valve's source code and the TF2 wiki disagree. The wiki says `tf_bot_quota` "only has effect if `tf_bot_quota_mode` = fill or match". The actual quota code treats the default `normal` mode as a quota too: it keeps `tf_bot_quota` bots on the server. In addition:

- **`tf_bot_add` raises `tf_bot_quota`** by the number of bots it adds. `tf_bot_add 6` on a fresh server leaves `tf_bot_quota` at `6`.
- **`tf_bot_kick` lowers it** by the number of quota bots it kicks, never below `0`.
- **A plain `kick` or `kickid` doesn't touch the quota**, so the server notices it is a bot short and adds a new one a moment later.

So after `tf_bot_add 6`, the server keeps six bots through map changes until you run `tf_bot_kick all` or set `tf_bot_quota 0`. That is the usual answer to "I kicked the bots and they came back."

| Convar | Default | Effect |
|---|---|---|
| `tf_bot_quota` | `0` | Target number of quota-managed bots |
| `tf_bot_quota_mode` | `normal` | `normal`: keep `tf_bot_quota` bots. `fill`: keep the total at `tf_bot_quota` by subtracting humans on RED and BLU. `match`: keep `tf_bot_quota` bots per human |
| `tf_bot_join_after_player` | `1` | No bots until a human is on a team or in spectator |
| `tf_bot_auto_vacate` | `1` | Keep one slot open for a joining human |
| `tf_bot_difficulty` | `1` | Skill for bots added afterwards: `0` easy to `3` expert |

To have a server that fills itself with bots and hands slots to real players as they join, put this in `tf/cfg/server.cfg`:

``` title="tf/cfg/server.cfg: auto-fill with bots"
tf_bot_quota 12
tf_bot_quota_mode fill
tf_bot_difficulty 2
tf_bot_join_after_player 1
```

Bots added with `noquota` are outside all of this. The quota won't replace them, and `tf_bot_kick` removes them without changing `tf_bot_quota`.

If teams keep getting reshuffled as bots join, check `mp_teams_unbalance_limit`. Autobalance treats bots like players.

## Controlling Bot Classes and Behaviour (No Cheats)

| Convar | Default | Effect |
|---|---|---|
| `tf_bot_force_class <class>` | empty | Every TFBot respawns as this class, e.g. `tf_bot_force_class medic`. Set it to `""` to clear |
| `tf_bot_keep_class_after_death` | `0` | `1` stops bots changing class when they respawn |
| `tf_bot_melee_only` | `0` | `1` limits bots to melee weapons, handy for a Medieval-style server |
| `tf_bot_prefix_name_with_difficulty` | `0` | `1` adds the skill level to bot names, e.g. "Expert Saxton Hale" |
| `tf_bot_taunt_victim_chance` | `20` | Percent chance a bot taunts after killing a player. `0` turns it off |

`tf_bot_difficulty` applies only to bots added afterwards. To change the skill of bots already on the server, kick them and add them again, or name a difficulty directly in `tf_bot_add`.

## Maps Without Bot Support

TFBots need a navigation mesh to move. Valve ships meshes for a set list of official maps, including the egg's default map `cp_dustbowl`. On other maps the bots join but stand in spawn. You can generate a mesh yourself. It needs cheats while you do it:

1. In the Console tab, run `sv_cheats 1`.
2. Run `nav_generate`. The server builds the mesh, saves it as `tf/maps/<mapname>.nav` and reloads the map. Large maps take a while.
3. Run `sv_cheats 0`, then add bots with `tf_bot_add`.

The `.nav` file stays next to the map, so you only need to do this once per map. Don't edit a nav mesh while bots are on the server, because the official wiki warns it is likely to crash the game.

Even with a mesh, bots don't play some modes: Arena, Versus Saxton Hale, Special Delivery, Robot Destruction, PASS Time and Player Destruction all leave most bots in spawn. On Mann vs. Machine the robot side works but player-side bots rarely do. Control Points, King of the Hill, Payload and Capture the Flag maps work best.

## Commands That Need sv_cheats

| Command | Effect |
|---|---|
| `bot -class <class> -team <red\|blue> -name <name>` | Spawn a **puppet** bot with no AI. Other switches include `-count`, `-frozen`, `-targetdummy` and `-teleport` |
| `bot_kick` | Remove puppet bots (TFBots use `tf_bot_kick`) |
| `tf_bot_warp_team_to_me` | Teleport your team's bots to you |
| `tf_bot_fire_weapon_allowed 0` | TFBots go through the motions but never fire |
| `tf_bot_force_jump 1` | Bots jump continuously |
| `tf_bot_reevaluate_class_in_spawnroom 0` | Stops bots switching class in spawn. The wiki's fix for bots added with a set class dying in their spawn room |
| `tf_bot_offense_must_push_time` | How long before the round ends the attacking bots push hard for the objective |
| `nav_generate` | Build a nav mesh (see above) |

`sv_cheats 1` applies to everyone on the server and disables achievements for the session. Turn it back off when you are done.

## FAQ

### Do TF2 bots need sv_cheats?

No. `tf_bot_add`, `tf_bot_kick`, the quota and the class and difficulty convars all work with cheats off, and achievements stay enabled. Only puppet bots (`bot`), nav mesh generation and a handful of debugging convars need cheats.

### How do I add bots to only one team?

`tf_bot_add 6 blue`. For humans against bots, also set `mp_humans_must_join_team red` so players can only join RED. Set `mp_teams_unbalance_limit 0` too (its default is `1`, and `0` disables the check), or autobalance will even the teams out.

### Why does tf_bot_add do nothing?

It was typed in your own game console without `rcon`. Server-only commands are ignored when a regular client sends them. Use the panel's Console tab or `rcon tf_bot_add`.

### How do I remove all bots permanently?

`tf_bot_kick all`, which also brings the quota back to zero. If bots return on the next map, something in `tf/cfg/server.cfg` sets `tf_bot_quota` above `0`. Remove that line.

## What to Read Next

- [Team Fortress 2 admin commands](/knowledge-base/team-fortress-2/admin-commands/): RCON setup and the SourceMod command list
- [Getting started with your Team Fortress 2 server](/knowledge-base/team-fortress-2/getting-started-with-your-team-fortress-2-server/): `server.cfg` baseline and first boot
- [How to use custom maps and set up FastDL for Team Fortress 2](/knowledge-base/team-fortress-2/maps-and-fastdl/): maps you may need to generate a nav mesh for

---

Made with 💜 by GameServerKings
