TryOn VTON Agent: LangChain-Based Multi-Provider Agent#80
Merged
kailashahirwar merged 1 commit intomainfrom Dec 19, 2025
Merged
TryOn VTON Agent: LangChain-Based Multi-Provider Agent#80kailashahirwar merged 1 commit intomainfrom
kailashahirwar merged 1 commit intomainfrom
Conversation
|
You have run out of free Bugbot PR reviews for this billing cycle. This will reset on January 16. To receive reviews on all of your PRs, visit the Cursor dashboard to activate Pro and start your 14-day free trial. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Virtual Try-On Agent - LangChain-Based Multi-Provider Agent
🎯 Overview
This PR introduces a LangChain-based Virtual Try-On Agent that intelligently selects and uses the appropriate virtual try-on adapter based on natural language prompts. The agent provides a unified interface to multiple VTOn providers (Kling AI, Amazon Nova Canvas, and Segmind) with automatic provider selection and comprehensive error handling.
✨ Features
Core Agent Capabilities
Supported Virtual Try-On Providers
CLI Interface
vton_agent.py)📁 Files Added/Modified
New Files
tryon/agents/vton/agent.py- Main VTOnAgent class implementationtryon/agents/vton/tools.py- LangChain tool wrappers for each VTOn adaptertryon/agents/vton/__init__.py- Module exportsvton_agent.py- CLI interface for the agentdocs/docs/agents/vton-agent.md- Comprehensive documentationModified Files
tryon/agents/__init__.py- Export VTOnAgent moduleREADME.md- Added VTOn Agent section with usage examplesrequirements.txt- Added LangChain dependenciesdocs/sidebars.ts- Added agent documentation to sidebar🚀 Usage
Python API
CLI
🏗️ Architecture
The agent follows LangChain's ReAct pattern:
🔧 Technical Details
LangChain Integration
create_agent()API for agent creation@tooldecorators for each VTOn providerastream()for progress trackingCache Management
get_tool_output_from_cache()Error Handling
📦 Dependencies
New dependencies added to
requirements.txt:✅ Testing
Manual Testing Checklist
Test Commands Used
📚 Documentation
Complete documentation available at:
🐛 Known Issues & Future Work
Known Issues
create_agent()API compatibility needs verification with latest LangChain versiongpt-5.1) may need updates based on actual model availabilityFuture Enhancements
generate_and_decode()method fullygenerate()andagenerate())🔐 Environment Variables Required
🎉 Benefits
📝 Migration Guide
For users currently using adapters directly:
Before (Direct Adapter Usage)
After (Agent Usage)
Note: Direct adapter usage still works and is recommended for programmatic/batch processing where you know exactly which provider to use.
🤝 Contributing
To add a new VTOn provider to the agent:
tryon/api/tryon/agents/vton/tools.py:get_vton_tools()to include your toolagent.pyto mention your providerType: Feature
Priority: High
Breaking Changes: None
Backward Compatible: Yes