Skip to content

Conversation

@Unshure
Copy link
Member

@Unshure Unshure commented Nov 23, 2025

Description

  • Autogenerate python api docs. Doing this so we dont need to manually sync docs with sdk changes

  • Note: The test fails because we now require docs to be build before we can use lychee to test links (api references dont exist until you build the docs)

Type of Change

  • Content update/revision

Motivation and Context

No longer need manual syncing of sdk with docs

Areas Affected

All api docs. This will cause api docs to be generated at build time instead of committed so they are updated at deployment time

api-references diff (I recommend looking at the raw markdown to see the diff):

diff --git a/docs/api-reference/event_loop.md b/docs/api-reference/event_loop.md new file mode 100644 index 0000000..712d9b6 --- /dev/null +++ b/docs/api-reference/event_loop.md @@ -0,0 +1,10 @@ +::: strands.event_loop + options: + heading_level: 1 + members: false +::: strands.event_loop.event_loop + options: + heading_level: 2 +::: strands.event_loop.streaming + options: + heading_level: 2 diff --git a/docs/api-reference/experimental.md b/docs/api-reference/experimental.md index 803dafc..d7cc2f9 100644 --- a/docs/api-reference/experimental.md +++ b/docs/api-reference/experimental.md @@ -2,6 +2,9 @@ options: heading_level: 1 members: false +::: strands.experimental.agent_config + options: + heading_level: 2 ::: strands.experimental.hooks options: heading_level: 2 @@ -9,3 +12,9 @@ ::: strands.experimental.hooks.events options: heading_level: 3 +::: strands.experimental.hooks.multiagent.events + options: + heading_level: 3 +::: strands.experimental.tools.tool_provider + options: + heading_level: 3 diff --git a/docs/api-reference/interrupt.md b/docs/api-reference/interrupt.md index 31e001a..f078632 100644 --- a/docs/api-reference/interrupt.md +++ b/docs/api-reference/interrupt.md @@ -1,3 +1,4 @@ ::: strands.interrupt options: heading_level: 1 + members: false diff --git a/docs/api-reference/models.md b/docs/api-reference/models.md index a1ac435..7760237 100644 --- a/docs/api-reference/models.md +++ b/docs/api-reference/models.md @@ -2,15 +2,12 @@ options: heading_level: 1 members: false -::: strands.models.model +::: strands.models.anthropic options: heading_level: 2 ::: strands.models.bedrock options: heading_level: 2 -::: strands.models.anthropic - options: - heading_level: 2 ::: strands.models.gemini options: heading_level: 2 @@ -20,15 +17,24 @@ ::: strands.models.llamaapi options: heading_level: 2 +::: strands.models.llamacpp + options: + heading_level: 2 ::: strands.models.mistral options: heading_level: 2 +::: strands.models.model + options: + heading_level: 2 ::: strands.models.ollama options: heading_level: 2 ::: strands.models.openai options: heading_level: 2 +::: strands.models.sagemaker + options: + heading_level: 2 ::: strands.models.writer options: heading_level: 2 diff --git a/docs/api-reference/multiagent.md b/docs/api-reference/multiagent.md index 72c9491..f08c1c8 100644 --- a/docs/api-reference/multiagent.md +++ b/docs/api-reference/multiagent.md @@ -2,15 +2,6 @@ options: heading_level: 1 members: false -::: strands.multiagent.base - options: - heading_level: 2 -::: strands.multiagent.graph - options: - heading_level: 2 -::: strands.multiagent.swarm - options: - heading_level: 2 ::: strands.multiagent.a2a options: heading_level: 2 @@ -21,3 +12,12 @@ ::: strands.multiagent.a2a.server options: heading_level: 3 +::: strands.multiagent.base + options: + heading_level: 2 +::: strands.multiagent.graph + options: + heading_level: 2 +::: strands.multiagent.swarm + options: + heading_level: 2 diff --git a/docs/api-reference/session.md b/docs/api-reference/session.md index 2b20a86..c528d89 100644 --- a/docs/api-reference/session.md +++ b/docs/api-reference/session.md @@ -14,7 +14,6 @@ ::: strands.session.session_manager options: heading_level: 2 - members: false ::: strands.session.session_repository options: heading_level: 2 diff --git a/docs/api-reference/tools.md b/docs/api-reference/tools.md index 2744782..178e05f 100644 --- a/docs/api-reference/tools.md +++ b/docs/api-reference/tools.md @@ -2,24 +2,9 @@ options: heading_level: 1 members: false -::: strands.tools.tools - options: - heading_level: 2 ::: strands.tools.decorator options: heading_level: 2 -::: strands.tools.loader - options: - heading_level: 2 -::: strands.tools.registry - options: - heading_level: 2 -::: strands.tools.structured_output - options: - heading_level: 2 -::: strands.tools.watcher - options: - heading_level: 2 ::: strands.tools.executors options: heading_level: 2 @@ -30,6 +15,9 @@ ::: strands.tools.executors.sequential options: heading_level: 3 +::: strands.tools.loader + options: + heading_level: 2 ::: strands.tools.mcp options: heading_level: 2 @@ -40,6 +28,28 @@ ::: strands.tools.mcp.mcp_client options: heading_level: 3 +::: strands.tools.mcp.mcp_instrumentation + options: + heading_level: 3 ::: strands.tools.mcp.mcp_types options: heading_level: 3 +::: strands.tools.registry + options: + heading_level: 2 +::: strands.tools.structured_output + options: + heading_level: 2 + members: false +::: strands.tools.structured_output.structured_output_tool + options: + heading_level: 3 +::: strands.tools.structured_output.structured_output_utils + options: + heading_level: 3 +::: strands.tools.tools + options: + heading_level: 2 +::: strands.tools.watcher + options: + heading_level: 2 diff --git a/docs/api-reference/types.md b/docs/api-reference/types.md index 193fc11..3aab3c7 100644 --- a/docs/api-reference/types.md +++ b/docs/api-reference/types.md @@ -2,6 +2,15 @@ options: heading_level: 1 members: false +::: strands.types.agent + options: + heading_level: 2 +::: strands.types.citations + options: + heading_level: 2 +::: strands.types.collections + options: + heading_level: 2 ::: strands.types.content options: heading_level: 2

Screenshots

N/A

Checklist

  • I have read the CONTRIBUTING document
  • My changes follow the project's documentation style
  • I have tested the documentation locally using mkdocs serve
  • Links in the documentation are valid and working
  • Images/diagrams are properly sized and formatted
  • All new and existing tests pass

Additional Notes

N/A

By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.

@Unshure Unshure force-pushed the main branch 2 times, most recently from 279d28e to 2eb5f7a Compare November 24, 2025 17:20
@Unshure Unshure marked this pull request as ready for review November 24, 2025 17:23
@pgrayy
Copy link
Member

pgrayy commented Nov 26, 2025

When I do mkdocs build, I encounter the following error:

% mkdocs build
INFO    -  [macros] - No default module `main` found
INFO    -  [macros] - Config variables: ['extra', 'config', 'environment', 'plugin', 'git', 'social', 'version', 'docs_repo', 'sdk_pypi', 'sdk_repo',
           'sdk_repo_home', 'tools_pypi', 'tools_repo', 'tools_repo_home', 'agent_builder_pypi', 'agent_builder_repo_home', 'link_strands_tools',
           'link_strands_builder', 'community_contribution_banner', 'macros', 'filters', 'filters_builtin']
INFO    -  [macros] - Config macros: ['context', 'macros_info', 'now', 'fix_url']
INFO    -  [macros] - Config filters: ['pretty', 'relative_url']
Cloning into 'temp_python_sdk'...
remote: Enumerating objects: 5100, done.
remote: Counting objects: 100% (64/64), done.
remote: Compressing objects: 100% (49/49), done.
remote: Total 5100 (delta 29), reused 22 (delta 13), pack-reused 5036 (from 2)
Receiving objects: 100% (5100/5100), 2.16 MiB | 8.15 MiB/s, done.
Resolving deltas: 100% (3420/3420), done.
Generating API docs...
INFO    -  DeprecationWarning: These events have been moved to production with updated names. Use BeforeModelCallEvent, AfterModelCallEvent, BeforeToolCallEvent,
           and AfterToolCallEvent from strands.hooks instead.
             File "/Users/pgrayy/Projects/Strands/sdk-python/src/strands/experimental/hooks/__init__.py", line 3, in <module>
               from .events import (
             File "/Users/pgrayy/Projects/Strands/sdk-python/src/strands/experimental/hooks/events.py", line 11, in <module>
               warnings.warn(
Traceback (most recent call last):
  File "/Users/pgrayy/Projects/Strands/docs/save/env/bin/mkdocs", line 7, in <module>
    sys.exit(cli())
             ~~~^^
  File "/Users/pgrayy/Projects/Strands/docs/save/env/lib/python3.13/site-packages/click/core.py", line 1442, in __call__
    return self.main(*args, **kwargs)
           ~~~~~~~~~^^^^^^^^^^^^^^^^^
  File "/Users/pgrayy/Projects/Strands/docs/save/env/lib/python3.13/site-packages/click/core.py", line 1363, in main
    rv = self.invoke(ctx)
  File "/Users/pgrayy/Projects/Strands/docs/save/env/lib/python3.13/site-packages/click/core.py", line 1830, in invoke
    return _process_result(sub_ctx.command.invoke(sub_ctx))
                           ~~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^
  File "/Users/pgrayy/Projects/Strands/docs/save/env/lib/python3.13/site-packages/click/core.py", line 1226, in invoke
    return ctx.invoke(self.callback, **ctx.params)
           ~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/Users/pgrayy/Projects/Strands/docs/save/env/lib/python3.13/site-packages/click/core.py", line 794, in invoke
    return callback(*args, **kwargs)
  File "/Users/pgrayy/Projects/Strands/docs/save/env/lib/python3.13/site-packages/mkdocs/__main__.py", line 288, in build_command
    build.build(cfg, dirty=not clean)
    ~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^
  File "/Users/pgrayy/Projects/Strands/docs/save/env/lib/python3.13/site-packages/mkdocs/commands/build.py", line 268, in build
    config.plugins.on_pre_build(config=config)
    ~~~~~~~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^
  File "/Users/pgrayy/Projects/Strands/docs/save/env/lib/python3.13/site-packages/mkdocs/plugins.py", line 590, in on_pre_build
    return self.run_event('pre_build', config=config)
           ~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/Users/pgrayy/Projects/Strands/docs/save/env/lib/python3.13/site-packages/mkdocs/plugins.py", line 568, in run_event
    result = method(**kwargs)
  File "/Users/pgrayy/Projects/Strands/docs/generate_python_api_docs.py", line 76, in on_pre_build
    module_list.extend(container_modules)
    ~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^
TypeError: 'NoneType' object is not iterable

Am I missing some new dependencies or new command?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants