A background agent is an AI agent that works on a task on its own while you do something else. You give the goal, it moves forward without holding your screen, and notifies you when it is done or when it needs a decision.
Como funciona
In common use, you chat with the agent and wait for each response. In background mode, the task becomes a job that runs separate from your session.
The agent reads the code, plans, edits files, runs tests and fixes what fails, all without step by step supervision. At the end, it delivers a result for review, such as a set of changes ready to approve.
To avoid messing up your work, it is common for each agent to use an isolated copy of the project, such as a worktree or a separate Git branch. This way, several agents can run at the same time without stepping on each other.
You stay in control: you set permissions, limits and review the result before merging it into the main code.
Exemplo prático
You have three pending items: update a library, write tests for a module and fix a small bug. Instead of doing one at a time, you launch three background agents.
Meanwhile, you attend a meeting. When you come back, you find three change proposals ready. You read each one, approve two and ask for an adjustment on the third.
A typical command for a code agent in non interactive mode would look something like this, adjusted to your tool:
agente --tarefa "escrever testes para o módulo de pagamentos" --branch testes-pagamentosThe command name varies by tool; check the official documentation for the one you use.
Para que serve
It is useful to save time on well defined and lengthy tasks: migrations, tests, refactorings, small fixes and code research.
It also allows you to parallelize work, since more than one agent can run at the same time. In bridgecode, for example, you can track several agents in isolated spaces in one place.
The main care is review. Since the agent works without being observed, quality depends on automated tests and a good read of the result before accepting.
Diferença entre agente em segundo plano e agente na nuvem
A background agent describes how it works: without holding you up. It can run on your machine. A cloud agent describes where it runs: on remote servers. A cloud agent usually also works in the background, but not every background agent is in the cloud.