Configuration settings of the build agent are stored in a configuration file <TeamCity Agent Home>/conf/buildagent.properties.
The file can also store properties that will be published on the server as Agent properties and can participate in the Agent Requirements expressions.
Also, all the system and environment properties defined in the file will be passed to every build run on the agent.
The file is a Java properties file.
A quick guide is:
- use property_name=value<newline> syntax
- use "#" in the first position of the line for a comment
- use "/" instead of "\" as the path separator. If you need to include "\" escape it with another "\".
- whitespaces within a line matter
This is an example of the file:
 | Please make sure that the file is writable for the build agent process itself. For example the file is updated to store its authorization token that is generated on the server-side. |
The file can be edited while the agent is running: the agent detects the change and restarts loading the new changes automatically.
Also: