Skip to main content

Generic HTTP connector

Use this for any JSON chat endpoint. The runtime renders a request template, sends JSON, and maps the response into a reply and thread reference.

What you need​

  • endpoint URL
  • auth method and secret
  • request body shape
  • response field containing the reply
  • optional conversation/thread field

Manifest​

{
"schema_version": 1,
"key": "support-agent",
"version": "1.0.0",
"name": "Support agent",
"description": "Internal support agent",
"icon": "message",
"runtime": "http",
"auth": [
{
"key": "bearer",
"type": "bearer",
"credential": "token"
}
],
"config_schema": {
"type": "object",
"required": ["endpoint"],
"properties": {
"endpoint": {
"type": "string",
"title": "Endpoint",
"format": "uri"
}
}
},
"operations": {
"chat": {
"request": {
"method": "POST",
"url": "{{config.endpoint}}",
"headers": {
"Content-Type": "application/json"
},
"body": {
"message": "{{message}}",
"conversation_id": "{{thread_ref}}"
}
},
"response": {
"mode": "json",
"reply": "$.reply",
"thread_ref": "$.conversation_id",
"status": {
"path": "$.status",
"completed": ["completed", "ok"],
"failed": ["failed", "error"]
}
}
}
}
}

Install​

  1. Connectors → Catalog → New connector or clone an HTTP entry.
  2. Paste the manifest and create the definition.
  3. Install it with:
    • Endpoint — your agent URL.
  4. Add the bearer token.
  5. Test with Hello.

Request template values​

ValueMeaning
{{message}}User message
{{thread_ref}}Previous thread reference
{{resume_ref}}Pause/resume reference
{{idempotency_key}}Idempotency key
{{config.endpoint}}Installation config
{{auth.token}}Decrypted credential

Only these lookups are allowed. There is no JavaScript.

Response mapping​

  • reply — string or JSON value; non-string values are serialized.
  • thread_ref — provider conversation ID.
  • status.path plus completed/failed lists.
  • error — optional path for a provider error message.

Testing with httpbin​

For a smoke test without a real agent, use:

Endpoint: https://httpbin.org/post

The call succeeds with completed and an empty reply because httpbin does not return a reply field. This verifies credentials, headers, URL and transport.

Auth examples​

API key header​

{
"key": "api_key",
"type": "api_key",
"in": "header",
"name": "X-API-Key",
"credential": "api_key"
}

Basic auth​

{
"key": "basic",
"type": "basic",
"username_credential": "email",
"password_credential": "api_token"
}

Troubleshooting​

ErrorFix
Missing connector credentialAdd the credential key named by the auth definition
non-JSONThe endpoint returned HTML/text or an empty body
HTTP 401/403Check the auth method and token
reply is nullThe response path does not exist; inspect View manifest and the provider response