- Modify SystemPrompt class to support optional system message override and extension
- Update Agent and AgentSettings to include new system prompt customization parameters
- Update documentation and example to demonstrate new system prompt customization methods
- Remove deprecated system_prompt_class parameter
- Provide two ways to customize system prompt: extend or override completely
- Update service to conditionally limit actions based on max_actions_per_step
- Modify views to use json_schema_extra for action validation
- Improve action list handling to prevent unnecessary slicing
- Add support for 'raw' and 'json_mode' tool calling methods
- Introduce new methods for setting message context and tool calling method
- Modify input message conversion for specific model names
- Update tool calling method detection logic
- Extend ToolCallingMethod type to include new methods
- Update telemetry event to include more comprehensive agent performance metrics
- Modify `AgentEndTelemetryEvent` to capture total input tokens and duration
- Refactor `is_successful()` method to return `None` if agent is not done
- Adjust `ActionResult` default success value to `None`
- Introduce warning message for the last step in the agent
- Add `success` parameter to `ActionResult` and `DoneAction`
- Modify `AgentStepInfo` to check for last step
- Update `AgentHistoryList` methods to handle optional values and success status
Full credit due to @jhachirag7 on this, I've set them as the commit
author. They also opened #602 but it looks like it has some indentation
issue (fixed here) and a few spurious commits and removed files; I only
mean to make it as easy as possible for maintainers to get this merged.
I (mike@mbaynton.com) have tested that with this fix it is possible to
run against AWS Bedrock + Sonnet 3.5 v2.
Fixes#580