다음을 통해 공유


에이전트에 여러 도구 추가

중요

이 게시물의 일부 정보는 상용으로 출시되기 전에 실질적으로 수정될 수 있는 사전 릴리스된 제품과 관련이 있습니다. Microsoft는 여기에서 제공하는 정보와 관련하여 명시적이거나 묵시적인 어떠한 보증도 제공하지 않습니다.

이 예제에서는 전역 Microsoft 도구, GPT, API 및 KQL 도구(기술)를 사용하는 샘플 YAML을 통해 에이전트를 만드는 방법을 안내합니다.

전체 프로세스는 다음과 같습니다.

  • 1단계: 에이전트 YAML 만들기 및 업로드
  • 2단계: 원본 관리에서 에이전트 사용 또는 토글
  • 3단계: Security Copilot 에이전트 설정
  • 4단계: 에이전트 실행

도구(기술) 호출 분석

이 섹션에서는 에이전트 YAML 도구(기술)가 호출되는 방법과 포함해야 하는 플러그 인을 이해하는 데 도움이 됩니다.

DCA URL Geolocation 090925 Agent 보안 분석가가 지정된 URL의 호스팅 위치를 이해하는 데 도움이 되도록 설계되었습니다. GPT 및 KQL 형식에서 여러 도구(기술)를 사용하여 YAML 매니페스트에 정의된 구조적 호출 흐름을 따릅니다.

트리거 활성화

  • 에이전트는 기본 트리거를 통해 300초마다 트리거됩니다.

  • 먼저 FetchSkill을 Contoso.SecurityCopilot.Samples-0909d.RecentUrlClicks_DCA-090925호출합니다. KQL 기술(Format: KQL)은 최근에 클릭한 URL에 대해 Defender 로그를 쿼리합니다.

  • 그런 다음 ProcessSkill Contoso.SecurityCopilot.Samples-090925.URL_Location_DCA_Agent_Entrypoint-090925을 호출합니다. 에이전트 기술(Format:AGENT)은 URL의 호스팅 위치를 조사합니다.

에이전트를 실행하면 Fetch Skill이 호출됩니다. Contoso.SecurityCopilot.Samples-0909d.RecentUrlClicks_DCA-090925

에이전트 기술 진입점

에이전트 기술은 URL_Location_DC_Agent_Entrypoint-090925FORMAT:AGENT 정의되어 있으며 다음 단계를 수행합니다.

  • 입력: 단일 입력 URL(조사할 URL)이 필요합니다.

  • 지침: 에이전트는 자식 기술을 호출하는 3단계 프로세스를 따릅니다.

    • ExtractHostname: GPT 도구를 ExtractHostname_DCA-090925 사용하여 URL에서 호스트 이름을 구문 분석합니다.

    • GetDnsResolutionsByIndicators: Microsoft Threat Intelligence 기술 세트를 사용하여 호스트 이름과 연결된 IP 주소를 검색합니다. RequiredSkillsets: ThreatIntelligence.DTI 도구를 호출하지 않고 GetDnsResolutionsByIndicators 추가해야 합니다.

    • lookupIpAddressGeolocation operationId: 각 IP 주소에 대한 지리적 위치 데이터를 조회하기 위해 API 플러그 인 DCA_SampleAPIPlugin 에서 참조되는 OpenAPI 사양의 입니다. 참조는 빌드 API 샘플을 참조하세요.

1단계: 에이전트 YAML 만들기 및 업로드

에이전트 YAML은 다음과 같이 정의됩니다.

Descriptor:
  Name: Contoso.SecurityCopilot.Samples-090925_1b
  Description: DCA URL Geolocation 090925 Agent_1b
  DisplayName: DCA URL Geolocation 090925 Agent_1b

SkillGroups:
- Format: AGENT
  Skills:
  - Name: URL_Location_DCA_Agent_Entrypoint-090925_1b
    Description: The entrypoint into the URL Location Agent
    Interfaces:
    - Agent
    Inputs:
    - Required: true
      Name: URL
      Description: A URL the agent should investigate
    Settings:
      Model: gpt-4.1
      Instructions: |
            <|im_start|>system
            You are an AI agent that helps a security analyst understand the hosting situation of a URL (the input).
            You'll do this by following a three-step process:
            1) Use ExtractHostname to find the hostname from the URL provided as input
            2) Use GetDnsResolutionsByIndicators to extract IP Addresses that the hostname has been observed resolving to. This may produce a list of IP Addresses.
            3) One-at-a time, use lookupIpAddressGeolocation to look up the geolocation of an IP address.

            Produce a simply formatted response telling the security analyst which locations that URL is being served from.  
            If you encounter an error share that.  
            Always return something the user knows that something happened.
            
            <|im_end|>
            <|im_start|>user
            {{URL}}
            <|im_end|>

    ChildSkills:
    - lookupIpAddressGeolocation
    - ExtractHostname_DCA-090925_1b
    - GetDnsResolutionsByIndicators
- Format: GPT
  Skills:
  - Name: ExtractHostname_DCA-090925_1b
    DisplayName: ExtractHostname_DCA-090925_1b
    Description: ExtractHostname_DCA-090925_1b
    Inputs:
    - Name: URL
      Description: A URL string
    Settings:
      ModelName: gpt-4.1
      Template: |-
        <|im_start|>system
        Return the hostname component of the URL provided as input.  For example:
        - If the input is 'https://www.mlb.com/', return 'www.mlb.com'
        - If the input is 'http://dev.mycompany.co.uk/sign-up/blah?a=12&b=12&c=32#23', return 'dev.mycompany.co.uk'
        - If the input is 'ftp:/x.espon.com', return 'x.espon.com'
        <|im_end|>
        <|im_start|>user
        {{URL}}
        <|im_end|>
- Format: KQL
  Skills:
    - Name: RecentUrlClicks_DCA-090925_1b
      Description: Returns recently clicked URLs
      Inputs:
        - Name: LookbackMinutes
          Description: Number of minutes to lookback
          Required: false
      Settings:
        Target: Defender
        Template: UrlClickEvents | sort by TimeGenerated desc | limit 10 | project Url

AgentDefinitions:
  - Name:  URLLocationAgent-090925_1b
    DisplayName: URLLocationAgent 090925_1b
    Description: An agent to help an analyst understand URL hosting 
    Publisher: Contoso
    Product: Security Copilot
    RequiredSkillsets:
      - SecurityCopilot
      - ThreatIntelligence.DTI
      - DCA_SampleAPIPlugin
    AgentSingleInstanceConstraint: None
    Settings:
      - Name: LookbackWindowMinutes
        Label: Max Lookback Window in minutes
        Description: The maximum number of minutes to find clicked URLs
        HintText: You should probably enter 5
        SettingType: String
        Required: true
    Triggers:
      - Name: Default
        DefaultPeriodSeconds: 300
        FetchSkill: Contoso.SecurityCopilot.Samples-090925_1b.RecentUrlClicks_DCA-090925_1b
        ProcessSkill: Contoso.SecurityCopilot.Samples-090925_1b.URL_Location_DCA_Agent_Entrypoint-090925_1b
        Settings:
  
Settings:
    HistoryPassDownMode: None
    IncludeSessionHistory: false
WorkspaceId: SecurityCopilot_Workspace 

2단계: 원본 관리에서 에이전트 사용 또는 토글

  1. 프롬프트 표시줄에서 원본 관리 사용자 지정에서 업로드된 YAML(플러그 인)이 설정되거나 토글되었는지 확인합니다>.

    원본 관리 사용자 지정 스크린샷

  2. Descriptor.DisplayName검색DCA URL Geolocation 090925 Agent합니다.

참고

일반적으로 에이전트를 설정하는 동안 일부 구성을 설정해야 하는 플러그 인이 있을 수 있습니다.

3단계: Security Copilot 에이전트 설정

  1. 홈 > 에이전트로 이동합니다.

  2. 에이전트 라이브러리에서 YAML의 에이전트 URLLocationAgent-090925AgentDefinitions.DisplayName 검색합니다. 검색에 에이전트가 표시되지 않으면 에이전트 라이브러리에서 화면을 새로 고칩니다.

    Security Copilot 활성 에이전트 보기 이미지

  3. 에이전트 카드 세부 정보 보기를 선택하여 에이전트를 설정합니다.

    Security Copilot 에이전트 설정 이미지

    플러그 인 섹션에서 사용하도록 설정된 플러그 인을 볼 수 있습니다.

  4. 에이전트를 설정하는 데 필요한 입력 매개 변수를 제공합니다.

    Security Copilot 에이전트 입력 매개 변수 화면 이미지

  5. 로그인을 선택하여 인증합니다.

    Security Copilot 에이전트 ID에 로그인하는 이미지

4단계: 에이전트 실행

  1. 마침을 선택하여 에이전트를 실행합니다. 에이전트 실행 화면이 표시됩니다.

    Security Copilot 에이전트 실행 이미지

  2. 트리거 없이 한 번 실행을 선택하여 에이전트를 실행합니다.

    에이전트 실행의 결과가 표시된 것처럼 표시됩니다.

    Security Copilot 에이전트 결과 이미지

  3. 활동 보기를 선택하여 각 에이전트 결과를 확인합니다.

    Security Copilot 에이전트 보기 작업의 이미지