Skip to main content

Native AI Agent API Testing Tools

PostQode includes a set of native tools built directly into the agent execution engine that allow AI agents to manage and execute API collections, test suites, and environment variables programmatically.


Overview of Native API Tools

When working with API Agent or Core Agent, the model can automatically invoke native API tools to perform CRUD operations on API collections and execute test runs.

Native ToolHandler ClassDescription
list_api_collectionsListApiCollectionsHandlerLists all existing API collections in the workspace.
create_api_requestCreateApiRequestHandlerCreates a new HTTP request (GET, POST, PUT, DELETE) within a collection.
update_api_requestUpdateApiRequestHandlerModifies headers, parameters, body, or authentication for an API request.
delete_api_requestDeleteApiRequestHandlerRemoves an API request from a collection.
execute_api_requestExecuteApiRequestHandlerExecutes an API request and retrieves status codes, headers, and response payload.
list_test_suitesListTestSuitesHandlerLists test suites and assertion suites in the project.
create_test_suiteCreateTestSuiteHandlerCreates a structured test suite containing multiple test cases.
create_test_caseCreateTestCaseHandlerAdds functional test cases with assertions to a test suite.
create_variablesCreateVariablesHandlerDefines environment or collection variables (e.g. baseUrl, authToken).
import_libraryImportLibraryHandlerImports OpenAPI/Swagger specs or Postman collections.

Example Workflow

Automated Collection Generation from Prompt

When you instruct PostQode:

"Import this OpenAPI spec and test all endpoint responses for valid 200 OK status codes."

  1. The AI agent invokes import_library to parse the API specification.
  2. It calls create_test_suite and create_test_case to build structured assertions for each endpoint.
  3. It executes requests using execute_api_request and records response payloads and response times.
  4. It reports any failed assertions or unexpected schema errors directly in the chat interface.