Writing docs with an agent (Python SDK)
Walk-through: a Python script (or an agent that can write Python) drafting docs by talking to ScaiCMS through the official SDK.
Install#
bash
1 2 3 | |
Connect#
python
1 2 3 4 5 6 7 | |
Set those env vars from the API key your admin issued (see Connecting an agent).
Discover the tree#
python
1 2 3 4 5 6 7 8 9 | |
Read a page (raw markdown)#
python
1 2 | |
Write a page#
python
1 2 3 4 5 6 7 8 | |
Each upsert is a revision. You can read the page back, mutate it, write
it again — current_revision increments each time.
Search#
python
1 2 3 | |
Error handling#
python
1 2 3 4 5 6 7 8 | |
CLI#
For one-off shell automation:
bash
1 2 3 | |
The agent bundle at docs/agent-bundle/ packages this guide together with
the OpenAPI spec and MCP tool schema, ready to feed to an LLM.