Skip to content

Conversation

@malhotra5
Copy link
Contributor

Summary

This PR updates the SDK documentation examples to use the new conversation.set_security_analyzer() API instead of the deprecated security_analyzer parameter in the Agent constructor.

Changes Made

Security Guide (sdk/guides/security.mdx)

  • Confirmation Mode Example: Updated to use conversation.set_security_analyzer(LLMSecurityAnalyzer()) instead of add_security_analyzer parameter
  • Security Analyzer Example: Updated to create agent without security_analyzer parameter and set it via conversation
  • Configuration Example: Updated to show the new API pattern
  • Custom Security Analyzer Example: Updated to use conversation-based approach

MCP Guide (sdk/guides/mcp.mdx)

  • MCP Integration Example: Removed security_analyzer=LLMSecurityAnalyzer() from Agent constructor and added conversation.set_security_analyzer(LLMSecurityAnalyzer()) after conversation creation

Context

This aligns with the deprecation of the security_analyzer parameter in the Agent constructor (deprecated in v1.1.0, removed in v1.3.0). The new approach uses conversation.set_security_analyzer() to maintain the same functionality while using the updated API.

Related PRs

Testing

The documentation examples now reflect the current API and should work correctly with the latest SDK version.

@malhotra5 can click here to continue refining the PR

…alyzer

- Fix security analyzer examples in security.mdx to use conversation.set_security_analyzer() instead of deprecated Agent parameter
- Update MCP integration example to use new security analyzer API
- Update custom security analyzer example to use new API
- This aligns with the deprecation of security_analyzer parameter in Agent constructor

Co-authored-by: openhands <openhands@all-hands.dev>
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