> For the complete documentation index, see [llms.txt](https://docs.clore.ai/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.clore.ai/guides/guides_v2-hi/ai-platforms-and-agents/swe-agent.md).

# SWE-agent Code Fixer

## अवलोकन

[SWE-agent](https://github.com/SWE-agent/SWE-agent) एक एआई-संचालित सॉफ़्टवेयर इंजीनियरिंग एजेंट है जो **ऑटोमेटिक रूप से GitHub इश्यूज़ को हल करता है** एक टर्मिनल इंटरफ़ेस के जरिए एक भाषा मॉडल को कोड रिपोजिटरी के साथ इंटरैक्ट करने देता है। प्रस्तुत किया गया था **NeurIPS 2024** और साथ ही **15,000 से अधिक GitHub स्टार्स**, SWE-agent स्वचालित बग फिक्सिंग और कोड मरम्मत के लिए प्रमुख ओपन-सोर्स समाधान बन गया है।

इस दस्तावेज़ में अधिकांश उपकरणों के विपरीत, SWE-agent **GPU की आवश्यकता नहीं है** — यह कोड के बारे में तर्क करने और फिक्स उत्पन्न करने के लिए बाहरी LLM API (Claude, GPT-4, Gemini, या स्व-होस्टेड मॉडल) को कॉल करता है। जो चीज़ इसकी *जरूरत है* वह एक विश्वसनीय Docker वातावरण है सुरक्षित, सैंडबॉक्स्ड कोड निष्पादन के लिए। Clore.ai के CPU सर्वर (या Docker के साथ कोई भी किराए पर ली गई इंस्टेंस) इसके लिए उपयुक्त हैं।

**मुख्य विशेषताएँ:**

* 🐛 एक कमांड से ऑटोमेटेड GitHub इश्यू समाधान
* 🔒 Docker कंटेनरों के अंदर सैंडबॉक्स्ड निष्पादन — किसी भी कोड को सुरक्षित रूप से चलाने योग्य
* 🤖 Claude, GPT-4, Gemini, OpenAI-अनुकूल और स्थानीय मॉडल का समर्थन
* 🌐 एजेंट प्रगति की निगरानी के लिए वेब UI
* 🛡️ CTF चुनौतियों और पैठ परीक्षण के लिए साइबर-सेक्युरिटी मोड
* 📊 SWE-bench अनुरूप — 300+ वास्तविक GitHub इश्यूज़ के खिलाफ परखा गया
* 🔧 YAML कॉन्फ़िग फाइलों के माध्यम से कॉन्फ़िगर करने योग्य एजेंट व्यवहार

***

## आवश्यकताएँ

### हार्डवेयर आवश्यकताएँ

SWE-agent को GPU की आवश्यकता नहीं है — यह तर्क करने के लिए API-आधारित LLMs का उपयोग करता है:

| टियर                   | CPU       | RAM   | स्टोरेज    | Clore.ai मूल्य |
| ---------------------- | --------- | ----- | ---------- | -------------- |
| **न्यूनतम**            | 4 कोर     | 8 GB  | 30 GB SSD  | \~$0.03/घं     |
| **अनुशंसित**           | 8 कोर     | 16 GB | 60 GB SSD  | \~$0.06/घं     |
| **भारी वर्कलोड्स**     | 16 कोर    | 32 GB | 100 GB SSD | \~$0.10/घं     |
| **स्थानीय LLM के साथ** | GPU सर्वर | 32 GB | 100 GB SSD | \~$0.20/घंटा   |

> 💡 **खर्च सुझाव:** Clore.ai पर SWE-agent चलाना असामान्य रूप से सस्ता है क्योंकि आपको GPU की आवश्यकता नहीं है। मुख्य लागत LLM API कॉल्स हैं (उदा., Claude Sonnet की लागत लगभग $0.003/1K टोकन)। एक सामान्य इश्यू फिक्स की API फीस लगभग $0.50–$2.00 होती है।

### सॉफ्टवेयर और API आवश्यकताएँ

| आवश्यकता            | विवरण                                       |
| ------------------- | ------------------------------------------- |
| **Docker**          | सैंडबॉक्स्ड कोड निष्पादन के लिए आवश्यक      |
| **LLM API की चाबी** | Anthropic, OpenAI, Google, या स्व-होस्टेड   |
| **GitHub टोकन**     | प्राइवेट रेपो तक पहुँचने और PR बनाने के लिए |
| **Python 3.11+**    | के लिए `pip install sweagent` विधि          |

### LLM API मूल्य निर्धारण संदर्भ

| मॉडल            | इनपुट        | आउटपुट       | सामान्य रन लागत                  |
| --------------- | ------------ | ------------ | -------------------------------- |
| Claude Sonnet 4 | $3/M टोकन    | $15/M टोकन   | \~$1.00–$2.00                    |
| GPT-4o          | $5/M टोकन    | $15/M टोकन   | \~$1.00–$3.00                    |
| GPT-4o mini     | $0.15/M टोकन | $0.60/M टोकन | \~$0.05–$0.20                    |
| Ollama (लोकल)   | मुफ्त        | मुफ्त        | केवल Clore.ai की प्रति-घंटा लागत |

***

## त्वरित प्रारम्भ

### स्टेप 1 — Clore.ai पर सर्वर किराए पर लें

1. में लॉग इन करें [clore.ai](https://clore.ai)
2. फ़िल्टर: **Docker सक्षम** — GPU वैकल्पिक है (CPU सर्वर पर्याप्त है)
3. सिफ़ारिश की गई इमेज: `ubuntu:22.04` या कोई भी Docker-सक्षम इमेज
4. खुले पोर्ट्स: **22** (SSH), **7860** (SWE-agent वेब UI)
5. Docker-in-Docker चलाने के लिए न्यूनतम 16 GB RAM की सिफ़ारिश

### स्टेप 2 — SSH के माध्यम से कनेक्ट करें

```bash
ssh -p <CLORE_SSH_PORT> root@<CLORE_SERVER_IP>

# सत्यापित करें कि Docker उपलब्ध है
docker --version
docker run --rm hello-world
```

### स्टेप 3 — SWE-agent Docker इमेज पुल करें

```bash
# आधिकारिक SWE-agent इमेज पुल करें (प्री-बिल्ट, सिफारिश की जाती है)
docker pull sweagent/swe-agent:latest

# सत्यापित करें
docker images | grep sweagent
```

वैकल्पिक रूप से, नवीनतम डेवलपमेंट संस्करण के लिए स्रोत से बिल्ड करें:

```bash
git clone https://github.com/SWE-agent/SWE-agent.git
cd SWE-agent
docker build -t sweagent/swe-agent:local .
```

### स्टेप 4 — API कीज़ सेट करें

```bash
# SWE-agent कॉन्फ़िगरेशन के लिए एक डायरेक्टरी बनाएं
mkdir -p /workspace/sweagent && cd /workspace/sweagent

# अपनी API कीज़ वाले एनवायरनमेंट फ़ाइल बनाएं
cat > /workspace/sweagent/.env << 'EOF'
# LLM API कीज़ (केवल जो आपके पास हैं जोड़ें)
ANTHROPIC_API_KEY=sk-ant-...
OPENAI_API_KEY=sk-...
GOOGLE_API_KEY=...

# रेपो तक पहुँचने और PR बनाने के लिए GitHub टोकन
GITHUB_TOKEN=ghp_...

# वैकल्पिक: स्व-होस्टेड LLM एंडपॉइंट
# OPENAI_BASE_URL=http://your-ollama-server:11434/v1
EOF

chmod 600 /workspace/sweagent/.env
```

### स्टेप 5 — अपना पहला GitHub इश्यू फ़िक्स करें

```bash
# बुनियादी उपयोग — Claude Sonnet से एक GitHub इश्यू ठीक करें
docker run --rm \
  --env-file /workspace/sweagent/.env \
  -v /workspace/sweagent/output:/output \
  -v /var/run/docker.sock:/var/run/docker.sock \
  sweagent/swe-agent:latest \
  python run.py \
    --agent.model.name=claude-sonnet-4-20250514 \
    --agent.model.per_instance_cost_limit=2.00 \
    --env.repo.github_url=https://github.com/USER/REPO \
    --problem_statement.github_url=https://github.com/USER/REPO/issues/1 \
    --actions.apply_patch_locally=true \
    --output_dir=/output
```

### स्टेप 6 — आउटपुट की समीक्षा करें

```bash
# SWE-agent परिणाम आउटपुट डायरेक्टरी में लिखता है
ls -la /workspace/sweagent/output/

# जनरेट किया गया पैच देखें
cat /workspace/sweagent/output/*.patch

# पूर्ण एजेंट मार्ग (एजेंट ने क्या किया) देखें
cat /workspace/sweagent/output/*.traj | python3 -m json.tool | less
```

***

## कॉन्फ़िगरेशन

### बेसिक कॉन्फ़िगरेशन फ़ाइल

लंबे कमांड-लाइन फ्लैग्स के बजाय, एक YAML कॉन्फ़िग का उपयोग करें:

```bash
cat > /workspace/sweagent/config.yaml << 'EOF'
# SWE-agent कॉन्फ़िगरेशन
agent:
  model:
    name: claude-sonnet-4-20250514
    per_instance_cost_limit: 2.00
    total_cost_limit: 10.00
    temperature: 0.0
  config:
    # एजेंट के लिए सिस्टम प्रॉम्प्ट
    system_template: "default"
    # API त्रुटियों पर कितनी बार रीट्राई करनी है
    retry_with_output_if_run_fails: true

env:
  repo:
    # प्रति-रन सेट किया जाएगा
    github_url: ""
  deployment:
    docker_args:
      - "--memory=4g"
      - "--cpus=2"

problem_statement:
  github_url: ""

actions:
  apply_patch_locally: true
  open_pr: false  # ऑटो-PR बनाने के लिए true सेट करें

output_dir: /output
EOF
```

```bash
# कॉन्फ़िग फ़ाइल के साथ चलाएँ
docker run --rm \
  --env-file /workspace/sweagent/.env \
  -v /workspace/sweagent/output:/output \
  -v /workspace/sweagent/config.yaml:/config.yaml \
  -v /var/run/docker.sock:/var/run/docker.sock \
  sweagent/swe-agent:latest \
  python run.py \
    --config /config.yaml \
    --env.repo.github_url=https://github.com/USER/REPO \
    --problem_statement.github_url=https://github.com/USER/REPO/issues/42
```

### वेब UI मोड

SWE-agent में इंटरैक्टिव उपयोग के लिए Gradio-आधारित वेब इंटरफ़ेस शामिल है:

```bash
# वेब UI शुरू करें
docker run -d \
  --name sweagent-ui \
  --env-file /workspace/sweagent/.env \
  -p 7860:7860 \
  -v /workspace/sweagent/output:/output \
  -v /var/run/docker.sock:/var/run/docker.sock \
  sweagent/swe-agent:latest \
  python app.py --port 7860 --host 0.0.0.0

# UI तक पहुँचें
echo "Open: http://<CLORE_SERVER_IP>:<MAPPED_PORT>"
docker logs -f sweagent-ui
```

### विभिन्न LLM प्रदाताओं का उपयोग करना

```bash
# GPT-4o (OpenAI)
docker run --rm \
  --env-file /workspace/sweagent/.env \
  -v /var/run/docker.sock:/var/run/docker.sock \
  -v /workspace/sweagent/output:/output \
  sweagent/swe-agent:latest \
  python run.py \
    --agent.model.name=gpt-4o-2024-11-20 \
    --agent.model.per_instance_cost_limit=3.00 \
    --env.repo.github_url=https://github.com/USER/REPO \
    --problem_statement.github_url=https://github.com/USER/REPO/issues/1

# GPT-4o Mini (बजट विकल्प)
docker run --rm \
  --env-file /workspace/sweagent/.env \
  -v /var/run/docker.sock:/var/run/docker.sock \
  -v /workspace/sweagent/output:/output \
  sweagent/swe-agent:latest \
  python run.py \
    --agent.model.name=gpt-4o-mini-2024-07-18 \
    --agent.model.per_instance_cost_limit=0.50 \
    --env.repo.github_url=https://github.com/USER/REPO \
    --problem_statement.github_url=https://github.com/USER/REPO/issues/1

# लोकल Ollama (Ollama गाइड के साथ जोड़कर)
# पहले Ollama को GPU सर्वर पर डिप्लॉय करें (देखें ../language-models/ollama.md)
# फिर इसे SWE-agent के बैकएंड के रूप में उपयोग करें:
docker run --rm \
  -e OPENAI_API_KEY=dummy \
  -e OPENAI_BASE_URL=http://<OLLAMA_HOST>:11434/v1 \
  -v /var/run/docker.sock:/var/run/docker.sock \
  -v /workspace/sweagent/output:/output \
  sweagent/swe-agent:latest \
  python run.py \
    --agent.model.name=qwen2.5-coder:32b \
    --agent.model.per_instance_cost_limit=0.00 \
    --env.repo.github_url=https://github.com/USER/REPO \
    --problem_statement.github_url=https://github.com/USER/REPO/issues/1
```

### बैक-टू-बैक कई इश्यूज़ प्रॉसेस करना

```bash
# SWE-bench फ़ॉर्मेट का उपयोग करके कई इश्यूज़ प्रोसेस करें
cat > /workspace/sweagent/batch_issues.json << 'EOF'
[
  {
    "repo": "USER/REPO",
    "issue_number": 1,
    "model": "claude-sonnet-4-20250514"
  },
  {
    "repo": "USER/REPO",
    "issue_number": 2,
    "model": "claude-sonnet-4-20250514"
  }
]
EOF

# बैच रन स्क्रिप्ट
cat > /workspace/sweagent/run_batch.sh << 'BASH'
#!/bin/bash
set -e

ISSUES_FILE="${1:-/workspace/sweagent/batch_issues.json}"
OUTPUT_DIR="/workspace/sweagent/output"
ENV_FILE="/workspace/sweagent/.env"

echo "बैच SWE-agent रन शुरू हो रहा है..."
python3 -c "
import json
issues = json.load(open('$ISSUES_FILE'))
for i, issue in enumerate(issues):
    print(f'Issue {i+1}/{len(issues)}: {issue[\"repo\"]}#{issue[\"issue_number\"]}')
" 

jq -c '.[]' "$ISSUES_FILE" | while read issue; do
    REPO=$(echo "$issue" | jq -r '.repo')
    ISSUE_NUM=$(echo "$issue" | jq -r '.issue_number')
    MODEL=$(echo "$issue" | jq -r '.model')

    echo "=== प्रोसेसिंग: $REPO#$ISSUE_NUM with $MODEL ==="
    
    docker run --rm \
      --env-file "$ENV_FILE" \
      -v "$OUTPUT_DIR:/output" \
      -v /var/run/docker.sock:/var/run/docker.sock \
      sweagent/swe-agent:latest \
      python run.py \
        --agent.model.name="$MODEL" \
        --agent.model.per_instance_cost_limit=2.00 \
        --env.repo.github_url="https://github.com/$REPO" \
        --problem_statement.github_url="https://github.com/$REPO/issues/$ISSUE_NUM" \
        --output_dir=/output || echo "FAILED: $REPO#$ISSUE_NUM"
done

echo "बैच पूर्ण। परिणाम $OUTPUT_DIR में"
BASH

chmod +x /workspace/sweagent/run_batch.sh
/workspace/sweagent/run_batch.sh
```

***

## Docker-in-Docker सेटअप

SWE-agent सुरक्षा के लिए नेस्टेड Docker कंटेनरों में कोड चलाता है। इसके लिए Docker सॉकेट एक्सेस की आवश्यकता है:

```bash
# सत्यापित करें कि Docker सॉकेट सुलभ है
ls -la /var/run/docker.sock

# परीक्षण करें कि Docker-in-Docker काम करता है
docker run --rm \
  -v /var/run/docker.sock:/var/run/docker.sock \
  docker:latest docker run --rm hello-world

# SWE-agent अपने सैंडबॉक्स इमेज को स्वचालित रूप से पुल करेगा
# डिफ़ॉल्ट सैंडबॉक्स: sweagent/swe-agent:latest (या कोई विशेष env इमेज)
```

### सुरक्षा विचार

```bash
# SWE-agent सैंडबॉक्स संसाधन सीमाएँ (अपने YAML में कॉन्फ़िग करें)
cat >> /workspace/sweagent/config.yaml << 'EOF'
env:
  deployment:
    docker_args:
      - "--memory=4g"          # सैंडबॉक्स RAM सीमित करें
      - "--cpus=2"             # सैंडबॉक्स CPU सीमित करें
      - "--network=bridge"     # पृथक नेटवर्क
      - "--read-only"          # केवल-रीड फाइल सिस्टम (छूट के साथ)
      - "--tmpfs=/tmp:size=1g" # केवल /tmp लिखने योग्य
EOF

# कभी भी SWE-agent को सीधे अपने होस्ट पर न चलाएँ — हमेशा Docker का उपयोग करें
# सैंडबॉक्स कंटेनर संभावित हानिकारक कोड को अलग करता है
```

### प्री-बिल्ट वातावरण इमेज का उपयोग करना

```bash
# SWE-agent प्रत्येक रेपो के लिए कस्टम वातावरण इमेज का समर्थन करता है
# यह निर्भरताएँ पहले से इंस्टॉल करके रन तेज़ कर देता है
cat > /workspace/sweagent/env-config.yaml << 'EOF'
env:
  deployment:
    image: sweagent/swe-agent:latest
    pre_install:
      - "pip install -e ."
      - "pip install pytest"
    post_clone:
      - "git config --global user.email 'agent@sweagent.ai'"
      - "git config --global user.name 'SWE-agent'"
EOF
```

***

## टिप्स और सर्वोत्तम प्रथाएँ

### 🎯 प्रभावी समस्या विवरण लिखना

SWE-agent के फिक्स की गुणवत्ता काफी हद तक इश्यू विवरण पर निर्भर करती है:

````bash
# विधि 1: GitHub इश्यू URL का उपयोग करें (सिफारिश)
--problem_statement.github_url=https://github.com/USER/REPO/issues/42

# विधि 2: विस्तृत विवरण वाली एक टेक्स्ट फ़ाइल प्रदान करें
cat > /workspace/sweagent/issue.txt << 'EOF'
## बग विवरण
`billing/calculator.py` की फ़ंक्शन `calculate_total()` 0 लौटाती है 
जब छूट बिल्कुल 100% हो। 

## पुनरुत्पादन के कदम
```python
total = calculate_total(price=100, discount=100)
assert total == 0  # यह विफल होता है, इसके बजाय 100 लौटाता है
````

## अपेक्षित व्यवहार

छूट 100% होने पर 0 लौटाना चाहिए।

## संबंधित कोड

देखें `billing/calculator.py` लाइन 45-67। EOF

docker run --rm\
\--env-file /workspace/sweagent/.env\
-v /workspace/sweagent/output:/output\
-v /workspace/sweagent/issue.txt:/issue.txt\
-v /var/run/docker.sock:/var/run/docker.sock\
sweagent/swe-agent:latest\
python run.py\
\--agent.model.name=claude-sonnet-4-20250514\
\--env.repo.github\_url=<https://github.com/USER/REPO\\>
\--problem\_statement.text\_file=/issue.txt

````

### 💰 लागत नियंत्रिण

```bash
# हमेशा प्रति-इंस्टेंस लागत सीमाएँ सेट करें
--agent.model.per_instance_cost_limit=2.00  # प्रति इश्यू अधिकतम $2

# प्रारंभिक ट्रायज के लिए GPT-4o mini का उपयोग करें, जटिल फिक्स के लिए Claude
# बजट रणनीति: स्कैन करने के लिए लगभग $0.10, फिक्स करने के लिए लगभग $1.50

# वास्तविक-समय में लागतों की निगरानी करें
docker logs -f sweagent-ui | grep -E "(cost|tokens|spent)"

# सभी रन पर कुल बजट सेट करें
--agent.model.total_cost_limit=20.00  # $20 के बाद सभी रन रोकें
````

### 🔄 ऑटो-PR निर्माण

```bash
# फिक्स के साथ स्वचालित रूप से एक पुल अनुरोध बनाएं
docker run --rm \
  --env-file /workspace/sweagent/.env \
  -v /var/run/docker.sock:/var/run/docker.sock \
  -v /workspace/sweagent/output:/output \
  sweagent/swe-agent:latest \
  python run.py \
    --agent.model.name=claude-sonnet-4-20250514 \
    --agent.model.per_instance_cost_limit=2.00 \
    --env.repo.github_url=https://github.com/USER/REPO \
    --problem_statement.github_url=https://github.com/USER/REPO/issues/42 \
    --actions.open_pr=true \
    --actions.push_gh_repo_url=https://github.com/USER/REPO
```

### 📊 SWE-bench मूल्यांकन

```bash
# आधिकारिक SWE-bench बेंचमार्क के खिलाफ SWE-agent चलाएँ
docker run --rm \
  --env-file /workspace/sweagent/.env \
  -v /var/run/docker.sock:/var/run/docker.sock \
  -v /workspace/sweagent/output:/output \
  sweagent/swe-agent:latest \
  python run_batch.py \
    --agent.model.name=claude-sonnet-4-20250514 \
    --env.repo.github_url=https://github.com/USER/REPO \
    --instances.type=swe_bench \
    --instances.subset=lite \
    --instances.split=test \
    --output_dir=/output \
    --num_workers=4
```

### 🛡️ साइबर-सेक्युरिटी मोड

```bash
# SWE-agent CTF और साइबर-सेक्युरिटी चुनौतियों का समर्थन करता है
docker run --rm \
  --env-file /workspace/sweagent/.env \
  -v /var/run/docker.sock:/var/run/docker.sock \
  -v /workspace/sweagent/output:/output \
  sweagent/swe-agent:latest \
  python run.py \
    --agent.model.name=claude-sonnet-4-20250514 \
    --agent.config=config/default_from_url_ctf.yaml \
    --env.deployment.image=sweagent/ctf-env:latest \
    --problem_statement.text="चल रहे वेब सर्विस में झंडा खोजें: http://challenge.local:8080" \
    --output_dir=/output
```

***

## समस्याओं का निवारण

### Docker सॉकेट अनुमति अस्वीकृत

```bash
# त्रुटि: Docker डेमॉन से कनेक्ट करते समय अनुमति अस्वीकृत
# समाधान: सुनिश्चित करें कि Docker सॉकेट को सही ढंग से माउंट किया गया है

docker run --rm \
  -v /var/run/docker.sock:/var/run/docker.sock \
  sweagent/swe-agent:latest \
  docker ps

# यदि आपको अनुमति त्रुटियाँ दिखती हैं, तो सॉकेट अनुमतियाँ जांचें
ls -la /var/run/docker.sock
# होना चाहिए: srw-rw---- root docker

# वर्तमान उपयोगकर्ता को docker समूह में जोड़ें (यदि root नहीं है)
usermod -aG docker $USER
newgrp docker
```

### API की चाबी त्रुटियाँ

```bash
# सत्यापित करें कि आपकी API की सही सेट है
docker run --rm \
  --env-file /workspace/sweagent/.env \
  sweagent/swe-agent:latest \
  python -c "
import os
keys = ['ANTHROPIC_API_KEY', 'OPENAI_API_KEY', 'GITHUB_TOKEN']
for k in keys:
    val = os.environ.get(k, 'NOT SET')
    masked = val[:8] + '...' if len(val) > 8 else val
    print(f'{k}: {masked}')
"

# Anthropic API की चाबी का परीक्षण करें
curl https://api.anthropic.com/v1/models \
  -H "x-api-key: $ANTHROPIC_API_KEY" \
  -H "anthropic-version: 2023-06-01"
```

### एजेंट लूप में अटक गया

```bash
# SWE-agent में एक बिल्ट-इन स्टेप सीमा है (डिफ़ॉल्ट ~100 स्टेप्स)
# कॉन्फ़िग के माध्यम से बढ़ाएँ या घटाएँ:

docker run --rm \
  --env-file /workspace/sweagent/.env \
  -v /var/run/docker.sock:/var/run/docker.sock \
  sweagent/swe-agent:latest \
  python run.py \
    --agent.model.name=claude-sonnet-4-20250514 \
    --agent.model.per_instance_cost_limit=2.00 \
    --agent.max_requeries=5 \
    --env.repo.github_url=https://github.com/USER/REPO \
    --problem_statement.github_url=https://github.com/USER/REPO/issues/1

# अटके हुए रन को मारें
docker ps | grep sweagent
docker stop <container_id>
```

### कोड निष्पादन के दौरान मेमोरी समाप्त

```bash
# सैंडबॉक्स मेमोरी सीमा बढ़ाएँ
docker run --rm \
  --env-file /workspace/sweagent/.env \
  -v /var/run/docker.sock:/var/run/docker.sock \
  -v /workspace/sweagent/output:/output \
  sweagent/swe-agent:latest \
  python run.py \
    --agent.model.name=claude-sonnet-4-20250514 \
    --env.deployment.docker_args='["--memory=8g", "--cpus=4"]' \
    --env.repo.github_url=https://github.com/USER/REPO \
    --problem_statement.github_url=https://github.com/USER/REPO/issues/1

# बड़े कोडबेस के लिए, Clore.ai इंस्टेंस को 32GB RAM तक बढ़ाएँ
```

### GitHub दर सीमाएँ

```bash
# GitHub API की दर सीमाएँ हैं — repo स्कोप के साथ व्यक्तिगत एक्सेस टोकन का उपयोग करें
# अपनी वर्तमान दर सीमा स्थिति जांचें
curl -H "Authorization: token $GITHUB_TOKEN" \
  https://api.github.com/rate_limit | jq '.rate'

# यदि दर सीमित है, तो रिसेट का इंतज़ार करें या अलग टोकन उपयोग करें
# दर सीमा हर घंटे रिसेट होती है
```

***

## अधिक पढ़ने के लिए

* [SWE-agent GitHub](https://github.com/SWE-agent/SWE-agent) — मुख्य रिपोजिटरी और डॉक्स
* [SWE-agent दस्तावेज़](https://swe-agent.com/docs/) — आधिकारिक दस्तावेज़
* [SWE-agent पेपर (NeurIPS 2024)](https://arxiv.org/abs/2405.15793) — शोध पत्र
* [SWE-bench लीडरबोर्ड](https://www.swebench.com/) — देखें कि विभिन्न मॉडल कैसे प्रदर्शन करते हैं
* [Clore.ai शुरू करना](/guides/guides_v2-hi/getting-started/getting-started.md) — प्लेटफ़ॉर्म बुनियादी बातें
* [GPU तुलना मार्गदर्शिका](/guides/guides_v2-hi/getting-started/gpu-comparison.md) — यदि आपको स्थानीय LLMs के लिए GPU की आवश्यकता है
* [Clore.ai पर Ollama चलाना](/guides/guides_v2-hi/language-models/ollama.md) — SWE-agent के लिए लोकल LLM बैकएंड
* [Clore.ai पर vLLM चलाना](/guides/guides_v2-hi/language-models/vllm.md) — उच्च-थ्रूपुट लोकल LLM सर्वर
* [Anthropic API मूल्य निर्धारण](https://www.anthropic.com/pricing) — Claude API लागतें
* [OpenAI API मूल्य निर्धारण](https://openai.com/api/pricing/) — GPT-4 API लागतें

> 💡 **Clore.ai + SWE-agent का मीठा स्थान:** एक CPU-ओनली सर्वर किराए पर लें (4 कोर, 16GB RAM) लगभग $0.05/घं पर, SWE-agent को Claude Sonnet 4 के साथ चलाएँ, और GitHub इश्यूज़ को लगभग **प्रति इश्यू कुल $1–2** (API लागतें) प्लस Clore.ai समय के कुछ सेंट। बड़ी संख्या में इश्यूज़ वाली टीमों के लिए, यह नियमित बग फिक्स करने के लिए डेवलपर hiring की तुलना में कई गुना सस्ता साबित होता है।


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://docs.clore.ai/guides/guides_v2-hi/ai-platforms-and-agents/swe-agent.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
