Setup a Hub

API Endpoints

Authentication

Session Management

Examples

Overview

Superface's Hub API enables you to connect to and use the tools added to your account via API.

This is particularly useful for developers who are building their own agents, and want to offer users the ability to connect to external APIs and services but don't want to build those integrations for themselves.

How it works

LLMs such as OpenAIMistralAIAnthropic and projects like LangChain allow developers to define and use functions that extend the functionality and connectivity of LLMs by providing user speciifc, real-time, or more context specific data in response to user prompts.

Example function

These tools are defined and represented as JSON objects that outline what the tool is, what it does, and what parameters and value types are required in order to use it correctly.

For example, a simple tool to get the current weather from the service Wttr.in when defined in this way looks like this:

{
  "type": "function",
  "function": {
    "name": "weather__current-weather__CurrentWeather",
    "description": "Retrieve current weather information for a specified location.\\n",
    "parameters": {
      "type": "object",
      "required": ["city"],
      "properties": {
        "city": {
          "type": "string",
          "nullable": false,
          "description": "Name of the city including state and country, e.g.: \\"Prague, Czech Republic\\" or \\"New York City, NY, USA\\"",
          "title": "city"
        },
        "units": {
          "enum": ["C", "F", "K"],
          "description": "Units used to represent temperature - Fahrenheit, Celsius, Kelvin\\nCelsius by default",
          "title": "units"
        }
      },
      "nullable": true
    }
  }
}

At a minimum, this decription can be used by an LLM to determine which information it should gather before executing an API call to a specific service. Better still, it can use it to determine which tool, or tools, should be used to complete the prompt a user entered.

Superface Hub API

Superface provides the ability to connect various tools such as the Google Suite, Notion, Jira, Todoist, HubSpot, Salesforce and many, many, more to custom agents via our API.

Any tools that are added to your account are made available to your end users, giving your agent a host of additional connectivity in just a few APIs calls.

Using the Superface API you can: