Skip to content

Commit 772b709

Browse files
committed
Merge main into openhands/rename-all-hands-ai-to-openhands and resolve conflicts\n\n- Resolve modify/delete conflict by adopting main: remove tracked agent-sdk directory (CI checks it out for sync workflows)\n\nCo-authored-by: openhands <openhands@all-hands.dev>
2 parents 1b90602 + f359641 commit 772b709

2 files changed

Lines changed: 47 additions & 8 deletions

File tree

Lines changed: 47 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,29 @@
1-
# Documentation System Overview
1+
# OpenHands SDK Documentation Guidelines
22

3-
The documentation for this project follows a synchronized approach where code examples in the docs are automatically kept in sync with the actual example files in the agent-sdk repository.
3+
These instructions are ONLY for modifying the documentation associated with the agent SDK which mainly lives under the
4+
sdk folder.
45

6+
## Repository Structure
7+
8+
Applicable files when modifying the agent SDK documentation:
9+
10+
```
11+
docs/
12+
├── .openhands/microagents/sdk-guidelines.md # Guidelines for changing SDK documentation (this file)
13+
├── .github/
14+
│ ├── scripts/
15+
│ │ └── sync_code_blocks.py # Code synchronization script
16+
│ └── workflows/ # CI/CD workflows
17+
├── sdk/ # Agent SDK documentation
18+
│ ├── guides/ # SDK tutorials and guides
19+
│ └── arch/ # Architecture documentation
20+
└── docs.json # Mintlify navigation configuration
21+
```
22+
23+
## Agent SDK Documentation System Overview
24+
25+
The documentation follows a synchronized approach where code examples are automatically kept in sync with actual
26+
example files in the agent-sdk repository.
527

628
## Automatic Code Synchronization
729

@@ -43,11 +65,12 @@ pattern = r'```python[^\n]*\s+(examples/[^\s]+\.py)\n(.*?)```'
4365
- Captures file path: `examples/01_standalone_sdk/02_custom_tools.py`
4466
- Captures code content between opening and closing ```
4567

46-
4768
## MDX Documentation Format
4869

4970
### Standard Structure
50-
Documentation is deployed with Mintlify from GitHub. The files follow this pattern (see `docs/sdk/guides/custom-tools.mdx` and `docs/sdk/guides/mcp.mdx` as reference):
71+
72+
Documentation is deployed with Mintlify from GitHub. The files follow this pattern
73+
(see `docs/sdk/guides/custom-tools.mdx` and `docs/sdk/guides/mcp.mdx` as reference):
5174

5275
1. **Frontmatter** - YAML metadata with title and description
5376
2. **Introduction** - Brief overview of the feature
@@ -170,7 +193,6 @@ This example is available on GitHub: [examples/01_standalone_sdk/02_custom_tools
170193
4. **Consistency**: Follow existing patterns
171194
- Use same icon/expandable syntax
172195
- Include "Running the Example" bash block
173-
- Add <Note> component with GitHub link
174196
- Structure sections similarly to other guides
175197

176198
5. **Testing**: Before committing documentation
@@ -213,6 +235,24 @@ name: Example Workflow
213235
on: [push]
214236
```
215237
216-
## Mintlify documentation
238+
## Mintlify Documentation
239+
240+
You can check https://www.mintlify.com/docs for documentation on what our doc site supports.
241+
242+
## CI/CD Workflows
243+
244+
### Code Synchronization Workflow
245+
- **File**: `.github/workflows/sync-docs-code-blocks.yml`
246+
- **Triggers**: Push to any branch, daily at 2 AM UTC, manual dispatch
247+
- **Purpose**: Keeps code blocks in sync with agent-sdk examples
248+
- **Actions**: Checks out both repositories, runs sync script, commits changes if needed
249+
250+
### OpenAPI Sync Workflow
251+
- **File**: `.github/workflows/sync-agent-sdk-openapi.yml`
252+
- **Purpose**: Syncs OpenAPI specifications for API documentation
253+
254+
## Notes
217255

218-
You can check https://www.mintlify.com/docs for documentation on what our doc site supported.
256+
- For agent-sdk examples, ensure the file path in code blocks is correct
257+
- For short agent-sdk examples, you don't need `expandable` in example file
258+
- When you add new pages that need to refer to agent-sdk example script, you should create an empty block with correct block name (refer to the python example script correctly), then run `python .github/scripts/sync_code_blocks.py` to sync it

‎agent-sdk‎

Lines changed: 0 additions & 1 deletion
This file was deleted.

0 commit comments

Comments
 (0)