Back to Prompt Library
implementation

Implement Developer Agent with Claude 4 Opus and StarCoder 2

Inspect the original prompt language first, then copy or adapt it once you know how it fits your workflow.

Linked challenge: Build AI Dev Agent Teams

Format
Code-aware
Lines
10
Sections
1
Linked challenge
Build AI Dev Agent Teams

Prompt source

Original prompt text with formatting preserved for inspection.

10 lines
1 sections
No variables
1 code block
Implement the 'Developer' agent using LangChain, incorporating Claude 4 Opus for code generation and StarCoder 2 as a tool for code analysis and linting. Provide initial LangChain tool definitions for 'generate_code' and 'analyze_code'. ```python
from langchain_core.prompts import ChatPromptTemplate
from langchain_core.runnables import RunnablePassthrough
from langchain_core.output_parsers import StrOutputParser
from langchain_core.tools import tool
from langchain_anthropic import ChatAnthropic # Initialize Claude 4 Opus
llm_claude = ChatAnthropic(model='claude-4-opus') # Define a custom tool for StarCoder 2
@tool
def analyze_code(code: str) -> str: """Analyzes code for quality, security, and style issues using StarCoder 2 and returns a report.""" # Placeholder for StarCoder 2 integration return f"Running StarCoder 2 analysis on code snippet: {code[:50]}..." # Further implementation for the Developer agent...
```

Adaptation plan

Keep the source stable, then change the prompt in a predictable order so the next run is easier to evaluate.

Keep stable

Hold the task contract and output shape stable so generated implementations remain comparable.

Tune next

Update libraries, interfaces, and environment assumptions to match the stack you actually run.

Verify after

Test failure handling, edge cases, and any code paths that depend on hidden context or secrets.