Use Agent via API
Direct. Documented. Developer-friendly. Access your agent's endpoints with Swagger UI and OpenAPI.
INFO
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
orpstage
)
Step-by-Step: Use the SmythOS Agent API
Step 1: Open the API Embodiment in Your Dashboard
- Navigate to your agent’s Deployments tab
- Find and click on the API embodiment in the Environment section
- A Swagger UI will load with all available endpoints
INFO
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
- Select your Server from the dropdown (e.g., test or production)
- Click on any endpoint to expand it
- Click Try it out to activate edit mode
- Modify the payload as needed
- Click Execute to send the request and view the response
WARNING
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.