Skip to main content

Overview

Logic provides built-in HTTP tools that allow your documents to make external HTTP requests during execution. Your documents can fetch data from APIs, post to webhooks, and interact with any external service — all described in plain text within your document. HTTP tools support all standard HTTP methods: GET, POST, PUT, PATCH, DELETE, and OPTIONS.

How It Works

HTTP tools are designed to be used naturally within your document’s instructions. You don’t need to write code or specify technical tool names — just describe the HTTP request you want to make in plain language, and Logic’s agent will detect the appropriate method and construct the request. For example, you might write in your document:
Fetch the current weather data from https://api.weather.example.com/v1/current
with the city as a query parameter.
Or for sending data:
Send a POST request to https://hooks.example.com/notify with a JSON body
containing the analysis results.
The agent interprets these instructions, determines the correct HTTP method, and makes the request during execution.

Describing Requests in Your Document

When writing HTTP instructions in your document, you can specify:
  • The URL — the endpoint to call (required)
  • The HTTP method — GET, POST, PUT, PATCH, DELETE, or OPTIONS. The agent can often infer the method from context (e.g., “fetch” implies GET, “send data to” implies POST)
  • Headers — any custom headers like content type or authentication
  • A request body — for POST, PUT, and PATCH requests, describe the payload structure or provide exact values
Here are some patterns that work well: Fetching data:
Retrieve the user profile from https://api.example.com/users/123
Sending data with a specific structure:
POST the order to https://api.example.com/orders with a JSON body like:
{
  "customerName": "<from input>",
  "items": [{"product": "<string>", "quantity": <number>, "price": <number>}]
}
Including authentication:
Fetch account details from https://api.example.com/account with the header
Authorization: Bearer sk-example-a1b2c3d4e5f6
Using input values dynamically:
Send the analysis results to https://hooks.example.com/results.
Use the apiToken from the input as a Bearer token in the Authorization header.
The agent can also infer POST from natural phrasing like “send results to,” “submit data to,” “notify the endpoint,” or “push metrics to” — you don’t always need to specify the HTTP method explicitly.

Using Responses

The response of an HTTP request is available to the agent for use throughout the rest of the execution. You can provide instructions on how to use the results in plain text, just like any other part of your document. For example:
Fetch the list of open issues from https://api.github.com/repos/acme/app/issues.
Summarize the top 5 issues by priority and include them in the output.
The agent will make the request, read the response, and follow your instructions for how to process or present the data.

Examples

Fetching Data from an API

A document that retrieves weather information might include instructions like:
Check the current weather by making a GET request to
https://api.weather.example.com/v1/current?city=San+Francisco
with the header Accept: application/json.

Include the temperature and conditions in your summary.

Posting to a Webhook

A document that sends notifications after processing:
After generating the report, notify the team by sending a POST request to
https://hooks.example.com/services/T00/B00/xxxx with a JSON body:
{"text": "New report generated: Q1 Sales Summary"}

Calling an Authenticated API

A document that reads from a protected endpoint using a bearer token:
curl -X GET https://api.example.com/account/details \
    -H "Authorization: Bearer sk-example-a1b2c3d4e5f6" \
    -H "Accept: application/json"
You can describe the equivalent in your document as:
Fetch account details from https://api.example.com/account/details.
Include the header Authorization: Bearer sk-example-a1b2c3d4e5f6
and set Accept to application/json.

Submitting Form Data

A document that submits structured data based on user input:
Submit the user's registration to https://api.example.com/signup with a JSON body
containing the username, email, and subscribe fields from the input.
HTTP tools are not currently available under HIPAA-compliant configurations.