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

# management
       [Open in ChatGPT](https://chatgpt.com/?q=Read%20https%3A%2F%2Fdocs.knitli.com%2Fcodeweaver%2Fapi%2Fserver%2Fmanagement%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%2Fmanagement%2F.%20I%20want%20to%20ask%20questions%20about%20it.)[View in Markdown](/codeweaver/api/server/management.md)       [Share on LinkedIn](https://www.linkedin.com/sharing/share-offsite/?url=https%3A%2F%2Fdocs.knitli.com%2Fcodeweaver%2Fapi%2Fserver%2Fmanagement%2F)[Share on X](https://x.com/intent/tweet?url=https%3A%2F%2Fdocs.knitli.com%2Fcodeweaver%2Fapi%2Fserver%2Fmanagement%2F&text=management)[Share on Threads](https://threads.net/intent/post?url=https%3A%2F%2Fdocs.knitli.com%2Fcodeweaver%2Fapi%2Fserver%2Fmanagement%2F&text=management)[Share on Bluesky](https://bsky.app/intent/compose?text=management%20https%3A%2F%2Fdocs.knitli.com%2Fcodeweaver%2Fapi%2Fserver%2Fmanagement%2F)[Share on Facebook](https://www.facebook.com/sharer/sharer.php?u=https%3A%2F%2Fdocs.knitli.com%2Fcodeweaver%2Fapi%2Fserver%2Fmanagement%2F)[Share on Reddit](https://reddit.com/submit?url=https%3A%2F%2Fdocs.knitli.com%2Fcodeweaver%2Fapi%2Fserver%2Fmanagement%2F&title=management)[Share on Hacker News](https://news.ycombinator.com/submitlink?u=https%3A%2F%2Fdocs.knitli.com%2Fcodeweaver%2Fapi%2Fserver%2Fmanagement%2F&t=management)[Share on Email](mailto:?subject=management&body=https%3A%2F%2Fdocs.knitli.com%2Fcodeweaver%2Fapi%2Fserver%2Fmanagement%2F)[Share on WhatsApp](https://wa.me/?text=management%20https%3A%2F%2Fdocs.knitli.com%2Fcodeweaver%2Fapi%2Fserver%2Fmanagement%2F)[Share on Telegram](https://t.me/share/url?url=https%3A%2F%2Fdocs.knitli.com%2Fcodeweaver%2Fapi%2Fserver%2Fmanagement%2F&text=management)
# `codeweaver.server.management`
[Section titled “codeweaver.server.management”](#codeweaverservermanagement)
Management HTTP server for observability and monitoring.

Runs independently of MCP transport choice (stdio or HTTP). Provides health, stats, metrics, and settings endpoints.

## Class: `ManagementServer`
[Section titled “Class: ManagementServer”](#class-managementserver)
HTTP server for management endpoints.

Always runs on HTTP (port 9329 default), independent of MCP transport. Provides observability endpoints for monitoring and debugging.

Reuses existing endpoint handlers from app_bindings.py.

### Method: `create_app`
[Section titled “Method: create_app”](#method-create_app)

**

```
create_app()
```

Create Starlette app with management routes.

Routes are conditionally registered based on endpoint_settings (matching pattern from app_bindings.py).

IMPORTANT: Reuses existing handlers from app_bindings.py.

### Method: `get_instance`
[Section titled “Method: get_instance”](#method-get_instance)

**

```
get_instance()
```

Get the current management server instance.

### Method: `is_shutdown_requested`
[Section titled “Method: is_shutdown_requested”](#method-is_shutdown_requested)

**

```
is_shutdown_requested()
```

Check if shutdown has been requested.

### Method: `request_shutdown`
[Section titled “Method: request_shutdown”](#method-request_shutdown)

**

```
request_shutdown()
```

Request graceful shutdown of the daemon.

### Method: `start`
[Section titled “Method: start”](#method-start)

**

```
start()
```

Start management server.

Args: host: Server host (default: 127.0.0.1) port: Server port (default: 9329)

### Method: `stop`
[Section titled “Method: stop”](#method-stop)

**

```
stop()
```

Stop management server gracefully.

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

**

```
favicon()
```

Serve the CodeWeaver favicon (SVG format).

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

**

```
health()
```

Return enhanced health information as JSON (FR-010-Enhanced).

Provides comprehensive system health including:

 - Overall status (healthy/degraded/unhealthy)
 - Indexing progress and state
 - Service health for all providers
 - Statistics on indexed content and queries

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

**

```
settings()
```

Get the current settings.

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

**

```
settings_info()
```

Return current settings as JSON.

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

**

```
shutdown_handler()
```

Request graceful shutdown of the daemon.

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

**

```
state_info()
```

Return the complete application state as JSON.

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

**

```
stats_info()
```

Return current session statistics as JSON.

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

**

```
status_info()
```

Return current operational status (progress, failover, runtime state).

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

**

```
version_info()
```

Return current version information as JSON.