File size: 2,009 Bytes
1f2d50a
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
# KGraph-MCP Documentation Navigation

This file defines the navigation structure for the KGraph-MCP documentation,
particularly for the dynamically generated API documentation.

## API Reference Structure

The API documentation is automatically generated using Sphinx and integrated
with MkDocs through the following structure:

### FastAPI Framework (`api/`)
- Core application structure
- Route handlers and endpoints
- Middleware components
- Request/response models

### Agent Framework (`agents/`)
- AI agent planning system
- Execution engine
- Task orchestration
- Agent communication

### Knowledge Graph Services (`kg_services/`)
- Graph database operations
- Ontology management
- Semantic search
- Embedding services

## Navigation Guidelines

1. **Automatic Generation**: API documentation is generated automatically
   from Python docstrings using Sphinx autodoc.

2. **Cross-References**: Use the `:doc:` role for documentation links
   and `:mod:`, `:class:`, `:func:` for API references.

3. **Module Organization**: Each module gets its own section with
   an index page and individual pages for major components.

4. **Source Integration**: All documentation includes links back to
   the source code for transparency and easy navigation.

## Custom Directives

The documentation supports several custom directives:

- **automodule** - Automatic module documentation
- **autoclass** - Automatic class documentation  
- **autofunction** - Automatic function documentation
- **note** - Important notes and warnings
- **example** - Usage examples

## Sphinx Extensions Used

- **sphinx.ext.autodoc** - Automatic documentation from docstrings
- **sphinx.ext.napoleon** - Google/NumPy docstring support
- **sphinx.ext.viewcode** - Source code links
- **sphinx.ext.intersphinx** - Cross-project references
- **sphinx_autodoc_typehints** - Type hint documentation

This navigation structure ensures consistent, comprehensive API documentation
that integrates seamlessly with the main MkDocs site.