Skillpedia
الوكلاء7.8k · #13027

web-tool-fallback

ما الذي تفعله

توجّه هذه المهارة وكيل الذكاء الاصطناعي عبر خطوات احتياطية عندما تفشل أدوات قراءة الويب والبحث معًا. وهي مناسبة لمن ما زال يحتاج إلى معلومات من الويب لإكمال المهمة.

متى تستخدمها

  • ✓عندما تفشل أداة قراءة الصفحات وأداة البحث معًا بأخطاء غير معروفة.
  • ✓عندما تكون المعلومة ما زالت لازمة لإكمال المهمة.
  • ✓عندما قد يعمل عنوان الصفحة بصيغة مختلفة، كنسخة أرشيفية أو نسخة بديلة.

رابط المهارة

https://github.com/HKUDS/AgentPilot/blob/main/openspace/benchmarks/gdpval/skills/web-tool-fallback/SKILL.md

انسخه والصقه في الذكاء الاصطناعي الذي تستخدمه (Claude أو ChatGPT أو Cursor) واطلب منه اتباع التعليمات.

طريقة الاستخدام

أسهل طريقة: انسخ الرسالة والصقها في الذكاء الاصطناعي الذي تستخدمه. سيقرأ المهارة وينفّذ تعليماتها.

رسالة جاهزة للصق

استخدم هذه المهارة لمساعدتي: https://github.com/HKUDS/AgentPilot/blob/main/openspace/benchmarks/gdpval/skills/web-tool-fallback/SKILL.md اقرأ ملف SKILL.md في هذا الرابط ونفّذ تعليماته لمهمتي.
تريد أن يجد الذكاء الاصطناعي مهارات مثل هذه بنفسه؟ثبّت خادم Skillpedia MCP المجاني: سطر واحد، ويبحث في 15,000+ مهارة قبل كل مهمة.ثبّته في دقيقة واحدة →

مثال على ما تطلبه من الذكاء الاصطناعي

“تفشل أداة قراءة الصفحات والبحث معًا على هذا الموقع. جرّب صيغًا أخرى للعنوان، مثل نسخة أرشيف، وأخبرني بما تجده.”

5 مهارات جديدة كل أسبوع. قراءة في دقيقة واحدة.

كيف تعمل

يجرب الوكيل أولًا مصادر بديلة، مثل نسخ الأرشيف والنطاقات الأخرى والعناوين المبسطة دون أجزاء الاستعلام. وإن فشلت أيضًا، ينتقل إلى طريقة طرفية احتياطية للحصول على البيانات.

المحتوى التقني (ملف SKILL.md الأصلي)

النص الأصلي من المؤلف، مباشرة من GitHub.

Web Tool Fallback Strategy

When to Use This Skill

Apply this skill when all web-reading tools (read_webpage, search_web) fail simultaneously with unknown errors during a research or information-gathering task.

Recognition Criteria

Confirm this pattern before applying fallbacks:

  • Multiple web tool calls have failed (not just one isolated failure)
  • Errors are unknown/unexpected (not expected 404s or rate limits that can be handled normally)
  • The information is still needed to complete the task

Fallback Procedure

Critical: execute_code_sandbox may also fail during system-wide issues. Always be prepared to immediately fall back to run_shell if sandbox execution returns errors.

Step 1: Attempt Alternative Sources

Before abandoning web access, try these alternatives:

  1. Alternative URLs:

    • Archive.org / Wayback Machine versions
    • Alternative domains (e.g., .org instead of .com)
    • Different subdomains or paths
  2. Simplified Requests:

    • Try reading just the domain root
    • Remove query parameters from URLs
    • Try HTTP instead of HTTPS (or vice versa)
# Example: Generate alternative URL formats
original_url = "https://example.com/research/report?id=123"
alternatives = [
    "https://example.com/research/report",
    "http://example.com/research/report?id=123",
    "https://web.archive.org/web/*/https://example.com/research/report"
]

Step 2: Use execute_code_sandbox for Embedded Knowledge

Step 2: Use execute_code_sandbox for Embedded Knowledge (May Fail)

When web access is unavailable, generate content from reliable embedded knowledge. Note: execute_code_sandbox can fail during cascading system issues—if it returns errors, immediately proceed to Step 2b.

code = '''
# Generate structured information from embedded knowledge
evaluation_frameworks = {
    "Kirkpatrick Model": ["Reaction", "Learning", "Behavior", "Results"],
    "Bloom's Taxonomy": ["Remember", "Understand", "Apply", "Analyze", "Evaluate", "Create"],
    "SMART Criteria": ["Specific", "Measurable", "Achievable", "Relevant", "Time-bound"]
}

# Create comprehensive reference material
for framework, levels in evaluation_frameworks.items():
    print(f"## {framework}\\n")
    for i, level in enumerate(levels, 1):
        print(f"{i}. {level}")
    print()
'''

If execute_code_sandbox returns any error (unknown error, timeout, execution failure):

  • Do not retry execute_code_sandbox multiple times
  • Immediately proceed to Step 2b (run_shell fallback)
  • Document the sandbox failure in your Research Access Notes
- Established frameworks and methodologies
- Standard best practices
- Well-documented technical concepts
- Historical information that doesn't change frequently

### Step 2b: Fall Back to run_shell if execute_code_sandbox Fails
### Step 2b: Fall Back to run_shell if execute_code_sandbox Fails (REQUIRED)

**When to use**: execute_code_sandbox returns any error OR fails to produce output within reasonable time.

**Action**: Immediately switch to run_shell with direct Python execution. Do not continue attempting execute_code_sandbox.

1. **Use run_shell with direct Python execution** (simplest, most reliable):

1. **Use run_shell with direct Python execution**:
   ```bash
   python3 -c "print('content from embedded knowledge')"
  1. Use heredoc for multi-line scripts:

    python3 << 'EOF'
    # Your Python code here
    frameworks = {"Kirkpatrick": ["Reaction", "Learning", "Behavior", "Results"]}
    for name, levels in frameworks.items():
        print(f"## {name}")
        for level in levels:
            print(f"- {level}")
    EOF
    
  2. Capture output to file for further processing:

    python3 -c "print('structured content')" > output.txt
    

Why run_shell works when execute_code_sandbox fails:

  • Direct system Python execution bypasses sandbox restrictions
  • No additional abstraction layer that could fail
  • More reliable during cascading tool failures
  • Should be your go-to when sandbox is compromised

Step 3: Create Document with Placeholder Citations

For tasks requiring formal documentation:

  1. Draft the document using available knowledge
  2. Mark uncertain citations clearly:
    [WEB_ACCESS_LIMITED: URL https://example.com/source could not be accessed]
    
  3. Use placeholder format for references:
    [Reference needed: Topic - URL attempted but inaccessibl
    
الأسئلة الشائعة

ما العناوين البديلة التي تُجرَّب؟

تقترح المهارة نسخ الأرشيف والنطاقات البديلة والعناوين المبسطة دون أجزاء الاستعلام، والتبديل بين http وhttps.

ماذا لو فشلت بيئة التنفيذ المعزولة أيضًا؟

تقول المهارة إن على الوكيل الانتقال إلى أداة تشغيل الطرفية عندما تُرجع بيئة التنفيذ أخطاء.

هل يذكر الوكيل ما لم يستطع الحصول عليه؟

هدف المهارة إنهاء المهمة، لذا عليه أن يذكر أي بيانات تعذّر الحصول عليها.

التفاصيل

الوصف الأصلي من المؤلف

Implement fallback strategies when web-reading tools fail simultaneously

repo: HKUDS/AgentPilot

الشعبية

نجوم GitHub
7.8k
الترتيب
#13027
الترخيص
MIT
آخر تحديث
1‏/11‏/2026

هل هذه المهارة مفيدة؟

0

سجّل الدخول للتصويت.

التعليقات

  • …

المزيد من المهارات من هذا المستودع

مهارات مشابهة