Skip to content

docs: Add a simple lifecycle hooks example for Python #1384

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Conversation

MuhammadHamidRaza
Copy link
Contributor

This pull request adds a simple and easy-to-understand code example for Agent lifecycle hooks to the Python documentation.

I noticed that while the example folder does contain examples, they are often more complex and might be difficult for a beginner to grasp. My goal with this PR is to provide a very small, direct, and user-friendly example that shows only the core functionality of AgentHooks.

This example is intentionally minimal and focuses on demonstrating how to:

  • Define a custom AgentHooks class.
  • Use the hooks parameter in the Agent definition.

This will make the feature much more accessible to new users, helping them quickly understand and implement lifecycle events without being overwhelmed by a more comprehensive example.

@seratch
Copy link
Member

seratch commented Aug 11, 2025

Thanks for sending this. However, we generally recommend checking examples.

@seratch seratch closed this Aug 11, 2025
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