This browser is no longer supported.
Upgrade to Microsoft Edge to take advantage of the latest features, security updates, and technical support.
Note
Access to this page requires authorization. You can trysigning in orchanging directories.
Access to this page requires authorization. You can trychanging directories.
Important
Some information in this article relates to a prereleased product which may be substantially modified before it's commercially released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Agent developers often need to make HTTP requests to build complete use cases.
This example demonstrates creating an Agent that leverages a plugin with an API tool to connect to a REST API service calledfreeipapi.com, which provides Geo-IP lookup functionality.
The overall process is as follows:
Step 1: Create and publish an OpenAPI specification that defines the API
Step 2: Create and upload the manifest file to Security Copilot
Step 3: Create and upload an agent that uses the plugin
Step 4: Publish package to Security Store (applicable only for partner agents)
Note
For a manifest YAML sample that uses the API tool (skill), seeBuild agent using multiple tools. It provides you with instructions on how to upload the agent, set up and run the agent published on the Active agents page.
The example integrates with the Free IP REST API to perform IP Address geolocation lookups. You must publish this specification online (a GitHub gist works well). Refer to the following sample to create and host your specification. For examples on authentication, seeAuth types.
openapi: 3.0.0info: title: Free IP API description: A free IP lookup API version: "v1"servers: - url: https://freeipapi.com/api/paths: /json/{ipaddress}: get: operationId: lookupIpAddressGeolocation summary: Lookup IP Address Geolocation information parameters: - in: path name: ipaddress schema: type: string required: true description: The ip address to lookup responses: "200": description: OK content: application/json: schema: $ref: "#/components/schemas/lookupIpAddressGeolocationResponse"components: schemas: lookupIpAddressGeolocationResponse: type: object properties: ipVersion: type: integer description: The IP address version ipAddress: type: string description: The IP address latitude: type: number description: The latutude longitude: type: number description: The longitude countryName: type: string description: The country zipCode: type: string description: The zip code cityName: type: string description: The city regionName: type: string description: The region continent: type: string description: The continentCreate a file calledhttp_manifest.yaml that is of the tool formatAPI.
Descriptor: Name: DCA_SampleAPIPlugin DisplayName: TESTDCA_Free IP API Description: Skills for looking up geolocation information for an IP address using the Free IP API SkillGroups: - Format: API Settings: OpenApiSpecUrl: <Reference to your openapispec.yaml schema created in Step 1> EndpointUrl: https://sampleurl <The server endpoint that is hosting the API>Upload the yaml to Security Copilot. The instructions for uploading the YAML are covered at,Build agent manifest.
Note
You need to complete the setup steps for the plugin to be available for use and appear in theCustom section. The uploaded YAML or manifest is published as an agent to Active agents only if the manifest YAML has an agent definition (AgentDefinitions) defined.
You can test this tool or plugin by navigating toSystem Capabilities in Prompts and search forlookupIpAddressGeolocation, which is theoperationId value from the API specification, which you defined inStep 1.
The response after executing the tool is displayed.
Now, upload the agent that uses the API plugin.
When you upload an agent, ensure you chooseAnyone in this workspace inAdd a plugin screen.
Upload the agent YAML to Security Copilot.
This step is applicable only to partners developing their agent that must be published to Security Store.
Important considerations for publishing an API manifest to the Security Store:
When publishing your package to Security Store, theopenapispec.yaml must be included in the package.
TheOpenApiSpecUrl must reference the local file path within the package.
TheEndpointUrl is the publicly hosted endpoint for the OpenAPI spec.
If theChildSkills are referenced in an Open API specification, ensure that the global URL for your OpenAPISpec and the local OpenAPISpec yaml are up-to-date.
Theopenapispec.yaml must be in the same folder as the Agent manifest yaml(http_manifest.yaml) and must follow the naming convention:openapispec_<number>.yaml.