-
Notifications
You must be signed in to change notification settings - Fork 156
docs(event-handler): add docs page for Bedrock Agent Function #3991
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
base: main
Are you sure you want to change the base?
Conversation
--8<-- "examples/snippets/event-handler/bedrock-agents/gettingStartedFunctionsTool.ts" | ||
``` | ||
|
||
1. The `description` field is optional, but highly recommended in the action group definition. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Maybe we should say why we recommend this?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yea, good point. Can't add it until tomorrow when I get on a laptop. But if you wanna suggest a line like you did with the previous ones I can accept it.
The gist of why we need it is that it gives the LLM better context on the tool and how to use it.
Co-authored-by: Stefano Vozza <[email protected]>
Co-authored-by: Stefano Vozza <[email protected]>
Co-authored-by: Stefano Vozza <[email protected]>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hey @dreamorosi! i just left some comments that probably make sense you review it.
|
||
By default, the `BedrockAgentFunctionResolver` uses the global `console` logger and emits only warnings and errors. | ||
|
||
You can change this behavior by passing a custom logger instance to the `BedrockAgentFunctionResolver` constructor and setting its log level. Alternatively, you can also enable [Lambda Advanced Logging Controls](https://docs.aws.amazon.com/lambda/latest/dg/monitoring-cloudwatchlogs-advanced.html) and setting the log level to `DEBUG`. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why not add the Powertools log level explanation here instead of ALC? Setting the Powertools log level will solve the problem both in local environment (testing, mock API and other things) and in production, running on Lambda. ALC will solve it only in production.
I would not mention ALC in this doc.
|
||
When debug logging is enabled, the resolver will emit logs that show the underlying handler registration and the routing process. This is useful for understanding how the agent resolves the tools and routes the requests. | ||
|
||
For example, when using the [Powertools for AWS Lambda logger](../logger.md), you can set the `LOG_LEVEL` to `DEBUG` in your environment variables or at the logger level and pass the logger instance to the `BedrockAgentFunctionResolver` constructor to enable debug logging. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If you accept the previous suggestion, you can remove it.
Co-authored-by: Leandro Damascena <[email protected]>
|
Summary
Changes
This PR adds a page to the docs dedicated to the new Event Handler for Bedrock Agent Functions.
This page borrows from the one being added in aws-powertools/powertools-lambda-python#6564 but deviates a bit due to the fact that we don't support OpenAPI specs for this feature.
This page follows the same structure as similar pages and includes:
Issue number: closes #3990
By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.
Disclaimer: We value your time and bandwidth. As such, any pull requests created on non-triaged issues might not be successful.