You will need to create an account for your bot if you haven't already done so. Click here when logged in to create the account, linking it to yours. (If you do not create the bot account while logged in, it is likely to be blocked as a possible sockpuppet or unauthorised bot until you verify ownership)
Ensure that you have read the bot policy and that your bot is compliant with it, and that your idea isn't listed as a frequently denied bot.
Create a userpage for your bot, linking to your userpage (this is commonly done using the
{{bot}} template) and describing its functions. You may also include an 'emergency shutoff button' (template here) just in case anything goes wrong.
If your task could be controversial (e.g. most bots making non-maintenance edits to articles and most bots posting messages on user talk pages), seek consensus for the task in the appropriate forums. Common places to start include WP:Village pump (proposals) and the talk pages of the relevant policies, guidelines, templates, and/or WikiProjects. Link to this discussion from your request for approval.
II
Filing the application
Replace BotName with your bot's user name in the box below and click the button. If this is a request for an additional task, put a task number as well (e.g. BotName 2).
Complete the questions on the resulting page and save it.
Your request must now be added to the correct section of the main approvals page: Click here and add
{{BRFA}} to the top of the list, directly below the comment line.
For a first request: use {{BRFA|bot name||Open}}
For an additional task request: use {{BRFA|bot name|task number|Open}}
III
During the approvals process
During the process, an approvals group member may approve a trial for your bot (typically after allowing time for community input) and move the request to this section.
Run the bot for the specified number of edits/time period, then add
After the trial edits have been reviewed and enough time has passed for any more discussion, a BAG member will approve or deny the request appropriately.
For approved requests: The request will be listed here. If necessary, a bureaucrat will flag the bot within a couple of days and you can then run the task fully (it's best to wait for the flag, to avoid cluttering recent changes). If the bot already has a flag, or is to run without one, you may start the task when ready.
For denied/expired/withdrawn requests: The request will be listed at the bottom of the main BRFA page in the relevant section.
It is also good practice to list your bot on the bot status page to let other Wikipedians know about your bot and what it is doing.