Skip to main content
API Actions grant your agents the ability to interact with the real world by calling external services.

Configuration

  • Schema Definition: Define the JSON schema for your API endpoints, including required and optional parameters.
  • Importing Specs: You can quickly bootstrap your capabilities by uploading an OpenAPI spec. This can be used to create a single action or a full set of API Actions in bulk.
  • Authentication: Securely store API keys and headers in Maitai.
  • Response Handling: Configure whether to make Real API calls or return Mock responses for testing and prototyping.

Invocation Mode

Maitai allows you to control how action results are handled within a session:
  • Foreground: The API output is processed and sent back to the user as part of the agent’s response (e.g., “Your order status is: Out for Delivery”).
  • Background: These actions are used exclusively to enrich the agent’s context. Results are never shown directly to the user but are stored for other actions or subagents to utilize.
    • Example: A get_loan_options action might run in the background to gather data, which a subsequent “Loan Advisor” subagent then uses to formulate a tailored recommendation.
Parallel Execution: To optimize performance, one Foreground action and one Background action can be executed simultaneously in the same step.