> ## Documentation Index
> Fetch the complete documentation index at: https://agno-v2-codex-docs-audit-20260719-0149.mintlify.site/llms.txt
> Use this file to discover all available pages before exploring further.

# Background Tasks

> Post-hooks, evals, and validator agents run as non-blocking FastAPI background tasks in AgentOS.

| Example                                                                                          | Description                                                                                                                              |
| ------------------------------------------------------------------------------------------------ | ---------------------------------------------------------------------------------------------------------------------------------------- |
| [Background Evals Example](/examples/agent-os/background-tasks/background-evals-example)         | Run one AgentAsJudgeEval post-hook synchronously and another in the background in AgentOS.                                               |
| [Background Hooks Decorator](/examples/agent-os/background-tasks/background-hooks-decorator)     | Opt individual hooks into background execution with @hook(run\_in\_background=True), leaving other post-hooks in the normal flow.        |
| [Background Hooks Example](/examples/agent-os/background-tasks/background-hooks-example)         | Enable AgentOS-wide background hooks with run\_hooks\_in\_background=True so all pre- and post-hooks run after the API response is sent. |
| [Background Hooks Team](/examples/agent-os/background-tasks/background-hooks-team)               | Attach a non-blocking post-hook to a researcher/writer Team that logs run id and content length after the response is sent.              |
| [Background Hooks Workflow](/examples/agent-os/background-tasks/background-hooks-workflow)       | Run per-step agent post-hooks in the background across an analyzer/summarizer Workflow served by AgentOS.                                |
| [Background Output Evaluation](/examples/agent-os/background-tasks/background-output-evaluation) | Use a validator agent to evaluate the main agent's output as a background task.                                                          |
| [Evals Demo](/examples/agent-os/background-tasks/evals-demo)                                     | Register an AccuracyEval for a calculator agent backed by PostgresDb and browse eval runs through the AgentOS eval endpoints.            |
