---
title: background_services | CodeWeaver Docs
description: API reference for codeweaver.server.background_services
url: "https://docs.knitli.com/api/server/background_services"
type: static
generatedAt: "2026-04-17T17:21:09.715Z"
---

# background_services
       [Open in ChatGPT](https://chatgpt.com/?q=Read%20https%3A%2F%2Fdocs.knitli.com%2Fcodeweaver%2Fapi%2Fserver%2Fbackground_services%2F.%20I%20want%20to%20ask%20questions%20about%20it.)[Open in Claude](https://claude.ai/new?q=Read%20https%3A%2F%2Fdocs.knitli.com%2Fcodeweaver%2Fapi%2Fserver%2Fbackground_services%2F.%20I%20want%20to%20ask%20questions%20about%20it.)[View in Markdown](/codeweaver/api/server/background_services.md)       [Share on LinkedIn](https://www.linkedin.com/sharing/share-offsite/?url=https%3A%2F%2Fdocs.knitli.com%2Fcodeweaver%2Fapi%2Fserver%2Fbackground_services%2F)[Share on X](https://x.com/intent/tweet?url=https%3A%2F%2Fdocs.knitli.com%2Fcodeweaver%2Fapi%2Fserver%2Fbackground_services%2F&text=background_services)[Share on Threads](https://threads.net/intent/post?url=https%3A%2F%2Fdocs.knitli.com%2Fcodeweaver%2Fapi%2Fserver%2Fbackground_services%2F&text=background_services)[Share on Bluesky](https://bsky.app/intent/compose?text=background_services%20https%3A%2F%2Fdocs.knitli.com%2Fcodeweaver%2Fapi%2Fserver%2Fbackground_services%2F)[Share on Facebook](https://www.facebook.com/sharer/sharer.php?u=https%3A%2F%2Fdocs.knitli.com%2Fcodeweaver%2Fapi%2Fserver%2Fbackground_services%2F)[Share on Reddit](https://reddit.com/submit?url=https%3A%2F%2Fdocs.knitli.com%2Fcodeweaver%2Fapi%2Fserver%2Fbackground_services%2F&title=background_services)[Share on Hacker News](https://news.ycombinator.com/submitlink?u=https%3A%2F%2Fdocs.knitli.com%2Fcodeweaver%2Fapi%2Fserver%2Fbackground_services%2F&t=background_services)[Share on Email](mailto:?subject=background_services&body=https%3A%2F%2Fdocs.knitli.com%2Fcodeweaver%2Fapi%2Fserver%2Fbackground_services%2F)[Share on WhatsApp](https://wa.me/?text=background_services%20https%3A%2F%2Fdocs.knitli.com%2Fcodeweaver%2Fapi%2Fserver%2Fbackground_services%2F)[Share on Telegram](https://t.me/share/url?url=https%3A%2F%2Fdocs.knitli.com%2Fcodeweaver%2Fapi%2Fserver%2Fbackground_services%2F&text=background_services)
# `codeweaver.server.background_services`
[Section titled “codeweaver.server.background_services”](#codeweaverserverbackground_services)
Initialize background services for the CodeWeaver server.

## Function: `run_background_indexing`
[Section titled “Function: run_background_indexing”](#function-run_background_indexing)

**

```
run_background_indexing()
```

Background task for indexing and file watching.

Args: state: Application state progress_reporter: ProgressReporter instance for user-facing output verbose: Whether to show verbose output debug: Whether debug mode is enabled

## Function: `start_watcher`
[Section titled “Function: start_watcher”](#function-start_watcher)

**

```
start_watcher()
```

Start the file watcher as an asynchronous task.