Upgrade to Pro — share decks privately, control downloads, hide ads and more …

Autonomous Agents

Z
September 18, 2023

Autonomous Agents

API Days London 2023

Z

September 18, 2023
Tweet

More Decks by Z

Other Decks in Programming

Transcript

  1. AI and APIs • Pioneered the API-first approach at Apiary.io

    → Oracle • Founder of API consulting Good API • Helped several Fortune 100 companies with their API strategy and execution
 • Founder and CTO of Superface.ai Zdeněk “Z” Němec superface.ai
  2. API Interface for sharing capabilities GET https:!"wttr.in/london?format=j1 200 OK Technical

    Business Weather forecast for London - location - temperature in Celsius - humidity - barometric pressure - uv indext - and more… superface.ai
  3. Tight coupling Welding client and server together Server Client GET

    https:!"wttr.in/london?format=j1 Server implementation hardcoded in client superface.ai
  4. API provider challenges API providers facing many problems How to

    version API? API design Securing APIs How to publish API? API product management What API style? REST vs GraphQL vs … How to monetize API How to discover API API testing API documentation API SDK Developer experience DX API governance Observability Operations & monitoring superface.ai
  5. Analysis Development Testing Deployment time budget Expectation: Analysis Development …

    … Reality: superface.ai API consumer perspective Finding the right API Capability I need? Costs? How to get access? What are the limitations? SLAs? How to use it? How it works? How to map my data model? Why is it not doing what I want? Typical API integration project
  6. API plumbing Manual labor needed to provide and consume capabilities

    ! Design API " Document # Publish $ Discover % Try &' Implement Maintain ( Build SDK ) Purchase * Test & Test ! Implement + API provider API consumer superface.ai
  7. API documentation The centerpiece of APIs Most information needed are

    transferred “out of band" in human-centric API documentation* ⚠ superface.ai * - not accessible to machines until 2023
  8. AI API analysis AI connects the APIs for you •

    You can use ChatGPT / Bard / Copilot directly to generate the code • _if_ it knows the API • the API information _might_ be outdated • OpenAPI (OAS) quality varies greatly, often the critical information are not in OAS • Code quality differs greatly based on the language • You are still coupled with the API • Chatbots are for users, not programmers superface.ai
  9. Comlink Communication link for APIs 1. Analyze API documentation, plain

    text, HTML, or OAS 2. Figure out how to fulfill YOUR use case with the given API 3. Your application calls the API directly using the Comlink interface and client API Documentation API Your App superface.ai
  10. Your use-case Comlink interface # index API from plain text,

    readme.io, or OpenAPI Spec $ superface prepare https://resend.com/docs # create new Comlink for your use case $ superface new resend “send an email” Comlink interface superface.ai Resend API Your App
  11. Your vocabulary Change data model, let AI to figure out

    the mapping # run mapping; Comlink engine will figure out how to map `from` to `sender` $ superface map send-email superface.ai
  12. • Dramatically reduces the time needed to integrate an API

    • Decouples client from the API, including • API data model • API style, media types, etc. Decoupled Robust, free to evolve v1 v2 Breaking API change Your App API superface.ai
  13. One use-case multiple APIs Unified APIs? Your app can handle

    it! # Index API documentations of different providers $ superface prepare https://resend.com/docs $ superface prepare https://docs.sendgrid.com/api-reference Resend API Sendgrid API Your App # Map use case to Resend API $ superface map send-email resend # Map use case to SendGrid API $ superface map send-email sendgrid superface.ai
  14. superface.ai • Integrate many APIs really quick • Not bother

    with API docs • API client resilient to changes • We don’t even have to know the endpoint(s)
  15. Autonomous Agent Autonomy: freedom from external control or influence; independence

    Agent: a person who acts on behalf of another person, the doer of an action A software that acts on behalf of its users, that is free to make decisions. superface.ai Autonomous Agent Concept https://lilianweng.github.io/posts/2023-06-23-agent/
  16. Autonomous API Agent • No hardcoded API calls • Decides

    at runtime what API to connect to • Figures out at runtime how to connect API API Agent Registry I am here, and this is how agents connect I need to send email. What API is available? Here are the APIs and how to connect API Communication superface.ai
  17. API landscape Agent Inventory 1 Inventory 2 Orders CRM PLM

    Agent is written for a use case, GET https:!"192.12.13.1/service/ inventory?pid=12355 “Check inventory” not for an API Use cases, not APIs superface.ai Boundary within agent navigates
  18. Multiple API landscapes Mesh of capabilities Stripe Azure Ayden Twilio

    Google Fedex … Global Landscape Global capabilities Partner organization Service 2 Service 1 Service 3 Agent CRM Inventory 2 Orders Inventory 1 PLM Organization landscape Partner capabilities superface.ai
  19. Navigation in a landscape Unknown or changing landscape of capabilities

    and providers Superface Hub Superface Auto Agent "Who can tell me about inventory?” List of available inventory services “What is the inventory for our product?” “The inventory for is 42” Internal inventory services superface.ai
  20. Personal assistant Autonomous agent decides what of the available email

    services to use based on its configuration and your identity… “When was the last email from Edgar?” Gmail API Based on Hub configuration auto agent will ask Gmail “The last email from [email protected] was Yesterday” superface.ai
  21. Provider selection The right capability and provider for the task

    Price, quality and relevancy… “Send “Greetings from Jane” to +38553694008” Infobip API Based on configuration, price, and country auto agent uses Infobip “Your message has been sent” superface.ai