본문으로 건너뛰기
Skillpedia
에이전트7.8k · #12978

route-failed-searches-to-shell-agent

하는 일

이 스킬은 계속 실패하는 웹 검색을 셸 에이전트에게 넘기라고 AI 에이전트에게 말합니다. 셸 에이전트는 다른 방법을 시도할 수 있습니다. 검색 도구가 믿을 수 없을 때 웹 정보가 필요한 사람에게 맞습니다.

사용하는 경우

  • ✓여러 검색어에서 검색 도구가 알 수 없는 오류나 빈 결과를 반환할 때.
  • ✓재시도 반복으로 처리할 수 있는 여러 단계의 데이터 수집이 필요한 작업일 때.
  • ✓API나 스크립트처럼 데이터를 얻는 방법을 에이전트가 직접 고르게 하고 싶은 경우.

스킬 링크

https://github.com/HKUDS/AgentPilot/blob/main/openspace/benchmarks/gdpval/skills/route-failed-searches-to-shell-agent/SKILL.md

복사해서 AI(Claude, ChatGPT, Cursor)에 붙여넣고 지침을 따르도록 요청하세요.

사용 방법

가장 쉬운 방법입니다. 메시지를 복사해 AI에 붙여넣으세요. AI가 스킬을 읽고 지침을 따릅니다.

바로 붙여넣을 수 있는 메시지

Use this skill to help me: https://github.com/HKUDS/AgentPilot/blob/main/openspace/benchmarks/gdpval/skills/route-failed-searches-to-shell-agent/SKILL.md Read the SKILL.md file at that link and follow its instructions for my task.
AI가 이런 스킬을 알아서 찾아 쓰길 원하시나요?무료 Skillpedia MCP를 설치하세요. 한 줄이면 작업마다 스킬 15,000+개 중에서 검색합니다.1분 만에 설치 →

AI에게 요청하는 예시

“우리 지역의 현재 에너지 가격을 찾아 주세요. 검색 도구가 계속 실패하니 셸 에이전트가 다른 방법으로 찾게 해 주세요.”

매주 새 스킬 5개. 읽는 데 1분.

작동 방식

검색 도구를 계속 다시 쓰는 대신, 에이전트는 셸 에이전트에게 명확한 목표를 줍니다. 셸 에이전트는 재시도하거나 작은 스크립트를 쓰거나 다른 도구를 써서 데이터를 모읍니다.

기술 내용 (원본 SKILL.md)

작성자의 영어 원문을 GitHub에서 그대로 가져왔습니다.

Route Failed Web Searches to Shell Agent

When to Use This Skill

Use this workflow when:

  • Direct search_web tool calls consistently fail with 'unknown error' or similar failures
  • You need to gather web-based information but the standard search tool is unreliable
  • The task requires multi-step data collection that benefits from autonomous retry logic
  • You need resilient data gathering that can adapt when initial approaches fail

Core Pattern

Instead of repeatedly calling search_web when it fails, delegate the entire search task to shell_agent. The shell_agent's internal capabilities provide:

  • Automatic retry logic with error detection and recovery
  • Multi-step approach - can try different methods (APIs, scraping, alternative sources)
  • Code-based solutions - can write Python scripts, use curl, or other tools
  • Autonomous adaptation - figures out the best approach without manual intervention

Step-by-Step Instructions

Step 1: Detect Search Tool Failure

When search_web returns errors like:

  • "unknown error"
  • Empty or incomplete results
  • Consistent failures across multiple queries

Recognize this as a signal to switch strategies rather than retrying the same failing tool.

Step 2: Delegate to Shell Agent

Create a task for shell_agent with clear objectives:

shell_agent(
    task="Gather current energy market data including oil prices, gas prices, and bond market information. Search multiple sources and compile findings into a structured summary.",
    timeout=300
)

Key task formulation principles:

  • Specify the what (data needed) not the how (specific tools to use)
  • Include success criteria and output format expectations
  • Allow sufficient timeout for multi-step execution (300+ seconds)
  • Let shell_agent decide whether to use Python, curl, or other approaches

Step 3: Verify Results

Check shell_agent output for:

  • Complete data collection (not partial results)
  • Multiple sources cited (indicates thorough searching)
  • Structured, usable output format
  • Evidence of error handling (mentions of retry attempts, alternative approaches tried)

Step 4: Extract and Use Data

Process the shell_agent results for your downstream task:

  • Parse collected data into required format
  • Cross-reference with any partial results from failed search_web calls
  • Document sources for verification if needed

Code Example

Scenario: Gathering market data for a financial report when search_web fails.

# Failed approach - don't keep retrying this:
try:
    results = search_web(query="current oil gas bond market prices 2025")
    # This fails with unknown error
except:
    pass  # Don't just catch and retry the same failing tool

# Correct approach - delegate to shell_agent:
from tools import shell_agent

market_data = shell_agent(
    task="""
    Gather comprehensive energy market data for a trading strategy report.
    Required information:
    1. Current crude oil prices (WTI, Brent)
    2. Natural gas prices
    3. Relevant bond issuer analysis and yields
    4. Recent market trends and forecasts
    
    Use multiple sources, handle any errors by trying alternative approaches,
    and provide structured output with source citations.
    """,
    timeout=300
)

# Now use market_data for your report

Why This Works

Aspect search_web (failing) shell_agent (working)
Retry logic None or limited Built-in multi-round retry
Error handling Returns error Attempts to fix and continue
Approach flexibility Single method Can use Python, bash, APIs, scraping
Adaptation Fails completely Tries alternative strategies
Output reliability Inconsistent Structured, verified results

Best Practices

  1. Don't chain failed tools: Once search_web fails twice, switch to shell_agent immediately rather than accumulating more failures.

  2. Set appropriate timeouts: Shell_agent needs time to iterate (200-300 seconds typical for complex searches).

  3. Be specific about data needs: Shell_agent performs better with clear requirements than broad queries.

  4. Trust the autonomy: Don't micromanage which tools shell_agent should use - let it decide the best approach.

  5. Validate outputs: Always verify shell_agent results meet your needs before proceeding to downstream tasks.

Troubleshooting

Shell_agent also fails?

  • Increase timeout (
자주 묻는 질문

셸 에이전트는 무엇을 다르게 하나요?

API, 스크립트, 다른 출처처럼 다양한 방법을 시도하고 스스로 재시도할 수 있습니다.

검색이 실패했다는 것은 어떻게 아나요?

알 수 없는 오류, 시간 초과, 빈 결과나 불완전한 결과가 실패 신호라고 스킬이 말합니다.

결과는 확인하나요?

스킬은 확인 단계를 설명하지 않으므로, 데이터를 믿기 전에 검토해야 합니다.

상세 정보

작성자의 원본 설명

Delegate web search tasks to shell_agent when direct search_web tool fails, using its retry mechanism and multi-step capabilities for resilient data gathering

repo: HKUDS/AgentPilot

인기도

GitHub 스타
7.8k
순위
#12978
라이선스
MIT
업데이트
2026. 11. 1.

이 스킬이 유용한가요?

0

로그인 투표하려면 로그인하세요.

댓글

  • …

이 저장소의 다른 스킬

비슷한 스킬