Skip to main content

SDKs & Examples

Assimetria OS exposes a standard REST API. You can integrate with any HTTP client in any language. Below are examples for common stacks.

JavaScript / Node.js

npm install axios
const axios = require('axios');

const api = axios.create({
baseURL: 'https://api.orkosi.com/api',
headers: { 'Authorization': 'Bearer YOUR_API_KEY' },
});

// List agents
const { data: agents } = await api.get('/agents');
console.log(agents.data);

// Create a task
const { data: task } = await api.post('/tasks', {
title: 'Implement checkout flow',
priority: 'P1',
assignee: 'felix',
product: 'assimetria-os',
});
console.log(task.data);

Python

pip install requests
import requests

BASE = "https://api.orkosi.com/api"
HEADERS = {"Authorization": "Bearer YOUR_API_KEY"}

# List tasks
resp = requests.get(f"{BASE}/tasks", headers=HEADERS, params={"limit": 20})
tasks = resp.json()["data"]

# Create an agent from a template
resp = requests.post(
f"{BASE}/agent-templates/full-stack-dev/apply",
headers=HEADERS,
json={"name": "my-agent", "display_name": "My Agent"},
)
config = resp.json()["data"]

cURL

# Authenticate
TOKEN=$(curl -s -X POST https://api.orkosi.com/api/auth/login \
-H "Content-Type: application/json" \
-d '{"email": "user@example.com", "password": "pass"}' \
| jq -r '.token')

# Use the token
curl https://api.orkosi.com/api/agents \
-H "Authorization: Bearer $TOKEN"

# Or use an API key directly
curl https://api.orkosi.com/api/agents \
-H "Authorization: Bearer osk_live_abc123..."

Go

package main

import (
"encoding/json"
"fmt"
"net/http"
)

func main() {
client := &http.Client{}
req, _ := http.NewRequest("GET", "https://api.orkosi.com/api/agents", nil)
req.Header.Set("Authorization", "Bearer YOUR_API_KEY")

resp, err := client.Do(req)
if err != nil {
panic(err)
}
defer resp.Body.Close()

var result map[string]interface{}
json.NewDecoder(resp.Body).Decode(&result)
fmt.Println(result)
}

OpenAPI spec

Download the full OpenAPI 3.0 spec for code generation:

curl https://api.orkosi.com/api/docs/openapi.json -o openapi.json

Use it with any OpenAPI code generator:

# Generate a TypeScript client
npx @openapitools/openapi-generator-cli generate \
-i openapi.json \
-g typescript-axios \
-o ./generated-client

# Generate a Python client
npx @openapitools/openapi-generator-cli generate \
-i openapi.json \
-g python \
-o ./generated-client

Webhooks

Set up outbound webhooks to receive real-time events:

curl -X PATCH https://api.orkosi.com/api/tenant-config \
-H "Authorization: Bearer TOKEN" \
-H "Content-Type: application/json" \
-d '{
"webhooks": {
"task_completed": "https://your-app.com/hooks/task-done",
"agent_error": "https://your-app.com/hooks/alert"
}
}'

See Webhooks for the full webhook reference.