Skip to main content

Documentation style guide

Consistent style makes docs easier to read for both humans and AI agents. This guide defines the conventions used across AgentLux documentation.

Tone​

  • Technical but accessible. Assume the reader is smart but may not know our codebase. Explain the "why," not just the "what."
  • Second person. Use "you" for human readers, "your agent" when writing to agents. Avoid "the user" — it's distancing.
  • Agent-friendly. Write precise, structured, machine-parseable sentences. Agents parse documentation to take action. Ambiguity causes mistakes.
  • Direct. Skip the preamble. Start sentences with verbs. "Click Save" beats "In order to save, you should click the Save button."
  • No marketing language in docs. Docs are not sales copy. Avoid superlatives ("amazing," "powerful"). State facts.

Headers​

Use sentence case, not title case:

# Getting started with AgentLux        ✓
# Getting Started With AgentLux ✗

Use H1 (#) for page titles only (one per page, matches the title frontmatter). Use H2 (##) for major sections. Use H3 (###) for sub-sections within a section. Avoid H4 and deeper — restructure the content instead.

Frontmatter​

Every page requires these fields:

---
id: my-page-id
title: Full page title
sidebar_label: Shorter sidebar label
description: One-sentence description for SEO and link previews.
---

The id must match the filename (without .md). The sidebar_label can be shorter than title — it's what appears in the sidebar nav.

Code blocks​

Always specify the language for syntax highlighting:

    ```typescript
const client = new AgentLuxClient(process.env.AGENTLUX_API_KEY!);

Use realistic values in examples — never `your-api-key-here`. Use plausible fake values that follow the correct format:
- API keys: `aglx_agent_sk_live_a1b2c3d4e5f6g7h8i9j0k1l2m3n4o5p6`
- IDs: `item_01HV2K9MXYZ`, `agt_01HV2K9MXYZ`
- Wallet addresses: `0x4a3b2c1d...e9f8c9d1`
- TX hashes: `0xabc123def456789...`

Supported languages: `typescript`, `javascript`, `python`, `bash`, `json`, `yaml`, `solidity`.

For shell commands, use `bash`. Start with the command directly — no `$` prompt prefix.

## Admonitions

Use admonitions sparingly — reserve them for truly important callouts.

| Type | Use case |
|---|---|
| `:::tip` | Helpful shortcut or recommended approach |
| `:::info` | Clarifying information that isn't a warning |
| `:::note` | Side notes, audience-specific content |
| `:::warning` | Important caution the reader could easily miss |
| `:::danger` | Irreversible action, data loss, security issue |

Example:

```markdown
:::warning[Purchases are final]
NFT purchases are on-chain transactions and cannot be refunded.
:::

Human vs agent audience markers​

When a section applies to only one audience, use a note admonition:

:::note[For agents]
This section uses the REST API directly. If you're using the MCP server
or AgentKit skills, this is handled automatically.
:::
:::note[For humans]
This section describes the web app UI. If your agent needs to do this
programmatically, see the [API reference](../api-reference/avatars.md).
:::

Images​

All images require descriptive alt text:

![The Avatar Editor showing a cyberpunk jacket equipped on a humanoid avatar](/img/avatar-editor-jacket.webp)

Alt text should describe the content and purpose of the image, not "screenshot of X".

Image naming convention: {section}-{description}-{optional-variant}.webp

Examples: avatar-editor-clothing-panel.webp, marketplace-item-card.webp, api-auth-flow.webp

Prefer webp for screenshots and diagrams. Maximum width: 900px. Screenshots should be taken at 2x resolution.

Use relative links for internal pages:

See [Authentication](../agent-sdk/authentication.md) for more detail.

Use full URLs for external links:

View it on [BaseScan](https://basescan.org/address/0x742d35Cc...).

Never use "click here" as link text. The link text should describe the destination.

Tables​

Use tables for structured comparisons. Always include a header row. Keep cell content short — if a cell needs more than one sentence, reconsider the table structure.

Accessibility​

  • All images must have alt text (see above)
  • Do not use color alone to convey meaning
  • Code examples must be copy-pasteable (no invisible characters, no smart quotes)
  • Heading hierarchy must not skip levels (H1 → H2 → H3, never H1 → H3)
  • This documentation targets WCAG 2.1 AA compliance

Versioning rules​

The docs describe the current production API version (v1). If you're documenting a breaking change or a feature in a future version, add a note:

:::info[Available in API v2 (coming soon)]
This endpoint is only available in v2, currently in beta.
:::

Do not delete documentation for deprecated endpoints until the deprecation period ends (90 days after v2 release).