How AI is Transforming The Future of APIs

How AI is Transforming The Future of APIs

Posted in

There’s hardly a space in the world right now that isn’t being changed by AI, and APIs are no exception. But, in the midst of all the upheaval AI is causing, will it bring growth to the API sector? Or is AI another passing fad that will fail to live up to its promise?

We’re holding our Platform Summit in Stockholm this October, and one of our speakers will be Zdenek “Z” Nemec. As the founder and CTO of Superface.ai, a unified SDK and infrastructure for autonomous self-integrating applications, Nemec has spent 15+ years in the API space.

Throughout that time, Nemec says that “the problems are always the same, no matter what the enterprise… it all boils down to plumbing systems together.” That’s the fundamental issue APIs are designed to address. But, as Nemec observes, these API connections require constant oversight because things change and connections break. Then, you’re back to square one.

In his Platform Summit session, AI-enabled APIs, Nemec will discuss the emerging approach to employing AI in APIs, its impact on integrating and building APIs, and how changing our way of working with APIs can lead to self-integrating applications.

We also synced with Zdenek about the relationship between AI and APIs. Below, we’ll examine that relationship and consider some of the hurdles to overcome in the future of AI and APIs.

The Future Is Already Here (Sort of…)

Zdenek-Nemec

Catch Zdenek “Z” Nemec’s talk at Platform Summit 2023 in Stockholm, Oct 16-18.

As in many industries, generative AI is proving to be a key stepping stone. “Right now, there’s the concept of autonomous agents in the AI space,” Zdenek says. “They’re given a task, and they figure out how to do that task.”

He provides the example of asking LangChain what the weather is like in San Francisco. LangChain searches the web, scrapes results for you from different sources and summarizes its findings to give you the answer. But, for Zdenek, that’s not enough.

When tasked with identifying a suitable service or API, AI is more than capable of looking at thousands of options in the blink of an eye and suggesting a solution. But, in Zdenek’s vision, “a machine, or piece of software, should be able to go and figure out ‘what other application or service can provide what I want?’ and connect to it immediately.”

But, for reasons we’ll get into below, we’re not quite there yet.

Zdenek uses the following real-world use case: “If you ask Siri ‘Is my car locked?’ it will reply that it can’t tell you that, but it recognizes what you’re asking. There’s currently no way for it to connect to whatever API(s) your car company uses.”

“We got a massive boost this year with OpenAI and these models that are able to deal with human or textual information and distill something out of them,” said Nemec. “What I’m looking at now is replacing that manual plumbing — the technical interfaces should never be a problem. Machines should be able to figure that out, and we should never need to worry about it.”

It’s often the case that AI “knows” what it needs but not necessarily how to get it. AI can identify the issue and bring it to a business’s attention, but implementation remains an issue that (for now, at least) a human operator must deal with.

Limitations of AI and APIs

Zdenek describes two barriers that need to be overcome for AI and APIs to truly mesh:

  1. The business side: Currently, companies forge connections in a B2B setting, obtain a proof of concept, agree to SLAs, and sign contracts.
  2. The engineering side. Developers still must reference API documentation to build products and connect them together.

The second barrier is likely easier to overcome since engineers already use AI tools to generate code, solve problems, and more. It’s safe to assume that there’s a willingness to use AI to create, consume, or distill API documentation in some ways.

In fact, this is the problem that Nemec’s Superface infrastructure is designed to address. By removing the need for a middleman (proxy), software integrates directly without adding points of failure, security concerns, or latency to connections between apps and APIs.

As for the business side, there’s the elephant in the room: when developers rely on AI to choose the optimal service for a task, they abandon their own agency. If something goes wrong, we can’t hold AI accountable like we could a developer who has, say, chosen an incompatible service or sent too many requests.

“At some point, part of this will be legal and contractual — the formalization of how machines can evaluate products, look at costs, enter into contracts, and so on. And we’ve already seen this sort of thing with smart contracts on the blockchain. We’ll have to get there, but it will happen.”

The Path to Viable Self-Integration

Nemec describes a vision of a world in which self-integrating apps are a reality, with the ability for AI tools to assess different connectors and opt for the most suitable. It’s a vision that isn’t unrealistic because there have already been attempts to clarify how APIs work to non-human entities.

Consider the following definition of the OpenAPI Specification (emphasis added): “The OpenAPI Specification, previously known as the Swagger Specification, is a specification for a machine-readable interface definition language for describing, producing, consuming and visualizing web services.”

As mentioned above, we know that AI can already operate outside the constraints of machine-readable content. New large language models (LLMs) are more than comfortable dealing with human language. That low barrier to entry is one of the key reasons conversational AI tools have become so popular in recent months.

“This is, again, something that is mind-boggling because the web is something that’s meant to be browsed by humans in a browser. It was never meant as a machine protocol, but now we’re training machines to read documents that were intended for humans.”

This certainly doesn’t mean we should abandon formats like OpenAPI or AsyncAPI anytime soon. If anything, greater standardization and writing API documentation with consumption by AI in mind could be useful for highlighting hard limits or certain protocols that must be followed. Regulation around what AI can and can’t do hasn’t exactly caught up with its growth, but it will.

On the topic of safeguarding sensitive data, Zdenek identifies that there’s a risk in hosted solutions. “There’s an understanding that people shouldn’t be feeding their secret queries to ChatGPT and the like. I think the solution to that will be using local models, which seems more approachable and affordable than it did even a couple of months ago.”

In fact, he sees this as key to AI taking on a greater role in environments where data is sensitive. “Running local models, on your own devices or on the edge, so you know where your data is, needs to happen for this to take off. Otherwise, we’re all sending our data to one big player [we’re thinking of ChatGPT or Google Bard here], and we’ve all had some lessons with how that goes…”

What’s Next for AI and APIs?

“In the API community, we always think about what’s trending. About what’s next. We talk about REST and GraphQL, but the reality is that most transactions take place with EDI (Electronic Document Interchange). Bank transfers, package distribution, and manufacturing processes are all happening through very arcane, often outdated, systems and interfaces.”

Things move slowly outside the tech space, particularly in big corporations bogged down by legacy systems. Still, even big players have shown a willingness to embrace developments like autonomous AI agents. There’s no doubt that AI is already transforming the API space in several ways, but none more direct than the development of APIs that employ AI to extend other services:

In a write-up on autonomous agents, Sophia Yang describes how agent architecture is being extended with memory, reflection, and planning. In what’s often called the “Westworld simulation”, researchers from Stanford and Google have created an interactive sandbox with believable simulations of human behavior…including prioritizing and decision-making.

It’s hard not to think that, at some point, those simulations will become believable enough that businesses feel comfortable handing the reins over to an AI workforce that’s cheaper than human developers, works more quickly, and never tires.

Although this is only a dream for current API integration requirements, such manual work may be replaced by our robot overlords in time…