Skip to content

Commit 08d24c1

Browse files
lliquidclaude
andauthored
docs(site): introduce Starlight documentation site (#65)
* docs(site): introduce Starlight documentation site Adds an Astro + Starlight documentation site under `docs/site/`, published to GitHub Pages via `.github/workflows/docs.yml`. Sidebar structure: - Overview — intro + "Why AgentCore Runtime" + inline-SVG architecture diagram. - Setup Guide — Prepare agent for RL (with Before/After Tabs + Expressive Code `ins` annotations), three backend setup pages (slime detailed, rllm + verl as previews). - Examples — short per-example pages (math, appworld, migration, officebench) linking to the full upstream READMEs. - API Reference — generated from source docstrings via `docs/site/scripts/gen_api.py` (griffe). Covers the public surface: `AgentCoreRLApp`, `RolloutClient` + `RolloutFuture` + `BatchResult` family, `RewardFunction`, `SlimeRunner`, and the two SGLang patch scripts. - Troubleshooting — per-backend known-issues pages (slime has real content; rllm + verl are preview stubs). Other plumbing: - Custom CSS (`src/styles/custom.css`) tightens typography site-wide and styles the landing-page hero + architecture diagram. - Staging banner rendered site-wide via a custom component. - `pnpm gen:api` regenerates API reference pages from source; output is committed so the Astro build has no Python dependency. * docs(site): rename rllm-model-gateway to model-gateway, drop Tinker references, remove .vscode Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com> * docs(site): remove Tinker references, use rllm only Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com> * docs(site): rename rllm-model-gateway to model-gateway in index Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com> * docs(site): remove Tinker from sidebar navigation labels Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com> * docs(site): lowercase slime in labels, titles, and links Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com> * docs(site): refine rllm/slime setup guides and add rllm extra - Adopt agentcore-rl-toolkit-centric install flow for the rllm backend guide; install via [rllm] extra from this repo, link rllm install docs. - Simplify data-prep sections on both rllm and slime guides to just the JSONL row shape and one example. - Move S3 bucket into prereqs as its own bullet on both guides; refer to runtime ARN / S3 bucket as required SlimeRunner / rllm config args. - Merge required AgentCore config overrides with general rllm CLI knobs into one snippet. - Add [rllm] optional extra in pyproject (rllm @ git+https://...) without pulling rllm[agentcore] to avoid a circular dependency. - Misc edits to overview, index, agent-adaptation, verl guide, troubleshooting/slime, custom.css, and astro.config.mjs. * docs(site): remove staging banner Drop the orange "Staging preview" notice now that the site reflects intended content. Removes the StagingBanner.astro component and the Banner override in astro.config.mjs; per-page frontmatter banners still work via Starlight's default behavior. * docs(site): mark verl as coming soon, drop empty troubleshooting items - Label the verl backend setup link as "(coming soon)" in the sidebar. - Remove troubleshooting sidebar entries for rllm and verl (no matching pages yet); slime troubleshooting remains. * chore: allow direct references in hatch metadata for [rllm] extra The [rllm] optional extra pins rllm via `git+https://...`, which is a PEP 508 direct reference. Hatchling rejects these by default and CI fails at `uv sync` with: "cannot be a direct reference unless field `tool.hatch.metadata.allow-direct-references` is set to `true`". Opt in so the editable install builds in CI. * docs(site): rename Migration example to MigrationBench Use the upstream benchmark name (MigrationBench) consistently in the sidebar label, page title, and examples overview link. * docs(app): fix reserved-keys bullets in app.py docstring The save_result reserved-keys list rendered as a code block on the generated API page (https://lliquid.github.io/agentcore-rl-toolkit/api/core/app/) because the bullets were indented 4 spaces and used RST double-backticks. Markdown turned the indented block into a preformatted block and showed the backticks literally. Use single backticks and a flush-left list. Also fix the matching note in rollout_entrypoint. Regenerated docs/site/src/content/docs/api/core/app.md. --------- Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>
1 parent 2c93684 commit 08d24c1

34 files changed

Lines changed: 7220 additions & 8 deletions

.github/workflows/docs.yml

Lines changed: 55 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,55 @@
1+
name: Docs — build and deploy to GitHub Pages
2+
3+
on:
4+
push:
5+
branches:
6+
- feat/docs-starlight
7+
workflow_dispatch:
8+
9+
permissions:
10+
contents: read
11+
pages: write
12+
id-token: write
13+
14+
concurrency:
15+
group: pages
16+
cancel-in-progress: true
17+
18+
env:
19+
# GitHub Pages serves project sites under /<repo>/. Astro needs
20+
# both `site` and `base` set so emitted URLs include the prefix.
21+
ASTRO_SITE: https://${{ github.repository_owner }}.github.io
22+
ASTRO_BASE: /${{ github.event.repository.name }}/
23+
24+
jobs:
25+
build:
26+
runs-on: ubuntu-latest
27+
defaults:
28+
run:
29+
working-directory: docs/site
30+
steps:
31+
- uses: actions/checkout@v4
32+
- uses: pnpm/action-setup@v4
33+
with:
34+
version: 10
35+
- uses: actions/setup-node@v4
36+
with:
37+
node-version: 22
38+
cache: pnpm
39+
cache-dependency-path: docs/site/pnpm-lock.yaml
40+
- run: pnpm install --frozen-lockfile
41+
- name: Build
42+
run: pnpm build
43+
- uses: actions/upload-pages-artifact@v3
44+
with:
45+
path: docs/site/dist
46+
47+
deploy:
48+
needs: build
49+
runs-on: ubuntu-latest
50+
environment:
51+
name: github-pages
52+
url: ${{ steps.deployment.outputs.page_url }}
53+
steps:
54+
- id: deployment
55+
uses: actions/deploy-pages@v4

docs/site/.gitignore

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
# build output
2+
dist/
3+
# generated types
4+
.astro/
5+
6+
# dependencies
7+
node_modules/
8+
9+
# logs
10+
npm-debug.log*
11+
yarn-debug.log*
12+
yarn-error.log*
13+
pnpm-debug.log*
14+
15+
16+
# environment variables
17+
.env
18+
.env.production
19+
20+
# macOS-specific files
21+
.DS_Store
22+
23+
# reference-only assets — used while designing diagrams, not shipped
24+
.reference/

docs/site/README.md

Lines changed: 49 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,49 @@
1+
# Starlight Starter Kit: Basics
2+
3+
[![Built with Starlight](https://astro.badg.es/v2/built-with-starlight/tiny.svg)](https://starlight.astro.build)
4+
5+
```
6+
pnpm create astro@latest -- --template starlight
7+
```
8+
9+
> 🧑‍🚀 **Seasoned astronaut?** Delete this file. Have fun!
10+
11+
## 🚀 Project Structure
12+
13+
Inside of your Astro + Starlight project, you'll see the following folders and files:
14+
15+
```
16+
.
17+
├── public/
18+
├── src/
19+
│ ├── assets/
20+
│ ├── content/
21+
│ │ └── docs/
22+
│ └── content.config.ts
23+
├── astro.config.mjs
24+
├── package.json
25+
└── tsconfig.json
26+
```
27+
28+
Starlight looks for `.md` or `.mdx` files in the `src/content/docs/` directory. Each file is exposed as a route based on its file name.
29+
30+
Images can be added to `src/assets/` and embedded in Markdown with a relative link.
31+
32+
Static assets, like favicons, can be placed in the `public/` directory.
33+
34+
## 🧞 Commands
35+
36+
All commands are run from the root of the project, from a terminal:
37+
38+
| Command | Action |
39+
| :------------------------ | :----------------------------------------------- |
40+
| `pnpm install` | Installs dependencies |
41+
| `pnpm dev` | Starts local dev server at `localhost:4321` |
42+
| `pnpm build` | Build your production site to `./dist/` |
43+
| `pnpm preview` | Preview your build locally, before deploying |
44+
| `pnpm astro ...` | Run CLI commands like `astro add`, `astro check` |
45+
| `pnpm astro -- --help` | Get help using the Astro CLI |
46+
47+
## 👀 Want to learn more?
48+
49+
Check out [Starlight’s docs](https://starlight.astro.build/), read [the Astro documentation](https://docs.astro.build), or jump into the [Astro Discord server](https://astro.build/chat).

docs/site/astro.config.mjs

Lines changed: 101 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,101 @@
1+
// @ts-check
2+
import { defineConfig } from 'astro/config';
3+
import starlight from '@astrojs/starlight';
4+
5+
// https://astro.build/config
6+
export default defineConfig({
7+
site: 'https://lliquid.github.io',
8+
base: '/agentcore-rl-toolkit',
9+
integrations: [
10+
starlight({
11+
title: 'ART',
12+
description: 'RL training on top of Bedrock AgentCore Runtime.',
13+
customCss: ['./src/styles/custom.css'],
14+
head: [
15+
{
16+
tag: 'script',
17+
attrs: { is: 'inline' },
18+
content: `
19+
try {
20+
if (!localStorage.getItem('starlight-theme')) {
21+
localStorage.setItem('starlight-theme', 'dark');
22+
}
23+
document.documentElement.dataset.theme =
24+
localStorage.getItem('starlight-theme') || 'dark';
25+
} catch {
26+
document.documentElement.dataset.theme = 'dark';
27+
}
28+
`,
29+
},
30+
],
31+
social: [
32+
{
33+
icon: 'github',
34+
label: 'GitHub',
35+
href: 'https://github.com/awslabs/agentcore-rl-toolkit',
36+
},
37+
],
38+
sidebar: [
39+
{ label: 'Overview', slug: 'guides/overview' },
40+
{
41+
label: 'Setup Guide',
42+
items: [
43+
{ label: 'Prepare agent for RL', slug: 'guides/agent-adaptation' },
44+
{
45+
label: 'Training backends',
46+
items: [
47+
{ label: 'slime', slug: 'guides/slime-backend-setup' },
48+
{ label: 'rllm', slug: 'guides/rllm-backend-setup' },
49+
{ label: 'verl (coming soon)', slug: 'guides/verl-backend-setup' },
50+
],
51+
},
52+
],
53+
},
54+
{
55+
label: 'Examples',
56+
items: [
57+
{ label: 'Overview', slug: 'examples' },
58+
{
59+
label: 'Strands Agents on AgentCore',
60+
items: [
61+
{ label: 'Math', slug: 'examples/strands-math-agent' },
62+
{ label: 'AppWorld', slug: 'examples/strands-appworld-agent' },
63+
{ label: 'MigrationBench', slug: 'examples/strands-migration-agent' },
64+
{ label: 'OfficeBench', slug: 'examples/strands-officebench-agent' },
65+
],
66+
},
67+
],
68+
},
69+
{
70+
label: 'API Reference',
71+
items: [
72+
{
73+
label: 'Core',
74+
autogenerate: { directory: 'api/core' },
75+
},
76+
{
77+
label: 'Backends',
78+
items: [
79+
{
80+
label: 'slime',
81+
autogenerate: { directory: 'api/backends/slime' },
82+
},
83+
],
84+
},
85+
],
86+
},
87+
{
88+
label: 'Troubleshooting',
89+
items: [
90+
{
91+
label: 'Training backends',
92+
items: [
93+
{ label: 'slime', slug: 'troubleshooting/slime' },
94+
],
95+
},
96+
],
97+
},
98+
],
99+
}),
100+
],
101+
});

docs/site/package.json

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
{
2+
"name": "agentcore-rl-toolkit-docs",
3+
"type": "module",
4+
"version": "0.0.1",
5+
"private": true,
6+
"engines": {
7+
"node": ">=22.12.0"
8+
},
9+
"packageManager": "pnpm@10.28.2",
10+
"scripts": {
11+
"dev": "astro dev",
12+
"start": "pnpm dev",
13+
"build": "astro build",
14+
"preview": "astro preview",
15+
"astro": "astro",
16+
"gen:api": "uv run --with 'griffe>=0.47' --no-project python scripts/gen_api.py"
17+
},
18+
"dependencies": {
19+
"@astrojs/starlight": "^0.38.4",
20+
"astro": "^6.1.9",
21+
"sharp": "^0.34.5"
22+
}
23+
}

0 commit comments

Comments
 (0)