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. Zdeněk Němec, superface.ai, September ‘23
    Autonomous Agents
    The year of AI: Forget about APIs?
    superface.ai

    View full-size slide

  2. 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

    View full-size slide

  3. We have been upgraded!
    superface.ai

    View full-size slide

  4. Year of AI: Impact on APIs?
    superface.ai

    View full-size slide

  5. APIs today
    superface.ai

    View full-size slide

  6. 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

    View full-size slide

  7. Tight coupling
    Welding client and server together
    Server
    Client
    GET https:!"wttr.in/london?format=j1
    Server implementation
    hardcoded in client
    superface.ai

    View full-size slide

  8. 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

    View full-size slide

  9. 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

    View full-size slide

  10. 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

    View full-size slide

  11. 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

    View full-size slide

  12. Using AI to reduce API plumbing
    superface.ai

    View full-size slide

  13. 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

    View full-size slide

  14. 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

    View full-size slide

  15. 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

    View full-size slide

  16. 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

    View full-size slide

  17. • 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

    View full-size slide

  18. 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

    View full-size slide

  19. AI-powered API documentation
    Best developer experience for your API
    superface.ai

    View full-size slide

  20. 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)

    View full-size slide

  21. Do we have to know what API we
    use?
    superface.ai

    View full-size slide

  22. Autonomous Agent
    superface.ai

    View full-size slide

  23. 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/

    View full-size slide

  24. 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

    View full-size slide

  25. 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

    View full-size slide

  26. 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

    View full-size slide

  27. 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

    View full-size slide

  28. 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

    View full-size slide

  29. 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

    View full-size slide

  30. Workflows
    Multi-step, complex, workflows in unknown or changing landscape
    superface.ai
    superface.ai

    View full-size slide

  31. Forget APIs?
    superface.ai

    View full-size slide

  32. Thank you!
    Let’s talk!
    Zdenek “Z” Nemec 

    Twitter/X: @zdne

    superface.ai
    superface.ai

    View full-size slide