← Back to Blog

How to Run an AI REST API Agent with OE Runtime

Call any REST API with natural language. OE Runtime connects to external APIs via HTTP, makes GET and POST requests, processes the JSON responses, and returns structured summaries — no Postman, no custom scripts, just a YAML file.

🔌
Step 1
Probe API
Make GET requests to /users and /posts, noting status codes, response times, and data structure.
Step 2
Fetch Detail & Create Record
Fetch a user detail and create a test post via POST with a confirmed response ID.
Step 3
Report
Summarise all endpoints called, status codes, data shapes, and creation confirmation.

What You Need


Create the Project Folder

Create a folder called rest-api/ and add these two files:

rest-api/
├── SKILL.md         # the portable skill (agentskills.io)
├── agent.yaml       # wires SKILL.md to your connector
└── oe-config.json  # LLM key + connector credentials

The Skill Files

Create SKILL.md inside a rest-api/ directory. This is the portable skill — it follows the agentskills.io format and runs unchanged on Claude, Cursor, Windsurf, or OE Runtime:

---
name: rest-api
description: Make HTTP requests to a REST API and summarize responses
license: Apache-2.0
metadata:
  author: Open Enthrium
  version: "1.0"
---

You are an API integration agent. Make GET, POST, PUT, or DELETE requests
to external APIs and process the responses. Return structured summaries.
Complete all steps fully before writing your report.

## Step 1: Probe API
Make a GET request to /users to fetch a list of user records.
Also make a GET request to /posts to fetch a list of posts.
Note the HTTP status code, response time, and top-level structure of each response.

## Step 2: Fetch Detail and Create Record
Fetch the detail for user ID 1 via GET /users/1.
Then create a test post via POST /posts with body:
  { "title": "API Test Post", "body": "Created by OE Runtime agent.", "userId": 1 }
Note the response status and the ID assigned to the new post.

## Step 3: Report
Summarize API activity:
- Endpoints called and HTTP status codes
- Users endpoint: record count and field schema
- Posts endpoint: record count and field schema
- Detail fetch: user name and email for ID 1
- Created post: ID returned, confirmation of success

Create agent.yaml in the same directory to wire the skill to your connector:

name: API Caller
description: Make HTTP requests to a REST API and summarize responses
connectors:
  - connection_name: Target API
    connection_type: http
skills:
  - path: ./
    trigger_type: auto

The Config File

Create oe-config.json in the same directory:

{
  "llm": {
    "provider": "openai",
    "model": "gpt-4o",
    "apiKey": "YOUR_OPENAI_API_KEY"
  },
  "server": {
    "enabled": false,
    "port": 3333,
    "apiKey": "your-secret-api-key"
  },
  "connectors": [
    {
      "connection_name": "Target API",
      "connection_type": "http",
      "baseUrl": "https://jsonplaceholder.typicode.com"
    }
  ]
}

Replace the baseUrl with your target API and set the Authorization header with your API token. The agent supports any REST API that accepts JSON — Stripe, HubSpot, Salesforce, your own internal APIs, and more.

Download OE Runtime

OE Runtime — Direct Downloads

Run the Agent

From the parent folder containing your skill directory:

MethodBest forDownload
1 npx recommended No install needed — always runs the latest version —
2 Windows .exe Download once, run offline on Windows ⊞ Windows (.exe)
3 macOS binary Download once, run offline on Mac  macOS
4 Linux binary Server deployments, cron jobs, Docker 🐧 Linux
5 API Server integration Call from any app, webhook, or automation pipeline 📮 Postman Collection

1 npx recommended

npx -y @openenthrium/oe-runtime@latest ./rest-api

2 Windows

oe-runtime-win.exe ./rest-api

3 macOS

chmod +x oe-runtime-macos
./oe-runtime-macos ./rest-api

First run blocked? System Settings → Privacy & Security → Allow Anyway.

4 Linux

chmod +x oe-runtime-linux
./oe-runtime-linux ./rest-api

5 API Server integration

Add a "server" block to oe-config.json, then start with --serve:

{
  "llm": { ... },
  "server": { "enabled": true, "port": 3333, "apiKey": "your-secret-key" },
  "connectors": [ ... ]
}
npx -y @openenthrium/oe-runtime@latest --serve --config oe-config.json

Run with inline YAML:

curl -X POST http://localhost:3333/run \
  -H "Content-Type: application/json" \
  -H "X-API-Key: your-secret-key" \
  -d '{"yaml": "...", "params": {}}'

Or run from a file on the server:

curl -X POST http://localhost:3333/run-file \
  -H "Content-Type: application/json" \
  -H "X-API-Key: your-secret-key" \
  -d '{"file": "/path/to/agent.yaml", "params": {}}'

Use Cases

Build your own agents with OE Runtime

Download OE Runtime and run any AI agent locally or as a server — no cloud required.

Get OE Runtime →
Series OE Runtime Agent Guides — 21 Connectors
Series overview →