REST APIs
Connect any HTTPS API to your AI agent: set up authentication, define endpoints, hide sensitive fields, test with scenarios and publish lookups.
Use a REST connection when the system you want is your own backend or any web service with an HTTPS API. The REST studio takes you from a connection to a published, trust-gated lookup the agent can use in chat.
Open Integrations → Add integration → APIs (or the APIs card). Existing sources appear under Custom APIs.

How do I connect my own API to my AI agent?
Open Integrations, then Add integration, then APIs, and create a REST connection with its authentication. Define endpoints, review what the agent learns, hide sensitive fields and test with scenarios. Publish the endpoint and attach it to your agent.
1. Create the connection
Choose New REST API and fill in:
| Field | Notes |
|---|---|
| API name | Up to 120 characters |
| Description | "What live data this API provides (optional but recommended)". Up to 2,000 characters. The agent reads it, so describe the data, not the technology |
| Base URL | The address all endpoints are relative to, for example https://api.example.com |
| Auth | None, API key, Basic (username and password) or Bearer token. For an API key you can set the header name |
Select Test connection. You should see Connection established (or Connection created and established right after creating). If the test fails you still get the connection, with the message "Connection created. Retest or continue to studio."
"Secrets are encrypted at rest for high security. Loopwix never shows stored values in plain text." To change a secret later, enter a new value; leave it blank to keep the current one.
2. The studio
The studio has a left menu: Connection, Request parameters, Environments, Endpoints and Scenarios.
Request parameters ("Connection-level auth, headers, and default query params"):
- Custom headers: only allow-listed names, for example
Accept,X-Tenant-ID,X-Loopwix-Custom-*. - Default query params: merged into every request unless a test or scenario overrides them.
Never put secrets in query parameters or sample headers. Use the auth fields.
Environments: "Runtime always uses the Default environment. At least one must remain." Add environments such as staging and production. Each has a name (up to 80 characters), a base URL and an auth setting that can inherit the connection's. Live chat uses the default one.
3. Add an endpoint
Under Endpoints choose All endpoints, then add one. An endpoint has three steps: Request, Review, Publish.
Step 1: Request
"Define the HTTP call the agent will make when this capability runs."
- Choose the HTTP method and the path (up to 500 characters). Use
{param}where the agent supplies a value, for example/orders/{orderId}. A path parameter without a sample value fails with "Missing path parameter". - Declare each parameter as path, query, header or body, mark whether it is required and describe it.
- Fill Sample path values, optional Query parameters and Headers.
- Select Retest & Analyze. Loopwix runs a live request and uses AI to read the response. You see Last try succeeded · HTTP 200 and a checklist: Path looks valid, Successful test, Agent brief ready, Ready to publish. Or choose Write brief manually.
An endpoint is a read (lookup) or an action (it changes something). Actions follow the same confirmation rules as other actions.
3b. Review what the agent learns
You decide how the agent may use the data.
Agent access
- Customer-specific data: "Raise minimum trust to Verified so private lookups wait for email verification (code or link), then scope results to that customer."
- Require confirmation: "Use the confirmed trust tier when staff confirmation should gate this lookup."
- Minimum trust level: Guest, Identified, Verified or Confirmed. See How integrations work.
Response learning ("What the agent learns from a successful try, and which fields chat may use. Fill this with AI or write it yourself."):
-
Capability name (for example
account_lookup) and Summary. -
Edit when to use, examples, and errors opens the longer instructions.
-
Response fields: every field of the response with a description and one setting:
Setting Meaning Visible The agent may use and quote the field With verification Only available once the customer is verified Hide Never sent to the model: tokens, passwords, internal ids Add field adds a field the sample did not include. Each list holds up to 100 fields. You can also limit the model to a visible allow-list so only checked top-level keys reach it.

3c. Publish the endpoint
"This endpoint is live. Agents in this workspace can use it once you attach this Source in agent settings." Deactivate in the header takes it offline.
4. Scenarios: test cases
Open Scenarios → Manage scenarios. Choose the endpoint and environment, then:
- Suggest scenarios lets AI propose cases. They are editable drafts and contain no secrets. Accept to save all.
- Add scenario with a Name, a Kind (success, failure or fallback) and a Scenario query. Add Sample params (JSON), an optional Sample body (JSON) and Expected status min/max (100 to 599).
- A failed run offers Save as failing scenario: "Helps the assistant handle API errors without inventing data."
- A Fallback scenario is the catch-all when no success or failure case applies.
5. Attach to an agent
Publish the endpoint, then attach the connection on the agent's Integrations section; see Attach integrations.
What protects your API
- The agent only calls endpoints you published, with the parameters you declared.
- Customer-specific endpoints are bound to the verified customer.
- Personal data the agent read earlier in a turn is never sent to a generic REST endpoint.
- Calls time out (8 seconds for reads by default) and a failing endpoint is paused briefly, so a slow API cannot freeze chat.
Good practice
- Start with read-only
GETlookups. - Hide everything the agent does not need.
- Use Verified for anything customer-specific.
- Try a staging environment and scenarios before production.
Problems: Troubleshooting.
Connect and attach an integration
Step by step: pick a connector, connect it, verify and enable its capabilities, attach it to an agent, then test it in Test chat.
MCP servers
Connect any MCP tool server, choose how Loopwix authenticates, discover its tools and turn on only the ones your agent should use.