Skip to main content

Use Agent via API

Direct. Documented. Developer-friendly. Access your agent's endpoints with Swagger UI and OpenAPI.

INFO

TL;DR: Open your agent’s API embodiment, grab the OpenAPI URL, and use the Swagger interface to test, verify, and integrate.

Why Access Your Agent via API?

This method is ideal if you want to:

  • Send HTTP requests directly to your agent
  • Test behavior and payloads in Swagger before deploying to production
  • Integrate with other tools, backends, or systems without using UI elements
  • Reuse agent logic across internal apps, CRMs, dashboards, or mobile apps

What You Need Before You Start

Before interacting with the API embodiment, make sure:

  • Your agent is deployed (test, production, or versioned)
  • You have a Vault API key with the correct scopes
  • You know your environment’s subdomain URL (stage or pstage)

Step-by-Step: Use the SmythOS Agent API

Step 1: Open the API Embodiment in Your Dashboard

  1. Navigate to your agent’s Deployments tab
  2. Find and click on the API embodiment in the Environment section
  3. A Swagger UI will load with all available endpoints
INFO

Each endpoint maps to a callable block or function in your agent logic.

Step 2: Get the OpenAPI URL for Your Agent

The OpenAPI schema is located at:

https://<your-agent-subdomain>/api-docs/openapi.json

Examples:

Test: https://salesbot.agent.stage.smyth.ai/api-docs/openapi.json  
Prod: https://salesbot.agent.pstage.smyth.ai/api-docs/openapi.json

You can import this URL into third-party tools like Postman or GPT Builder.

Paste your OpenAPI URL into tools like Swagger, Postman, or GPT Builder to explore endpoints.

Step 3: Test and Explore Endpoints with Swagger

  1. Select your Server from the dropdown (e.g., test or production)
  2. Click on any endpoint to expand it
  3. Click Try it out to activate edit mode
  4. Modify the payload as needed
  5. Click Execute to send the request and view the response
WARNING

Swagger does not support multi-line JSON by default. Keep payloads single-line or escape newline characters.

What Comes After API Integration?

Now that your API is live:

  • Monitor usage from Deployments → Logs
  • Use the same OpenAPI URL in SDKs or GPT Builder
  • Combine this embodiment with LLM or ChatBot deployment to serve multiple access channels

Want to make it conversational? Learn how to Deploy as ChatBot and embed the same logic into your site’s UI.