Releases: paragon-intelligence/agentle
v0.9.21
Changelog
v0.9.21
- feat(apis): new boolean type, recursive object schema serialization, request config and more
v0.9.20
Changelog
v0.9.20
v0.9.19
Changelog
v0.9.19
fix(whatsapp): Optimize typing indicator and response handling
- Fix response handling logic in EvolutionAPI provider
- Modify typing indicator to send only once before sending multiple messages
- Improve error handling for typing indicator failures
- Prevent typing indicator errors from interrupting message sending process
- Optimize logging for typing indicator and message sending
v0.9.18
refactor(whatsapp): Update expected_status handling in API requests
- Modify expected_status parameter in request methods to accept both int and Sequence[int]
- Update all relevant API request calls to use a list for expected_status values
- Enhance resilience in handling HTTP responses by allowing multiple acceptable status codes
v0.9.17
feat(whatsapp): Add recording indicator for TTS audio synthesis
- Implement
send_recording_indicatormethod in WhatsApp base provider - Add recording indicator support for Evolution API provider
- Update WhatsApp bot to show recording indicator during TTS audio synthesis
- Enhance TTS audio response flow with async synthesis and recording indicator
- Improve logging and error handling for recording indicator functionality
Adds a visual cue for users during text-to-speech audio generation, providing a more interactive and responsive messaging experience.
v0.9.16
feat(whatsapp): Add text-to-speech (TTS) integration for WhatsApp bot
- Implement speech configuration in WhatsAppBotConfig
- Add speech_play_chance and speech_config fields to control TTS behavior
- Create send_audio_message method in WhatsAppProvider base class
- Implement send_audio_message for EvolutionAPI provider
- Add documentation and example for WhatsApp TTS integration
- Enhance WhatsApp bot to support optional audio message generation
This change enables flexible text-to-speech capabilities for WhatsApp bots, allowing dynamic audio response generation with configurable probability and provider settings.
v0.9.15
rollback changes
v0.9.10
feat(docx-parser, pdf-parser): Implement max_output_tokens for response generation
- Add max_output_tokens attribute to DocxFileParser and PDFFileParser for controlling token generation in responses
- Update relevant methods to utilize max_output_tokens in generation configuration
v0.9.9
fix(openrouter-adapter): Improve tool call argument parsing with robust error handling
- Add comprehensive JSON parsing error handling for tool call arguments
- Implement fallback mechanism to extract first valid JSON object when parsing fails
- Log detailed warnings and errors for malformed JSON input
- Prevent adapter from breaking when encountering invalid JSON in tool call arguments
- Ensure graceful degradation by using empty dict if parsing completely fails
v0.9.8
fix(whatsapp): Improve phone number ID extraction for WhatsApp webhook payloads
- Update phone number ID extraction logic for linked IDs
- Set remoteJid to remoteJidAlt when "@lid" is present in key
- Ensure consistent phone number ID handling for different WhatsApp message types
v0.9.7
fix(whatsapp): not returning early when "lid" is present.
v0.9.6
fix(stdio-mcp-server): Improve JSON message parsing and connection state handling
- Enhance message parsing to skip non-JSON lines in stdout
- Add debug logging for skipped lines and invalid JSON
- Modify connection state checks to allow requests/notifications during initialization
- Prevent potential errors from processing non-JSON output from MCP servers
- Improve error handling and logging for message decoding
v0.9.5
fix(whatsapp): Improve WhatsApp webhook payload phone number ID extraction
- Update phone number ID extraction logic for WhatsApp webhook payloads
- Add fallback extraction method using remoteJid when remoteJidAlt is not available
- Ensure consistent phone number ID extraction across different webhook scenarios
- Prevent potential null or incomplete phone number ID assignments
v0.9.4
feat(whatsapp): Improve WhatsApp webhook payload and key handling
- Add remoteJidAlt field to Key model for enhanced JID parsing
- Update phone number ID extraction logic in webhook payload processing
- Modify message handling to use remoteJidAlt for linked WhatsApp accounts
- Enhance robustness of JID parsing for different WhatsApp account types
v0.9.3
🚀 New Responses API (Experimental)
- feat(responses): Brand new experimental Responses API with comprehensive OpenRouter integration
- Complete OpenRouter API compatibility with streaming support and structured outputs
- Advanced function tool management with
FunctionCallStorefor tracking and executing function calls - Enhanced
FunctionToolclass with robust type safety and parameter conversion ToolPairsystem for managing tool definitions and call history- Support for both synchronous and asynchronous tool execution
- Comprehensive response streaming with
AsyncStreamimplementation - Integration with
orjsonfor improved JSON handling performance - Support for reasoning, background processing, and conversation management
- Factory methods for easy instantiation (
openrouter(),openai())
🌐 Web Extraction & Automation
- feat(web): Complete web extraction and automation system
- Extractor class: Intelligent web content extraction with structured output support
- Browser automation: Full Playwright integration with configurable options
- Action system: Comprehensive set of web actions including:
- Click, scroll, write text, take screenshots
- Generate PDFs, execute JavaScript, press keys
- Wait for conditions, viewport management
- Extraction preferences: Advanced configuration options:
- Geolocation support, mobile/desktop modes
- Ad blocking, TLS verification control
- Custom headers, timeouts, and proxy settings
- Content filtering (include/exclude tags)
- Structured prompts: AI-powered content analysis with markdown conversion
- Error handling: Graceful handling of invalid URLs and extraction failures
🔧 Enhanced Assistant & Tracing
- feat(assistant): Enhanced Assistant model with new fields and Responder integration
- feat(tracing): Improved tracing system with BaseModel inheritance
- Refactored
LangfuseOtelClientandNoOpOtelClientto inherit from BaseModel - Enhanced type safety and error handling across tracing components
- Better parameter conversion and callable management
- Refactored
🛠️ Function Call Management
- feat(responses): Advanced function call management system
- Methods for retrieving, removing, and clearing function calls
- Enhanced tool presence checking and call count retrieval
- Support for multiple function calls with improved access patterns
- Example usage documentation for better developer experience
🐛 Bug Fixes & Improvements
- fix(responses): Multiple fixes for structured outputs and JSON schema handling
- Proper JSON schema "additionalProperties" setting and retrieval
- Improved handling of incomplete structured outputs with clearer error messaging
- Fixed tool calls and response object text format handling
- Streamlined response object creation and event handling
- refactor(file): Commented out MIME type validation for broader file type acceptance
- fix(responses): Enhanced OpenRouter example with updated max output tokens
📈 Performance & Developer Experience
- feat(responses): AsyncStream implementation for efficient streaming responses
- refactor(responses, web): Simplified JSON response handling and improved output parsing
- feat(utils): Added
needsutility for dependency management - Enhanced error messaging and debugging capabilities across all new features
v0.9.2
- feat(agent): cache instructions in Agent class and Developer message for the providers that supports it (cache ephemeral)
v0.9.1
🎯 Pricing Integration
- feat(generations): Added
Pricingmodel toGenerationclass withinput_pricing,output_pricing, andtotal_pricingfields - feat(providers): All major providers now automatically populate pricing information in
Generationobjects- OpenRouter: Dynamic pricing from API with automatic per-token to per-million conversion
- OpenAI: Static pricing table with comprehensive model coverage
- Google (Gemini): Static pricing for all Gemini models
- Cerebras: Static pricing for Llama models
- Amazon Bedrock: Static pricing for Claude and other models
- feat(adapters): Added async
adapt_async()methods to all provider adapters for pricing calculation - fix(openrouter): Corrected pricing calculation - OpenRouter returns per-token prices, now properly converted to per-million-tokens
- Pricing is calculated using the abstract methods
price_per_million_tokens_input()andprice_per_million_tokens_output() - Costs are rounded to 8 decimal places for precision
- Graceful fallback to empty
Pricingobject if calculation fails
🐛 Bug Fixes
- fix(openrouter): when fallback models are used, use "models" in the requests, not "model"
- fix(openrouter): accept single string in
with_fallback_models()method (was treating string as iterable)
🚨 Error Handling
- feat(openrouter): comprehensive custom exception hierarchy with detailed error messages
- Created 16+ custom exception classes for all documented OpenRouter errors
- Each exception includes clear descriptions, possible causes, and actionable solutions
- Automatic error parsing from response status codes and error messages
- Examples:
ModelNotFoundError,InsufficientCreditsError,ContextLengthExceededError, etc. - See
examples/openrouter_error_handling.pyfor usage examples
v0.9.0 🚀
Release Date: October 18, 2024
We're thrilled to announce Agentle v0.9.0, a major milestone packed with powerful new features, critical fixes, and performance improvements. This release r...
v0.9.18
Changelog
v0.9.18
refactor(whatsapp): Update expected_status handling in API requests
- Modify expected_status parameter in request methods to accept both int and Sequence[int]
- Update all relevant API request calls to use a list for expected_status values
- Enhance resilience in handling HTTP responses by allowing multiple acceptable status codes
v0.9.17
feat(whatsapp): Add recording indicator for TTS audio synthesis
- Implement
send_recording_indicatormethod in WhatsApp base provider - Add recording indicator support for Evolution API provider
- Update WhatsApp bot to show recording indicator during TTS audio synthesis
- Enhance TTS audio response flow with async synthesis and recording indicator
- Improve logging and error handling for recording indicator functionality
Adds a visual cue for users during text-to-speech audio generation, providing a more interactive and responsive messaging experience.
v0.9.16
feat(whatsapp): Add text-to-speech (TTS) integration for WhatsApp bot
- Implement speech configuration in WhatsAppBotConfig
- Add speech_play_chance and speech_config fields to control TTS behavior
- Create send_audio_message method in WhatsAppProvider base class
- Implement send_audio_message for EvolutionAPI provider
- Add documentation and example for WhatsApp TTS integration
- Enhance WhatsApp bot to support optional audio message generation
This change enables flexible text-to-speech capabilities for WhatsApp bots, allowing dynamic audio response generation with configurable probability and provider settings.
v0.9.15
rollback changes
v0.9.10
feat(docx-parser, pdf-parser): Implement max_output_tokens for response generation
- Add max_output_tokens attribute to DocxFileParser and PDFFileParser for controlling token generation in responses
- Update relevant methods to utilize max_output_tokens in generation configuration
v0.9.9
fix(openrouter-adapter): Improve tool call argument parsing with robust error handling
- Add comprehensive JSON parsing error handling for tool call arguments
- Implement fallback mechanism to extract first valid JSON object when parsing fails
- Log detailed warnings and errors for malformed JSON input
- Prevent adapter from breaking when encountering invalid JSON in tool call arguments
- Ensure graceful degradation by using empty dict if parsing completely fails
v0.9.8
fix(whatsapp): Improve phone number ID extraction for WhatsApp webhook payloads
- Update phone number ID extraction logic for linked IDs
- Set remoteJid to remoteJidAlt when "@lid" is present in key
- Ensure consistent phone number ID handling for different WhatsApp message types
v0.9.7
fix(whatsapp): not returning early when "lid" is present.
v0.9.6
fix(stdio-mcp-server): Improve JSON message parsing and connection state handling
- Enhance message parsing to skip non-JSON lines in stdout
- Add debug logging for skipped lines and invalid JSON
- Modify connection state checks to allow requests/notifications during initialization
- Prevent potential errors from processing non-JSON output from MCP servers
- Improve error handling and logging for message decoding
v0.9.5
fix(whatsapp): Improve WhatsApp webhook payload phone number ID extraction
- Update phone number ID extraction logic for WhatsApp webhook payloads
- Add fallback extraction method using remoteJid when remoteJidAlt is not available
- Ensure consistent phone number ID extraction across different webhook scenarios
- Prevent potential null or incomplete phone number ID assignments
v0.9.4
feat(whatsapp): Improve WhatsApp webhook payload and key handling
- Add remoteJidAlt field to Key model for enhanced JID parsing
- Update phone number ID extraction logic in webhook payload processing
- Modify message handling to use remoteJidAlt for linked WhatsApp accounts
- Enhance robustness of JID parsing for different WhatsApp account types
v0.9.3
🚀 New Responses API (Experimental)
- feat(responses): Brand new experimental Responses API with comprehensive OpenRouter integration
- Complete OpenRouter API compatibility with streaming support and structured outputs
- Advanced function tool management with
FunctionCallStorefor tracking and executing function calls - Enhanced
FunctionToolclass with robust type safety and parameter conversion ToolPairsystem for managing tool definitions and call history- Support for both synchronous and asynchronous tool execution
- Comprehensive response streaming with
AsyncStreamimplementation - Integration with
orjsonfor improved JSON handling performance - Support for reasoning, background processing, and conversation management
- Factory methods for easy instantiation (
openrouter(),openai())
🌐 Web Extraction & Automation
- feat(web): Complete web extraction and automation system
- Extractor class: Intelligent web content extraction with structured output support
- Browser automation: Full Playwright integration with configurable options
- Action system: Comprehensive set of web actions including:
- Click, scroll, write text, take screenshots
- Generate PDFs, execute JavaScript, press keys
- Wait for conditions, viewport management
- Extraction preferences: Advanced configuration options:
- Geolocation support, mobile/desktop modes
- Ad blocking, TLS verification control
- Custom headers, timeouts, and proxy settings
- Content filtering (include/exclude tags)
- Structured prompts: AI-powered content analysis with markdown conversion
- Error handling: Graceful handling of invalid URLs and extraction failures
🔧 Enhanced Assistant & Tracing
- feat(assistant): Enhanced Assistant model with new fields and Responder integration
- feat(tracing): Improved tracing system with BaseModel inheritance
- Refactored
LangfuseOtelClientandNoOpOtelClientto inherit from BaseModel - Enhanced type safety and error handling across tracing components
- Better parameter conversion and callable management
- Refactored
🛠️ Function Call Management
- feat(responses): Advanced function call management system
- Methods for retrieving, removing, and clearing function calls
- Enhanced tool presence checking and call count retrieval
- Support for multiple function calls with improved access patterns
- Example usage documentation for better developer experience
🐛 Bug Fixes & Improvements
- fix(responses): Multiple fixes for structured outputs and JSON schema handling
- Proper JSON schema "additionalProperties" setting and retrieval
- Improved handling of incomplete structured outputs with clearer error messaging
- Fixed tool calls and response object text format handling
- Streamlined response object creation and event handling
- refactor(file): Commented out MIME type validation for broader file type acceptance
- fix(responses): Enhanced OpenRouter example with updated max output tokens
📈 Performance & Developer Experience
- feat(responses): AsyncStream implementation for efficient streaming responses
- refactor(responses, web): Simplified JSON response handling and improved output parsing
- feat(utils): Added
needsutility for dependency management - Enhanced error messaging and debugging capabilities across all new features
v0.9.2
- feat(agent): cache instructions in Agent class and Developer message for the providers that supports it (cache ephemeral)
v0.9.1
🎯 Pricing Integration
- feat(generations): Added
Pricingmodel toGenerationclass withinput_pricing,output_pricing, andtotal_pricingfields - feat(providers): All major providers now automatically populate pricing information in
Generationobjects- OpenRouter: Dynamic pricing from API with automatic per-token to per-million conversion
- OpenAI: Static pricing table with comprehensive model coverage
- Google (Gemini): Static pricing for all Gemini models
- Cerebras: Static pricing for Llama models
- Amazon Bedrock: Static pricing for Claude and other models
- feat(adapters): Added async
adapt_async()methods to all provider adapters for pricing calculation - fix(openrouter): Corrected pricing calculation - OpenRouter returns per-token prices, now properly converted to per-million-tokens
- Pricing is calculated using the abstract methods
price_per_million_tokens_input()andprice_per_million_tokens_output() - Costs are rounded to 8 decimal places for precision
- Graceful fallback to empty
Pricingobject if calculation fails
🐛 Bug Fixes
- fix(openrouter): when fallback models are used, use "models" in the requests, not "model"
- fix(openrouter): accept single string in
with_fallback_models()method (was treating string as iterable)
🚨 Error Handling
- feat(openrouter): comprehensive custom exception hierarchy with detailed error messages
- Created 16+ custom exception classes for all documented OpenRouter errors
- Each exception includes clear descriptions, possible causes, and actionable solutions
- Automatic error parsing from response status codes and error messages
- Examples:
ModelNotFoundError,InsufficientCreditsError,ContextLengthExceededError, etc. - See
examples/openrouter_error_handling.pyfor usage examples
v0.9.0 🚀
Release Date: October 18, 2024
We're thrilled to announce Agentle v0.9.0, a major milestone packed with powerful new features, critical fixes, and performance improvements. This release represents months of refinement across our parsing, provider, and agent ecosystems.
✨ Highlights
🛡️ Guardrails System
- NEW: Comprehensive guardrails integration for safer AI interactions
- Tool Leakage Validator: Prevent sensitive tool information from leaking in responses
🔌 OpenRouter Provider
- Full OpenRouter integration with streaming support and ...
v0.9.17
Changelog
v0.9.17
feat(whatsapp): Add recording indicator for TTS audio synthesis
- Implement
send_recording_indicatormethod in WhatsApp base provider - Add recording indicator support for Evolution API provider
- Update WhatsApp bot to show recording indicator during TTS audio synthesis
- Enhance TTS audio response flow with async synthesis and recording indicator
- Improve logging and error handling for recording indicator functionality
Adds a visual cue for users during text-to-speech audio generation, providing a more interactive and responsive messaging experience.
v0.9.16
feat(whatsapp): Add text-to-speech (TTS) integration for WhatsApp bot
- Implement speech configuration in WhatsAppBotConfig
- Add speech_play_chance and speech_config fields to control TTS behavior
- Create send_audio_message method in WhatsAppProvider base class
- Implement send_audio_message for EvolutionAPI provider
- Add documentation and example for WhatsApp TTS integration
- Enhance WhatsApp bot to support optional audio message generation
This change enables flexible text-to-speech capabilities for WhatsApp bots, allowing dynamic audio response generation with configurable probability and provider settings.
v0.9.15
rollback changes
v0.9.10
feat(docx-parser, pdf-parser): Implement max_output_tokens for response generation
- Add max_output_tokens attribute to DocxFileParser and PDFFileParser for controlling token generation in responses
- Update relevant methods to utilize max_output_tokens in generation configuration
v0.9.9
fix(openrouter-adapter): Improve tool call argument parsing with robust error handling
- Add comprehensive JSON parsing error handling for tool call arguments
- Implement fallback mechanism to extract first valid JSON object when parsing fails
- Log detailed warnings and errors for malformed JSON input
- Prevent adapter from breaking when encountering invalid JSON in tool call arguments
- Ensure graceful degradation by using empty dict if parsing completely fails
v0.9.8
fix(whatsapp): Improve phone number ID extraction for WhatsApp webhook payloads
- Update phone number ID extraction logic for linked IDs
- Set remoteJid to remoteJidAlt when "@lid" is present in key
- Ensure consistent phone number ID handling for different WhatsApp message types
v0.9.7
fix(whatsapp): not returning early when "lid" is present.
v0.9.6
fix(stdio-mcp-server): Improve JSON message parsing and connection state handling
- Enhance message parsing to skip non-JSON lines in stdout
- Add debug logging for skipped lines and invalid JSON
- Modify connection state checks to allow requests/notifications during initialization
- Prevent potential errors from processing non-JSON output from MCP servers
- Improve error handling and logging for message decoding
v0.9.5
fix(whatsapp): Improve WhatsApp webhook payload phone number ID extraction
- Update phone number ID extraction logic for WhatsApp webhook payloads
- Add fallback extraction method using remoteJid when remoteJidAlt is not available
- Ensure consistent phone number ID extraction across different webhook scenarios
- Prevent potential null or incomplete phone number ID assignments
v0.9.4
feat(whatsapp): Improve WhatsApp webhook payload and key handling
- Add remoteJidAlt field to Key model for enhanced JID parsing
- Update phone number ID extraction logic in webhook payload processing
- Modify message handling to use remoteJidAlt for linked WhatsApp accounts
- Enhance robustness of JID parsing for different WhatsApp account types
v0.9.3
🚀 New Responses API (Experimental)
- feat(responses): Brand new experimental Responses API with comprehensive OpenRouter integration
- Complete OpenRouter API compatibility with streaming support and structured outputs
- Advanced function tool management with
FunctionCallStorefor tracking and executing function calls - Enhanced
FunctionToolclass with robust type safety and parameter conversion ToolPairsystem for managing tool definitions and call history- Support for both synchronous and asynchronous tool execution
- Comprehensive response streaming with
AsyncStreamimplementation - Integration with
orjsonfor improved JSON handling performance - Support for reasoning, background processing, and conversation management
- Factory methods for easy instantiation (
openrouter(),openai())
🌐 Web Extraction & Automation
- feat(web): Complete web extraction and automation system
- Extractor class: Intelligent web content extraction with structured output support
- Browser automation: Full Playwright integration with configurable options
- Action system: Comprehensive set of web actions including:
- Click, scroll, write text, take screenshots
- Generate PDFs, execute JavaScript, press keys
- Wait for conditions, viewport management
- Extraction preferences: Advanced configuration options:
- Geolocation support, mobile/desktop modes
- Ad blocking, TLS verification control
- Custom headers, timeouts, and proxy settings
- Content filtering (include/exclude tags)
- Structured prompts: AI-powered content analysis with markdown conversion
- Error handling: Graceful handling of invalid URLs and extraction failures
🔧 Enhanced Assistant & Tracing
- feat(assistant): Enhanced Assistant model with new fields and Responder integration
- feat(tracing): Improved tracing system with BaseModel inheritance
- Refactored
LangfuseOtelClientandNoOpOtelClientto inherit from BaseModel - Enhanced type safety and error handling across tracing components
- Better parameter conversion and callable management
- Refactored
🛠️ Function Call Management
- feat(responses): Advanced function call management system
- Methods for retrieving, removing, and clearing function calls
- Enhanced tool presence checking and call count retrieval
- Support for multiple function calls with improved access patterns
- Example usage documentation for better developer experience
🐛 Bug Fixes & Improvements
- fix(responses): Multiple fixes for structured outputs and JSON schema handling
- Proper JSON schema "additionalProperties" setting and retrieval
- Improved handling of incomplete structured outputs with clearer error messaging
- Fixed tool calls and response object text format handling
- Streamlined response object creation and event handling
- refactor(file): Commented out MIME type validation for broader file type acceptance
- fix(responses): Enhanced OpenRouter example with updated max output tokens
📈 Performance & Developer Experience
- feat(responses): AsyncStream implementation for efficient streaming responses
- refactor(responses, web): Simplified JSON response handling and improved output parsing
- feat(utils): Added
needsutility for dependency management - Enhanced error messaging and debugging capabilities across all new features
v0.9.2
- feat(agent): cache instructions in Agent class and Developer message for the providers that supports it (cache ephemeral)
v0.9.1
🎯 Pricing Integration
- feat(generations): Added
Pricingmodel toGenerationclass withinput_pricing,output_pricing, andtotal_pricingfields - feat(providers): All major providers now automatically populate pricing information in
Generationobjects- OpenRouter: Dynamic pricing from API with automatic per-token to per-million conversion
- OpenAI: Static pricing table with comprehensive model coverage
- Google (Gemini): Static pricing for all Gemini models
- Cerebras: Static pricing for Llama models
- Amazon Bedrock: Static pricing for Claude and other models
- feat(adapters): Added async
adapt_async()methods to all provider adapters for pricing calculation - fix(openrouter): Corrected pricing calculation - OpenRouter returns per-token prices, now properly converted to per-million-tokens
- Pricing is calculated using the abstract methods
price_per_million_tokens_input()andprice_per_million_tokens_output() - Costs are rounded to 8 decimal places for precision
- Graceful fallback to empty
Pricingobject if calculation fails
🐛 Bug Fixes
- fix(openrouter): when fallback models are used, use "models" in the requests, not "model"
- fix(openrouter): accept single string in
with_fallback_models()method (was treating string as iterable)
🚨 Error Handling
- feat(openrouter): comprehensive custom exception hierarchy with detailed error messages
- Created 16+ custom exception classes for all documented OpenRouter errors
- Each exception includes clear descriptions, possible causes, and actionable solutions
- Automatic error parsing from response status codes and error messages
- Examples:
ModelNotFoundError,InsufficientCreditsError,ContextLengthExceededError, etc. - See
examples/openrouter_error_handling.pyfor usage examples
v0.9.0 🚀
Release Date: October 18, 2024
We're thrilled to announce Agentle v0.9.0, a major milestone packed with powerful new features, critical fixes, and performance improvements. This release represents months of refinement across our parsing, provider, and agent ecosystems.
✨ Highlights
🛡️ Guardrails System
- NEW: Comprehensive guardrails integration for safer AI interactions
- Tool Leakage Validator: Prevent sensitive tool information from leaking in responses
🔌 OpenRouter Provider
- Full OpenRouter integration with streaming support and structured outputs
- Dynamic price fetching for cost-aware model selection
- Model fallbacks for improved reliability
- Factory methods for easier instantiation
- Enhanced tool adapter with complex type expansion in JSON Schema conversion
- Configurable httpx client timeout for generation tasks
📄 *Document Parsing Revolution...
v0.9.16
Changelog
v0.9.16
feat(whatsapp): Add text-to-speech (TTS) integration for WhatsApp bot
- Implement speech configuration in WhatsAppBotConfig
- Add speech_play_chance and speech_config fields to control TTS behavior
- Create send_audio_message method in WhatsAppProvider base class
- Implement send_audio_message for EvolutionAPI provider
- Add documentation and example for WhatsApp TTS integration
- Enhance WhatsApp bot to support optional audio message generation
This change enables flexible text-to-speech capabilities for WhatsApp bots, allowing dynamic audio response generation with configurable probability and provider settings.
v0.9.15
rollback changes
v0.9.10
feat(docx-parser, pdf-parser): Implement max_output_tokens for response generation
- Add max_output_tokens attribute to DocxFileParser and PDFFileParser for controlling token generation in responses
- Update relevant methods to utilize max_output_tokens in generation configuration
v0.9.9
fix(openrouter-adapter): Improve tool call argument parsing with robust error handling
- Add comprehensive JSON parsing error handling for tool call arguments
- Implement fallback mechanism to extract first valid JSON object when parsing fails
- Log detailed warnings and errors for malformed JSON input
- Prevent adapter from breaking when encountering invalid JSON in tool call arguments
- Ensure graceful degradation by using empty dict if parsing completely fails
v0.9.8
fix(whatsapp): Improve phone number ID extraction for WhatsApp webhook payloads
- Update phone number ID extraction logic for linked IDs
- Set remoteJid to remoteJidAlt when "@lid" is present in key
- Ensure consistent phone number ID handling for different WhatsApp message types
v0.9.7
fix(whatsapp): not returning early when "lid" is present.
v0.9.6
fix(stdio-mcp-server): Improve JSON message parsing and connection state handling
- Enhance message parsing to skip non-JSON lines in stdout
- Add debug logging for skipped lines and invalid JSON
- Modify connection state checks to allow requests/notifications during initialization
- Prevent potential errors from processing non-JSON output from MCP servers
- Improve error handling and logging for message decoding
v0.9.5
fix(whatsapp): Improve WhatsApp webhook payload phone number ID extraction
- Update phone number ID extraction logic for WhatsApp webhook payloads
- Add fallback extraction method using remoteJid when remoteJidAlt is not available
- Ensure consistent phone number ID extraction across different webhook scenarios
- Prevent potential null or incomplete phone number ID assignments
v0.9.4
feat(whatsapp): Improve WhatsApp webhook payload and key handling
- Add remoteJidAlt field to Key model for enhanced JID parsing
- Update phone number ID extraction logic in webhook payload processing
- Modify message handling to use remoteJidAlt for linked WhatsApp accounts
- Enhance robustness of JID parsing for different WhatsApp account types
v0.9.3
🚀 New Responses API (Experimental)
- feat(responses): Brand new experimental Responses API with comprehensive OpenRouter integration
- Complete OpenRouter API compatibility with streaming support and structured outputs
- Advanced function tool management with
FunctionCallStorefor tracking and executing function calls - Enhanced
FunctionToolclass with robust type safety and parameter conversion ToolPairsystem for managing tool definitions and call history- Support for both synchronous and asynchronous tool execution
- Comprehensive response streaming with
AsyncStreamimplementation - Integration with
orjsonfor improved JSON handling performance - Support for reasoning, background processing, and conversation management
- Factory methods for easy instantiation (
openrouter(),openai())
🌐 Web Extraction & Automation
- feat(web): Complete web extraction and automation system
- Extractor class: Intelligent web content extraction with structured output support
- Browser automation: Full Playwright integration with configurable options
- Action system: Comprehensive set of web actions including:
- Click, scroll, write text, take screenshots
- Generate PDFs, execute JavaScript, press keys
- Wait for conditions, viewport management
- Extraction preferences: Advanced configuration options:
- Geolocation support, mobile/desktop modes
- Ad blocking, TLS verification control
- Custom headers, timeouts, and proxy settings
- Content filtering (include/exclude tags)
- Structured prompts: AI-powered content analysis with markdown conversion
- Error handling: Graceful handling of invalid URLs and extraction failures
🔧 Enhanced Assistant & Tracing
- feat(assistant): Enhanced Assistant model with new fields and Responder integration
- feat(tracing): Improved tracing system with BaseModel inheritance
- Refactored
LangfuseOtelClientandNoOpOtelClientto inherit from BaseModel - Enhanced type safety and error handling across tracing components
- Better parameter conversion and callable management
- Refactored
🛠️ Function Call Management
- feat(responses): Advanced function call management system
- Methods for retrieving, removing, and clearing function calls
- Enhanced tool presence checking and call count retrieval
- Support for multiple function calls with improved access patterns
- Example usage documentation for better developer experience
🐛 Bug Fixes & Improvements
- fix(responses): Multiple fixes for structured outputs and JSON schema handling
- Proper JSON schema "additionalProperties" setting and retrieval
- Improved handling of incomplete structured outputs with clearer error messaging
- Fixed tool calls and response object text format handling
- Streamlined response object creation and event handling
- refactor(file): Commented out MIME type validation for broader file type acceptance
- fix(responses): Enhanced OpenRouter example with updated max output tokens
📈 Performance & Developer Experience
- feat(responses): AsyncStream implementation for efficient streaming responses
- refactor(responses, web): Simplified JSON response handling and improved output parsing
- feat(utils): Added
needsutility for dependency management - Enhanced error messaging and debugging capabilities across all new features
v0.9.2
- feat(agent): cache instructions in Agent class and Developer message for the providers that supports it (cache ephemeral)
v0.9.1
🎯 Pricing Integration
- feat(generations): Added
Pricingmodel toGenerationclass withinput_pricing,output_pricing, andtotal_pricingfields - feat(providers): All major providers now automatically populate pricing information in
Generationobjects- OpenRouter: Dynamic pricing from API with automatic per-token to per-million conversion
- OpenAI: Static pricing table with comprehensive model coverage
- Google (Gemini): Static pricing for all Gemini models
- Cerebras: Static pricing for Llama models
- Amazon Bedrock: Static pricing for Claude and other models
- feat(adapters): Added async
adapt_async()methods to all provider adapters for pricing calculation - fix(openrouter): Corrected pricing calculation - OpenRouter returns per-token prices, now properly converted to per-million-tokens
- Pricing is calculated using the abstract methods
price_per_million_tokens_input()andprice_per_million_tokens_output() - Costs are rounded to 8 decimal places for precision
- Graceful fallback to empty
Pricingobject if calculation fails
🐛 Bug Fixes
- fix(openrouter): when fallback models are used, use "models" in the requests, not "model"
- fix(openrouter): accept single string in
with_fallback_models()method (was treating string as iterable)
🚨 Error Handling
- feat(openrouter): comprehensive custom exception hierarchy with detailed error messages
- Created 16+ custom exception classes for all documented OpenRouter errors
- Each exception includes clear descriptions, possible causes, and actionable solutions
- Automatic error parsing from response status codes and error messages
- Examples:
ModelNotFoundError,InsufficientCreditsError,ContextLengthExceededError, etc. - See
examples/openrouter_error_handling.pyfor usage examples
v0.9.0 🚀
Release Date: October 18, 2024
We're thrilled to announce Agentle v0.9.0, a major milestone packed with powerful new features, critical fixes, and performance improvements. This release represents months of refinement across our parsing, provider, and agent ecosystems.
✨ Highlights
🛡️ Guardrails System
- NEW: Comprehensive guardrails integration for safer AI interactions
- Tool Leakage Validator: Prevent sensitive tool information from leaking in responses
🔌 OpenRouter Provider
- Full OpenRouter integration with streaming support and structured outputs
- Dynamic price fetching for cost-aware model selection
- Model fallbacks for improved reliability
- Factory methods for easier instantiation
- Enhanced tool adapter with complex type expansion in JSON Schema conversion
- Configurable httpx client timeout for generation tasks
📄 Document Parsing Revolution
- Native PDF processing with PyMuPDF for superior performance
- RTF Document Parser - brand new format support
- Native DOCX processing option for faster document handling
- Enhanced PDF parsing with encrypted file support and structured exception handling
- PPTX parsing improvements with legacy conversion support
- Legacy
.docfile conversion with improved error handling - Optimized archive processing (ZIP, RAR) with better error messaging
- Page screenshot optimization to reduce per-image analysis costs
- Configurable
render_scalefor PDF screenshot...
v0.9.15
Changelog
v0.9.15
rollback changes
v0.9.10
feat(docx-parser, pdf-parser): Implement max_output_tokens for response generation
- Add max_output_tokens attribute to DocxFileParser and PDFFileParser for controlling token generation in responses
- Update relevant methods to utilize max_output_tokens in generation configuration
v0.9.9
fix(openrouter-adapter): Improve tool call argument parsing with robust error handling
- Add comprehensive JSON parsing error handling for tool call arguments
- Implement fallback mechanism to extract first valid JSON object when parsing fails
- Log detailed warnings and errors for malformed JSON input
- Prevent adapter from breaking when encountering invalid JSON in tool call arguments
- Ensure graceful degradation by using empty dict if parsing completely fails
v0.9.8
fix(whatsapp): Improve phone number ID extraction for WhatsApp webhook payloads
- Update phone number ID extraction logic for linked IDs
- Set remoteJid to remoteJidAlt when "@lid" is present in key
- Ensure consistent phone number ID handling for different WhatsApp message types
v0.9.7
fix(whatsapp): not returning early when "lid" is present.
v0.9.6
fix(stdio-mcp-server): Improve JSON message parsing and connection state handling
- Enhance message parsing to skip non-JSON lines in stdout
- Add debug logging for skipped lines and invalid JSON
- Modify connection state checks to allow requests/notifications during initialization
- Prevent potential errors from processing non-JSON output from MCP servers
- Improve error handling and logging for message decoding
v0.9.5
fix(whatsapp): Improve WhatsApp webhook payload phone number ID extraction
- Update phone number ID extraction logic for WhatsApp webhook payloads
- Add fallback extraction method using remoteJid when remoteJidAlt is not available
- Ensure consistent phone number ID extraction across different webhook scenarios
- Prevent potential null or incomplete phone number ID assignments
v0.9.4
feat(whatsapp): Improve WhatsApp webhook payload and key handling
- Add remoteJidAlt field to Key model for enhanced JID parsing
- Update phone number ID extraction logic in webhook payload processing
- Modify message handling to use remoteJidAlt for linked WhatsApp accounts
- Enhance robustness of JID parsing for different WhatsApp account types
v0.9.3
🚀 New Responses API (Experimental)
- feat(responses): Brand new experimental Responses API with comprehensive OpenRouter integration
- Complete OpenRouter API compatibility with streaming support and structured outputs
- Advanced function tool management with
FunctionCallStorefor tracking and executing function calls - Enhanced
FunctionToolclass with robust type safety and parameter conversion ToolPairsystem for managing tool definitions and call history- Support for both synchronous and asynchronous tool execution
- Comprehensive response streaming with
AsyncStreamimplementation - Integration with
orjsonfor improved JSON handling performance - Support for reasoning, background processing, and conversation management
- Factory methods for easy instantiation (
openrouter(),openai())
🌐 Web Extraction & Automation
- feat(web): Complete web extraction and automation system
- Extractor class: Intelligent web content extraction with structured output support
- Browser automation: Full Playwright integration with configurable options
- Action system: Comprehensive set of web actions including:
- Click, scroll, write text, take screenshots
- Generate PDFs, execute JavaScript, press keys
- Wait for conditions, viewport management
- Extraction preferences: Advanced configuration options:
- Geolocation support, mobile/desktop modes
- Ad blocking, TLS verification control
- Custom headers, timeouts, and proxy settings
- Content filtering (include/exclude tags)
- Structured prompts: AI-powered content analysis with markdown conversion
- Error handling: Graceful handling of invalid URLs and extraction failures
🔧 Enhanced Assistant & Tracing
- feat(assistant): Enhanced Assistant model with new fields and Responder integration
- feat(tracing): Improved tracing system with BaseModel inheritance
- Refactored
LangfuseOtelClientandNoOpOtelClientto inherit from BaseModel - Enhanced type safety and error handling across tracing components
- Better parameter conversion and callable management
- Refactored
🛠️ Function Call Management
- feat(responses): Advanced function call management system
- Methods for retrieving, removing, and clearing function calls
- Enhanced tool presence checking and call count retrieval
- Support for multiple function calls with improved access patterns
- Example usage documentation for better developer experience
🐛 Bug Fixes & Improvements
- fix(responses): Multiple fixes for structured outputs and JSON schema handling
- Proper JSON schema "additionalProperties" setting and retrieval
- Improved handling of incomplete structured outputs with clearer error messaging
- Fixed tool calls and response object text format handling
- Streamlined response object creation and event handling
- refactor(file): Commented out MIME type validation for broader file type acceptance
- fix(responses): Enhanced OpenRouter example with updated max output tokens
📈 Performance & Developer Experience
- feat(responses): AsyncStream implementation for efficient streaming responses
- refactor(responses, web): Simplified JSON response handling and improved output parsing
- feat(utils): Added
needsutility for dependency management - Enhanced error messaging and debugging capabilities across all new features
v0.9.2
- feat(agent): cache instructions in Agent class and Developer message for the providers that supports it (cache ephemeral)
v0.9.1
🎯 Pricing Integration
- feat(generations): Added
Pricingmodel toGenerationclass withinput_pricing,output_pricing, andtotal_pricingfields - feat(providers): All major providers now automatically populate pricing information in
Generationobjects- OpenRouter: Dynamic pricing from API with automatic per-token to per-million conversion
- OpenAI: Static pricing table with comprehensive model coverage
- Google (Gemini): Static pricing for all Gemini models
- Cerebras: Static pricing for Llama models
- Amazon Bedrock: Static pricing for Claude and other models
- feat(adapters): Added async
adapt_async()methods to all provider adapters for pricing calculation - fix(openrouter): Corrected pricing calculation - OpenRouter returns per-token prices, now properly converted to per-million-tokens
- Pricing is calculated using the abstract methods
price_per_million_tokens_input()andprice_per_million_tokens_output() - Costs are rounded to 8 decimal places for precision
- Graceful fallback to empty
Pricingobject if calculation fails
🐛 Bug Fixes
- fix(openrouter): when fallback models are used, use "models" in the requests, not "model"
- fix(openrouter): accept single string in
with_fallback_models()method (was treating string as iterable)
🚨 Error Handling
- feat(openrouter): comprehensive custom exception hierarchy with detailed error messages
- Created 16+ custom exception classes for all documented OpenRouter errors
- Each exception includes clear descriptions, possible causes, and actionable solutions
- Automatic error parsing from response status codes and error messages
- Examples:
ModelNotFoundError,InsufficientCreditsError,ContextLengthExceededError, etc. - See
examples/openrouter_error_handling.pyfor usage examples
v0.9.0 🚀
Release Date: October 18, 2024
We're thrilled to announce Agentle v0.9.0, a major milestone packed with powerful new features, critical fixes, and performance improvements. This release represents months of refinement across our parsing, provider, and agent ecosystems.
✨ Highlights
🛡️ Guardrails System
- NEW: Comprehensive guardrails integration for safer AI interactions
- Tool Leakage Validator: Prevent sensitive tool information from leaking in responses
🔌 OpenRouter Provider
- Full OpenRouter integration with streaming support and structured outputs
- Dynamic price fetching for cost-aware model selection
- Model fallbacks for improved reliability
- Factory methods for easier instantiation
- Enhanced tool adapter with complex type expansion in JSON Schema conversion
- Configurable httpx client timeout for generation tasks
📄 Document Parsing Revolution
- Native PDF processing with PyMuPDF for superior performance
- RTF Document Parser - brand new format support
- Native DOCX processing option for faster document handling
- Enhanced PDF parsing with encrypted file support and structured exception handling
- PPTX parsing improvements with legacy conversion support
- Legacy
.docfile conversion with improved error handling - Optimized archive processing (ZIP, RAR) with better error messaging
- Page screenshot optimization to reduce per-image analysis costs
- Configurable
render_scalefor PDF screenshot quality control max_concurrent_pagesfield for PDF parsing concurrency control
🧠 Embeddings & Vector Stores
- DeepInfra Embedding Provider - OpenAI-compatible API integration
- Batch embedding generation methods for async processing
- Enhanced async embedding methods with None value handling
- Load balancer implementation (DuckDB and in-memory) with provider quotas and ranking
💬 WhatsApp Enhancements
- Enhanced markdown formatting (headers, tables, blockquotes, horizontal rules)
- Improved message splitting with list item grouping
send_messagemethod for independent message sending- Multiple ca...
v0.9.14
Changelog
v0.9.14
fix(openrouter-adapter): Suppress verbose HTTP library logging
- Add log level configuration for httpcore and httpx loggers
- Set log levels to WARNING to prevent debug logs from interfering with response streams
- Improve logging clarity and reduce unnecessary log noise in OpenRouter adapter
v0.9.13
fix(openrouter-adapter): Add debug logging for OpenRouter response
- Add debug logging to track raw OpenRouter API response
- Helps with troubleshooting and understanding API interactions
- Provides visibility into response data before parsing
v0.9.12
fix(openrouter-adapter): Improve JSON response parsing with robust error handling
- Add more detailed error logging for JSON parsing failures
- Read response text before attempting JSON parsing to prevent body consumption
- Include response length in error log for better diagnostics
- Use
json.loads()instead of.json()method for more explicit parsing - Enhance error message with additional context about response parsing
v0.9.11
fix(openrouter-adapter): Improve JSON response parsing with robust error handling
- Add comprehensive error handling for JSON parsing in OpenRouter response
- Capture and log detailed error information when JSON parsing fails
- Include response status code, content type, and preview in error logging
- Raise a descriptive ValueError with context when JSON parsing fails
- Enhance error traceability for debugging OpenRouter API interactions
v0.9.10
feat(docx-parser, pdf-parser): Implement max_output_tokens for response generation
- Add max_output_tokens attribute to DocxFileParser and PDFFileParser for controlling token generation in responses
- Update relevant methods to utilize max_output_tokens in generation configuration
v0.9.9
fix(openrouter-adapter): Improve tool call argument parsing with robust error handling
- Add comprehensive JSON parsing error handling for tool call arguments
- Implement fallback mechanism to extract first valid JSON object when parsing fails
- Log detailed warnings and errors for malformed JSON input
- Prevent adapter from breaking when encountering invalid JSON in tool call arguments
- Ensure graceful degradation by using empty dict if parsing completely fails
v0.9.8
fix(whatsapp): Improve phone number ID extraction for WhatsApp webhook payloads
- Update phone number ID extraction logic for linked IDs
- Set remoteJid to remoteJidAlt when "@lid" is present in key
- Ensure consistent phone number ID handling for different WhatsApp message types
v0.9.7
fix(whatsapp): not returning early when "lid" is present.
v0.9.6
fix(stdio-mcp-server): Improve JSON message parsing and connection state handling
- Enhance message parsing to skip non-JSON lines in stdout
- Add debug logging for skipped lines and invalid JSON
- Modify connection state checks to allow requests/notifications during initialization
- Prevent potential errors from processing non-JSON output from MCP servers
- Improve error handling and logging for message decoding
v0.9.5
fix(whatsapp): Improve WhatsApp webhook payload phone number ID extraction
- Update phone number ID extraction logic for WhatsApp webhook payloads
- Add fallback extraction method using remoteJid when remoteJidAlt is not available
- Ensure consistent phone number ID extraction across different webhook scenarios
- Prevent potential null or incomplete phone number ID assignments
v0.9.4
feat(whatsapp): Improve WhatsApp webhook payload and key handling
- Add remoteJidAlt field to Key model for enhanced JID parsing
- Update phone number ID extraction logic in webhook payload processing
- Modify message handling to use remoteJidAlt for linked WhatsApp accounts
- Enhance robustness of JID parsing for different WhatsApp account types
v0.9.3
🚀 New Responses API (Experimental)
- feat(responses): Brand new experimental Responses API with comprehensive OpenRouter integration
- Complete OpenRouter API compatibility with streaming support and structured outputs
- Advanced function tool management with
FunctionCallStorefor tracking and executing function calls - Enhanced
FunctionToolclass with robust type safety and parameter conversion ToolPairsystem for managing tool definitions and call history- Support for both synchronous and asynchronous tool execution
- Comprehensive response streaming with
AsyncStreamimplementation - Integration with
orjsonfor improved JSON handling performance - Support for reasoning, background processing, and conversation management
- Factory methods for easy instantiation (
openrouter(),openai())
🌐 Web Extraction & Automation
- feat(web): Complete web extraction and automation system
- Extractor class: Intelligent web content extraction with structured output support
- Browser automation: Full Playwright integration with configurable options
- Action system: Comprehensive set of web actions including:
- Click, scroll, write text, take screenshots
- Generate PDFs, execute JavaScript, press keys
- Wait for conditions, viewport management
- Extraction preferences: Advanced configuration options:
- Geolocation support, mobile/desktop modes
- Ad blocking, TLS verification control
- Custom headers, timeouts, and proxy settings
- Content filtering (include/exclude tags)
- Structured prompts: AI-powered content analysis with markdown conversion
- Error handling: Graceful handling of invalid URLs and extraction failures
🔧 Enhanced Assistant & Tracing
- feat(assistant): Enhanced Assistant model with new fields and Responder integration
- feat(tracing): Improved tracing system with BaseModel inheritance
- Refactored
LangfuseOtelClientandNoOpOtelClientto inherit from BaseModel - Enhanced type safety and error handling across tracing components
- Better parameter conversion and callable management
- Refactored
🛠️ Function Call Management
- feat(responses): Advanced function call management system
- Methods for retrieving, removing, and clearing function calls
- Enhanced tool presence checking and call count retrieval
- Support for multiple function calls with improved access patterns
- Example usage documentation for better developer experience
🐛 Bug Fixes & Improvements
- fix(responses): Multiple fixes for structured outputs and JSON schema handling
- Proper JSON schema "additionalProperties" setting and retrieval
- Improved handling of incomplete structured outputs with clearer error messaging
- Fixed tool calls and response object text format handling
- Streamlined response object creation and event handling
- refactor(file): Commented out MIME type validation for broader file type acceptance
- fix(responses): Enhanced OpenRouter example with updated max output tokens
📈 Performance & Developer Experience
- feat(responses): AsyncStream implementation for efficient streaming responses
- refactor(responses, web): Simplified JSON response handling and improved output parsing
- feat(utils): Added
needsutility for dependency management - Enhanced error messaging and debugging capabilities across all new features
v0.9.2
- feat(agent): cache instructions in Agent class and Developer message for the providers that supports it (cache ephemeral)
v0.9.1
🎯 Pricing Integration
- feat(generations): Added
Pricingmodel toGenerationclass withinput_pricing,output_pricing, andtotal_pricingfields - feat(providers): All major providers now automatically populate pricing information in
Generationobjects- OpenRouter: Dynamic pricing from API with automatic per-token to per-million conversion
- OpenAI: Static pricing table with comprehensive model coverage
- Google (Gemini): Static pricing for all Gemini models
- Cerebras: Static pricing for Llama models
- Amazon Bedrock: Static pricing for Claude and other models
- feat(adapters): Added async
adapt_async()methods to all provider adapters for pricing calculation - fix(openrouter): Corrected pricing calculation - OpenRouter returns per-token prices, now properly converted to per-million-tokens
- Pricing is calculated using the abstract methods
price_per_million_tokens_input()andprice_per_million_tokens_output() - Costs are rounded to 8 decimal places for precision
- Graceful fallback to empty
Pricingobject if calculation fails
🐛 Bug Fixes
- fix(openrouter): when fallback models are used, use "models" in the requests, not "model"
- fix(openrouter): accept single string in
with_fallback_models()method (was treating string as iterable)
🚨 Error Handling
- feat(openrouter): comprehensive custom exception hierarchy with detailed error messages
- Created 16+ custom exception classes for all documented OpenRouter errors
- Each exception includes clear descriptions, possible causes, and actionable solutions
- Automatic error parsing from response status codes and error messages
- Examples:
ModelNotFoundError,InsufficientCreditsError,ContextLengthExceededError, etc. - See
examples/openrouter_error_handling.pyfor usage examples
v0.9.0 🚀
Release Date: October 18, 2024
We're thrilled to announce Agentle v0.9.0, a major milestone packed with powerful new features, critical fixes, and performance improvements. This release represents months of refinement across our parsing, provider, and agent ecosystems.
✨ Highlights
🛡️ Guardrails System
- NEW: Comprehensive guardrails integration for safer AI interactions
- Tool Leakage Validator: Prevent sensitive tool information from leaking in responses
🔌 OpenRouter Provider
- Full OpenRouter integration with streaming support and structured outputs
- Dynamic price fetching for cost-aware model selection
- Model fallbacks for improved reliabilit...
v0.9.13
Changelog
v0.9.13
fix(openrouter-adapter): Add debug logging for OpenRouter response
- Add debug logging to track raw OpenRouter API response
- Helps with troubleshooting and understanding API interactions
- Provides visibility into response data before parsing
v0.9.12
fix(openrouter-adapter): Improve JSON response parsing with robust error handling
- Add more detailed error logging for JSON parsing failures
- Read response text before attempting JSON parsing to prevent body consumption
- Include response length in error log for better diagnostics
- Use
json.loads()instead of.json()method for more explicit parsing - Enhance error message with additional context about response parsing
v0.9.11
fix(openrouter-adapter): Improve JSON response parsing with robust error handling
- Add comprehensive error handling for JSON parsing in OpenRouter response
- Capture and log detailed error information when JSON parsing fails
- Include response status code, content type, and preview in error logging
- Raise a descriptive ValueError with context when JSON parsing fails
- Enhance error traceability for debugging OpenRouter API interactions
v0.9.10
feat(docx-parser, pdf-parser): Implement max_output_tokens for response generation
- Add max_output_tokens attribute to DocxFileParser and PDFFileParser for controlling token generation in responses
- Update relevant methods to utilize max_output_tokens in generation configuration
v0.9.9
fix(openrouter-adapter): Improve tool call argument parsing with robust error handling
- Add comprehensive JSON parsing error handling for tool call arguments
- Implement fallback mechanism to extract first valid JSON object when parsing fails
- Log detailed warnings and errors for malformed JSON input
- Prevent adapter from breaking when encountering invalid JSON in tool call arguments
- Ensure graceful degradation by using empty dict if parsing completely fails
v0.9.8
fix(whatsapp): Improve phone number ID extraction for WhatsApp webhook payloads
- Update phone number ID extraction logic for linked IDs
- Set remoteJid to remoteJidAlt when "@lid" is present in key
- Ensure consistent phone number ID handling for different WhatsApp message types
v0.9.7
fix(whatsapp): not returning early when "lid" is present.
v0.9.6
fix(stdio-mcp-server): Improve JSON message parsing and connection state handling
- Enhance message parsing to skip non-JSON lines in stdout
- Add debug logging for skipped lines and invalid JSON
- Modify connection state checks to allow requests/notifications during initialization
- Prevent potential errors from processing non-JSON output from MCP servers
- Improve error handling and logging for message decoding
v0.9.5
fix(whatsapp): Improve WhatsApp webhook payload phone number ID extraction
- Update phone number ID extraction logic for WhatsApp webhook payloads
- Add fallback extraction method using remoteJid when remoteJidAlt is not available
- Ensure consistent phone number ID extraction across different webhook scenarios
- Prevent potential null or incomplete phone number ID assignments
v0.9.4
feat(whatsapp): Improve WhatsApp webhook payload and key handling
- Add remoteJidAlt field to Key model for enhanced JID parsing
- Update phone number ID extraction logic in webhook payload processing
- Modify message handling to use remoteJidAlt for linked WhatsApp accounts
- Enhance robustness of JID parsing for different WhatsApp account types
v0.9.3
🚀 New Responses API (Experimental)
- feat(responses): Brand new experimental Responses API with comprehensive OpenRouter integration
- Complete OpenRouter API compatibility with streaming support and structured outputs
- Advanced function tool management with
FunctionCallStorefor tracking and executing function calls - Enhanced
FunctionToolclass with robust type safety and parameter conversion ToolPairsystem for managing tool definitions and call history- Support for both synchronous and asynchronous tool execution
- Comprehensive response streaming with
AsyncStreamimplementation - Integration with
orjsonfor improved JSON handling performance - Support for reasoning, background processing, and conversation management
- Factory methods for easy instantiation (
openrouter(),openai())
🌐 Web Extraction & Automation
- feat(web): Complete web extraction and automation system
- Extractor class: Intelligent web content extraction with structured output support
- Browser automation: Full Playwright integration with configurable options
- Action system: Comprehensive set of web actions including:
- Click, scroll, write text, take screenshots
- Generate PDFs, execute JavaScript, press keys
- Wait for conditions, viewport management
- Extraction preferences: Advanced configuration options:
- Geolocation support, mobile/desktop modes
- Ad blocking, TLS verification control
- Custom headers, timeouts, and proxy settings
- Content filtering (include/exclude tags)
- Structured prompts: AI-powered content analysis with markdown conversion
- Error handling: Graceful handling of invalid URLs and extraction failures
🔧 Enhanced Assistant & Tracing
- feat(assistant): Enhanced Assistant model with new fields and Responder integration
- feat(tracing): Improved tracing system with BaseModel inheritance
- Refactored
LangfuseOtelClientandNoOpOtelClientto inherit from BaseModel - Enhanced type safety and error handling across tracing components
- Better parameter conversion and callable management
- Refactored
🛠️ Function Call Management
- feat(responses): Advanced function call management system
- Methods for retrieving, removing, and clearing function calls
- Enhanced tool presence checking and call count retrieval
- Support for multiple function calls with improved access patterns
- Example usage documentation for better developer experience
🐛 Bug Fixes & Improvements
- fix(responses): Multiple fixes for structured outputs and JSON schema handling
- Proper JSON schema "additionalProperties" setting and retrieval
- Improved handling of incomplete structured outputs with clearer error messaging
- Fixed tool calls and response object text format handling
- Streamlined response object creation and event handling
- refactor(file): Commented out MIME type validation for broader file type acceptance
- fix(responses): Enhanced OpenRouter example with updated max output tokens
📈 Performance & Developer Experience
- feat(responses): AsyncStream implementation for efficient streaming responses
- refactor(responses, web): Simplified JSON response handling and improved output parsing
- feat(utils): Added
needsutility for dependency management - Enhanced error messaging and debugging capabilities across all new features
v0.9.2
- feat(agent): cache instructions in Agent class and Developer message for the providers that supports it (cache ephemeral)
v0.9.1
🎯 Pricing Integration
- feat(generations): Added
Pricingmodel toGenerationclass withinput_pricing,output_pricing, andtotal_pricingfields - feat(providers): All major providers now automatically populate pricing information in
Generationobjects- OpenRouter: Dynamic pricing from API with automatic per-token to per-million conversion
- OpenAI: Static pricing table with comprehensive model coverage
- Google (Gemini): Static pricing for all Gemini models
- Cerebras: Static pricing for Llama models
- Amazon Bedrock: Static pricing for Claude and other models
- feat(adapters): Added async
adapt_async()methods to all provider adapters for pricing calculation - fix(openrouter): Corrected pricing calculation - OpenRouter returns per-token prices, now properly converted to per-million-tokens
- Pricing is calculated using the abstract methods
price_per_million_tokens_input()andprice_per_million_tokens_output() - Costs are rounded to 8 decimal places for precision
- Graceful fallback to empty
Pricingobject if calculation fails
🐛 Bug Fixes
- fix(openrouter): when fallback models are used, use "models" in the requests, not "model"
- fix(openrouter): accept single string in
with_fallback_models()method (was treating string as iterable)
🚨 Error Handling
- feat(openrouter): comprehensive custom exception hierarchy with detailed error messages
- Created 16+ custom exception classes for all documented OpenRouter errors
- Each exception includes clear descriptions, possible causes, and actionable solutions
- Automatic error parsing from response status codes and error messages
- Examples:
ModelNotFoundError,InsufficientCreditsError,ContextLengthExceededError, etc. - See
examples/openrouter_error_handling.pyfor usage examples
v0.9.0 🚀
Release Date: October 18, 2024
We're thrilled to announce Agentle v0.9.0, a major milestone packed with powerful new features, critical fixes, and performance improvements. This release represents months of refinement across our parsing, provider, and agent ecosystems.
✨ Highlights
🛡️ Guardrails System
- NEW: Comprehensive guardrails integration for safer AI interactions
- Tool Leakage Validator: Prevent sensitive tool information from leaking in responses
🔌 OpenRouter Provider
- Full OpenRouter integration with streaming support and structured outputs
- Dynamic price fetching for cost-aware model selection
- Model fallbacks for improved reliability
- Factory methods for easier instantiation
- Enhanced tool adapter with complex type expansion in JSON Schema conversion
- Configurable httpx client timeout for generation tasks
📄 Document Parsing Revolution
- Native PDF processing with PyMuPDF for superior performance
- **RTF Document ...
v0.9.12
Changelog
v0.9.12
fix(openrouter-adapter): Improve JSON response parsing with robust error handling
- Add more detailed error logging for JSON parsing failures
- Read response text before attempting JSON parsing to prevent body consumption
- Include response length in error log for better diagnostics
- Use
json.loads()instead of.json()method for more explicit parsing - Enhance error message with additional context about response parsing
v0.9.11
fix(openrouter-adapter): Improve JSON response parsing with robust error handling
- Add comprehensive error handling for JSON parsing in OpenRouter response
- Capture and log detailed error information when JSON parsing fails
- Include response status code, content type, and preview in error logging
- Raise a descriptive ValueError with context when JSON parsing fails
- Enhance error traceability for debugging OpenRouter API interactions
v0.9.10
feat(docx-parser, pdf-parser): Implement max_output_tokens for response generation
- Add max_output_tokens attribute to DocxFileParser and PDFFileParser for controlling token generation in responses
- Update relevant methods to utilize max_output_tokens in generation configuration
v0.9.9
fix(openrouter-adapter): Improve tool call argument parsing with robust error handling
- Add comprehensive JSON parsing error handling for tool call arguments
- Implement fallback mechanism to extract first valid JSON object when parsing fails
- Log detailed warnings and errors for malformed JSON input
- Prevent adapter from breaking when encountering invalid JSON in tool call arguments
- Ensure graceful degradation by using empty dict if parsing completely fails
v0.9.8
fix(whatsapp): Improve phone number ID extraction for WhatsApp webhook payloads
- Update phone number ID extraction logic for linked IDs
- Set remoteJid to remoteJidAlt when "@lid" is present in key
- Ensure consistent phone number ID handling for different WhatsApp message types
v0.9.7
fix(whatsapp): not returning early when "lid" is present.
v0.9.6
fix(stdio-mcp-server): Improve JSON message parsing and connection state handling
- Enhance message parsing to skip non-JSON lines in stdout
- Add debug logging for skipped lines and invalid JSON
- Modify connection state checks to allow requests/notifications during initialization
- Prevent potential errors from processing non-JSON output from MCP servers
- Improve error handling and logging for message decoding
v0.9.5
fix(whatsapp): Improve WhatsApp webhook payload phone number ID extraction
- Update phone number ID extraction logic for WhatsApp webhook payloads
- Add fallback extraction method using remoteJid when remoteJidAlt is not available
- Ensure consistent phone number ID extraction across different webhook scenarios
- Prevent potential null or incomplete phone number ID assignments
v0.9.4
feat(whatsapp): Improve WhatsApp webhook payload and key handling
- Add remoteJidAlt field to Key model for enhanced JID parsing
- Update phone number ID extraction logic in webhook payload processing
- Modify message handling to use remoteJidAlt for linked WhatsApp accounts
- Enhance robustness of JID parsing for different WhatsApp account types
v0.9.3
🚀 New Responses API (Experimental)
- feat(responses): Brand new experimental Responses API with comprehensive OpenRouter integration
- Complete OpenRouter API compatibility with streaming support and structured outputs
- Advanced function tool management with
FunctionCallStorefor tracking and executing function calls - Enhanced
FunctionToolclass with robust type safety and parameter conversion ToolPairsystem for managing tool definitions and call history- Support for both synchronous and asynchronous tool execution
- Comprehensive response streaming with
AsyncStreamimplementation - Integration with
orjsonfor improved JSON handling performance - Support for reasoning, background processing, and conversation management
- Factory methods for easy instantiation (
openrouter(),openai())
🌐 Web Extraction & Automation
- feat(web): Complete web extraction and automation system
- Extractor class: Intelligent web content extraction with structured output support
- Browser automation: Full Playwright integration with configurable options
- Action system: Comprehensive set of web actions including:
- Click, scroll, write text, take screenshots
- Generate PDFs, execute JavaScript, press keys
- Wait for conditions, viewport management
- Extraction preferences: Advanced configuration options:
- Geolocation support, mobile/desktop modes
- Ad blocking, TLS verification control
- Custom headers, timeouts, and proxy settings
- Content filtering (include/exclude tags)
- Structured prompts: AI-powered content analysis with markdown conversion
- Error handling: Graceful handling of invalid URLs and extraction failures
🔧 Enhanced Assistant & Tracing
- feat(assistant): Enhanced Assistant model with new fields and Responder integration
- feat(tracing): Improved tracing system with BaseModel inheritance
- Refactored
LangfuseOtelClientandNoOpOtelClientto inherit from BaseModel - Enhanced type safety and error handling across tracing components
- Better parameter conversion and callable management
- Refactored
🛠️ Function Call Management
- feat(responses): Advanced function call management system
- Methods for retrieving, removing, and clearing function calls
- Enhanced tool presence checking and call count retrieval
- Support for multiple function calls with improved access patterns
- Example usage documentation for better developer experience
🐛 Bug Fixes & Improvements
- fix(responses): Multiple fixes for structured outputs and JSON schema handling
- Proper JSON schema "additionalProperties" setting and retrieval
- Improved handling of incomplete structured outputs with clearer error messaging
- Fixed tool calls and response object text format handling
- Streamlined response object creation and event handling
- refactor(file): Commented out MIME type validation for broader file type acceptance
- fix(responses): Enhanced OpenRouter example with updated max output tokens
📈 Performance & Developer Experience
- feat(responses): AsyncStream implementation for efficient streaming responses
- refactor(responses, web): Simplified JSON response handling and improved output parsing
- feat(utils): Added
needsutility for dependency management - Enhanced error messaging and debugging capabilities across all new features
v0.9.2
- feat(agent): cache instructions in Agent class and Developer message for the providers that supports it (cache ephemeral)
v0.9.1
🎯 Pricing Integration
- feat(generations): Added
Pricingmodel toGenerationclass withinput_pricing,output_pricing, andtotal_pricingfields - feat(providers): All major providers now automatically populate pricing information in
Generationobjects- OpenRouter: Dynamic pricing from API with automatic per-token to per-million conversion
- OpenAI: Static pricing table with comprehensive model coverage
- Google (Gemini): Static pricing for all Gemini models
- Cerebras: Static pricing for Llama models
- Amazon Bedrock: Static pricing for Claude and other models
- feat(adapters): Added async
adapt_async()methods to all provider adapters for pricing calculation - fix(openrouter): Corrected pricing calculation - OpenRouter returns per-token prices, now properly converted to per-million-tokens
- Pricing is calculated using the abstract methods
price_per_million_tokens_input()andprice_per_million_tokens_output() - Costs are rounded to 8 decimal places for precision
- Graceful fallback to empty
Pricingobject if calculation fails
🐛 Bug Fixes
- fix(openrouter): when fallback models are used, use "models" in the requests, not "model"
- fix(openrouter): accept single string in
with_fallback_models()method (was treating string as iterable)
🚨 Error Handling
- feat(openrouter): comprehensive custom exception hierarchy with detailed error messages
- Created 16+ custom exception classes for all documented OpenRouter errors
- Each exception includes clear descriptions, possible causes, and actionable solutions
- Automatic error parsing from response status codes and error messages
- Examples:
ModelNotFoundError,InsufficientCreditsError,ContextLengthExceededError, etc. - See
examples/openrouter_error_handling.pyfor usage examples
v0.9.0 🚀
Release Date: October 18, 2024
We're thrilled to announce Agentle v0.9.0, a major milestone packed with powerful new features, critical fixes, and performance improvements. This release represents months of refinement across our parsing, provider, and agent ecosystems.
✨ Highlights
🛡️ Guardrails System
- NEW: Comprehensive guardrails integration for safer AI interactions
- Tool Leakage Validator: Prevent sensitive tool information from leaking in responses
🔌 OpenRouter Provider
- Full OpenRouter integration with streaming support and structured outputs
- Dynamic price fetching for cost-aware model selection
- Model fallbacks for improved reliability
- Factory methods for easier instantiation
- Enhanced tool adapter with complex type expansion in JSON Schema conversion
- Configurable httpx client timeout for generation tasks
📄 Document Parsing Revolution
- Native PDF processing with PyMuPDF for superior performance
- RTF Document Parser - brand new format support
- Native DOCX processing option for faster document handling
- Enhanced PDF parsing with encrypted file support and structured exception handling
- PPTX parsing improvements with legacy conversion support
- Legacy `.d...