Format: Interactive hands-on workshop
Prerequisites: Basic Git/GitHub knowledge
What you'll build: A working Open SWE setup with live agent demonstrations
By the end of this workshop, you will:
- Understand the architecture and capabilities of autonomous coding agents
- Set up and configure LangChain Open SWE locally and in the cloud
- Execute real-time code generation and modification tasks
- Analyze agent decision-making processes and output quality
- Implement best practices for integrating agentic engineering into development workflows
Participants should have ready:
- GitHub account with admin access to at least one repository
- Anthropic API key (Claude)/ OpenAI / Gemni API
- Basic development environment (Node.js, Yarn)
- GitHub account verified
- LLM API key obtained
- Node.js (v18+) and Yarn installed
- Code editor ready
Interactive Discussion: "What's the difference between GitHub Copilot and Open SWE?"
Key distinctions:
- Copilots: Real-time, IDE-based, line-level suggestions
- Agents: Asynchronous, repository-wide, complete task execution
Open SWE employs four specialized agents:
-
Manager Agent
- Entry point for all tasks
- Handles user interactions and routing
- Initializes state management
-
Planner Agent
- Analyzes codebase and requirements
- Creates detailed execution strategies
- Requires human approval by default
-
Programmer Agent
- Executes the approved plan
- Writes code, runs tests, installs dependencies
- Iterates based on feedback
-
Reviewer Agent
- Quality assurance and error checking
- Ensures code correctness before PR creation
- Provides feedback for improvements
Participants work in pairs to:
- Map out a typical development workflow
- Identify where each Open SWE agent would intervene
- Discuss potential failure points and human oversight needs
Advantages of local setup:
- Full customization control
- Private repository access
- Cost optimization
- Development and testing flexibility
- Complete control over the development environment
# Clone the Open SWE repository
git clone https://github.com/langchain-ai/open-swe.git
cd open-swe
# Install dependencies
yarn installAgent Configuration (.env file):
# Copy example files
cp ./apps/open-swe/.env.example ./apps/open-swe/.env
cp ./apps/web/.env.example ./apps/web/.envRequired Environment Variables:
# LangSmith tracing
LANGCHAIN_PROJECT="open-swe-workshop"
LANGCHAIN_API_KEY="your-langsmith-key"
LANGCHAIN_TRACING_V2=true
# Model API keys
ANTHROPIC_API_KEY="your-anthropic-key"
OPENAI_API_KEY="your-openai-key" # Optional
GOOGLE_API_KEY="your-google-key" # Optional
# Daytona sandbox
DAYTONA_API_KEY="your-daytona-key"-
Navigate to GitHub Developer Settings
-
Create new GitHub App with permissions:
- Contents: Read & Write
- Metadata: Read & Write
- Pull requests: Read & Write
- Issues: Read & Write
-
Configure OAuth settings
-
Generate private key and client secrets
Participants complete:
- Full local installation
- Environment variable configuration
- GitHub App creation and setup
- First local agent run
# Start the web server
cd apps/web && yarn dev
# Start the agent server (in new terminal)
cd apps/open-swe && yarn dev
# Access the application
# http://localhost:3000Scenario 1: Bug Fix Challenge
- Task: "Fix the authentication error in the login component"
- Watch the agent analyze, plan, and implement the fix
- Observe the decision-making process through logs
Scenario 2: Feature Implementation
- Task: "Add user profile picture upload functionality"
- Multi-file changes across frontend and backend
- Database schema modifications
Scenario 3: Code Refactoring
- Task: "Refactor the payment processing module for better error handling"
- Complex logic analysis and improvement
Participants learn to monitor:
- Agent logs and decision trees
- Sandbox execution environment
- Code quality metrics
- Test execution results
Each participant:
- Selects a task from provided examples
- Configures and launches their agent
- Monitors the execution process
- Reviews the generated pull request
Example Tasks:
- Add unit tests to an existing function
- Update dependencies and fix compatibility issues
- Implement a new API endpoint with documentation
Code Walkthrough: Examining agent decision logs
Key analysis points:
- How agents parse requirements
- Codebase understanding strategies
- Error handling and recovery
- Quality assurance processes
Framework for Evaluation:
-
Code Quality Metrics
- Adherence to style guidelines
- Test coverage implementation
- Documentation completeness
-
Functional Correctness
- Requirement fulfillment
- Edge case handling
- Integration compatibility
-
Review Process Effectiveness
- Error detection rate
- Improvement suggestions
- Code optimization
Small groups analyze different agent outputs:
- Compare approaches to the same task
- Identify strengths and weaknesses
- Discuss potential improvements
Techniques for better agent performance:
- Task description clarity
- Repository structure optimization
- Context window management
- Human feedback integration
# Example workflow integration
name: Open SWE Auto-Assignment
on:
issues:
types: [labeled]
jobs:
auto-assign:
if: contains(github.event.label.name, 'open-swe-auto')
runs-on: ubuntu-latest
# ... configuration- Task assignment protocols
- Review responsibilities
- Quality gates and approvals
- Rollback procedures
Resource Optimization:
- Task complexity assessment
- Parallel execution limits
- Sandbox usage monitoring
- API cost tracking
Critical security practices:
- Repository access controls
- API key management
- Sandbox isolation verification
- Code review requirements
Teams design integration workflows for:
- Bug triage and assignment
- Feature request processing
- Code maintenance tasks
- Documentation updates
Advanced control features:
- Mid-task Interruption: Stop and redirect agent execution
- Plan Editing: Modify execution strategies before implementation
- Double Texting: Send new instructions during execution
- Real-time Feedback: Guide agent behavior dynamically
GitHub Label System:
open-swe: Standard execution with human approvalopen-swe-auto: Automatic plan approvalopen-swe-max: Enhanced performance with Claude Opusopen-swe-max-auto: Fully automated high-performance mode
Techniques for better task descriptions:
# Effective Task Description Template
## Objective
Clear, specific goal statement
## Context
Relevant background information
## Constraints
Technical limitations and requirements
## Success Criteria
Measurable outcomes and quality standards
## Additional Notes
Edge cases, preferences, and considerationsParticipants customize their setup:
- Create custom labels for their workflow
- Design effective task descriptions
- Configure human approval thresholds
Setup Problems:
- Authentication failures
- Permission errors
- Network connectivity issues
- Environment variable misconfigurations
Runtime Issues:
- Agent timeout errors
- Sandbox resource limitations
- API rate limiting
- Code execution failures
Quality Problems:
- Incomplete implementations
- Test failures
- Integration conflicts
- Performance degradation
Systematic Approach:
- Check agent logs for error patterns
- Verify environment configurations
- Test API connectivity
- Review task descriptions for clarity
- Examine repository structure compatibility
Optimization techniques:
- Task scoping strategies
- Context window optimization
- Resource allocation tuning
- Feedback loop improvements
Key takeaways:
- Open SWE represents a paradigm shift toward autonomous development
- Multi-agent architecture provides robust, reviewable code generation
- Integration requires thoughtful workflow design
- Human oversight remains critical for quality assurance
- GitHub Repository: https://github.com/langchain-ai/open-swe
- Documentation: https://docs.langchain.com/labs/swe
- Demo Platform: https://swe.langchain.com
- Slack Community: https://www.langchain.com/join-community
- Blog Updates: https://blog.langchain.com
- GitHub Issues for bug reports
- Slack for community support