Skip to content

docs: add missing Python snippets to logging guide#512

Open
YuemengZheng wants to merge 1 commit into
2FastLabs:mainfrom
YuemengZheng:docs/add-python-logging-snippets
Open

docs: add missing Python snippets to logging guide#512
YuemengZheng wants to merge 1 commit into
2FastLabs:mainfrom
YuemengZheng:docs/add-python-logging-snippets

Conversation

@YuemengZheng

Copy link
Copy Markdown

Issue Link (REQUIRED)

Fixes #439

Summary

Changes

The logging cookbook page (docs/src/content/docs/cookbook/monitoring/logging.mdx) had four Python tabs containing // TODO: Add python code here placeholders. This fills all four with Python equivalents of the existing TypeScript snippets:

  • OrchestratorOptions → the AgentSquad.__init__ constructor signature (Python's equivalent of the TS options interface)
  • Install commandpip install aws-lambda-powertools
  • Logger initfrom aws_lambda_powertools import Logger / Logger(service=..., level="INFO")
  • Orchestrator creationAgentSquad(storage=..., options=AgentSquadConfig(...), logger=logger)

Snippets were verified against the Python source: the constructor signature matches python/src/agent_squad/orchestrator.py, the LOG_* flags match AgentSquadConfig in python/src/agent_squad/types/types.py, and import paths are correct.

User experience

Before: every Python tab on the logging guide showed a // TODO placeholder with no working example. After: each tab shows a correct, copy-pasteable Python snippet mirroring the TypeScript side, restoring the repo's documented TS/Python feature parity.

Checklist

  • I have performed a self-review of this change
  • Changes have been tested
  • Changes are documented
  • I have linked this PR to an existing issue (required)

Fill the four `// TODO: Add python code here` placeholders in the logging
cookbook with Python equivalents of the existing TypeScript snippets:
the AgentSquad constructor signature, aws-lambda-powertools install command,
Logger initialization, and AgentSquad creation with a custom logger.

Closes 2FastLabs#439
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.

Docs: add missing Python snippets in logging guide

1 participant