Agents
Deploy
Deploy or redeploy the container that runs a Nairi agent. Picks up the latest artifact attachments and provisions runtime. Returns a deployment status.
Deploys (or redeploys) the agent's container. Asynchronous — the deployment runs in the background.
POST /api/public/v1/agents/{agent_id}/deploy{agent_id} accepts either the ULID (cci_...) or the human-readable slug (the agent's agent_id field).
Request body
Prop
Type
Example
curl -X POST https://api.nairi.ai/api/public/v1/agents/AGENT_ID/deploy \
-H "Authorization: Bearer $NAIRI_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"update_config_only": false
}'const res = await fetch(
`https://api.nairi.ai/api/public/v1/agents/${agentId}/deploy`,
{
method: "POST",
headers: {
Authorization: `Bearer ${process.env.NAIRI_API_KEY}`,
"Content-Type": "application/json",
},
body: JSON.stringify({ update_config_only: false }),
},
);
const data = (await res.json()) as { status: string };require "net/http"
require "json"
require "uri"
uri = URI("https://api.nairi.ai/api/public/v1/agents/#{agent_id}/deploy")
req = Net::HTTP::Post.new(uri)
req["Authorization"] = "Bearer #{ENV['NAIRI_API_KEY']}"
req["Content-Type"] = "application/json"
req.body = { update_config_only: false }.to_json
res = Net::HTTP.start(uri.host, uri.port, use_ssl: true) { |h| h.request(req) }
data = JSON.parse(res.body)import os
import requests
res = requests.post(
f"https://api.nairi.ai/api/public/v1/agents/{agent_id}/deploy",
headers={
"Authorization": f"Bearer {os.environ['NAIRI_API_KEY']}",
"Content-Type": "application/json",
},
json={"update_config_only": False},
)
data = res.json()package main
import (
"bytes"
"encoding/json"
"fmt"
"io"
"net/http"
"os"
)
func main() {
agentID := os.Getenv("AGENT_ID")
body, _ := json.Marshal(map[string]any{"update_config_only": false})
req, _ := http.NewRequest(
"POST",
"https://api.nairi.ai/api/public/v1/agents/"+agentID+"/deploy",
bytes.NewReader(body),
)
req.Header.Set("Authorization", "Bearer "+os.Getenv("NAIRI_API_KEY"))
req.Header.Set("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
raw, _ := io.ReadAll(res.Body)
var data map[string]any
json.Unmarshal(raw, &data)
fmt.Println(data)
}Response: 202 Accepted
{
"status": "deploying"
}Delete
Permanently delete an agent from your Nairi organization. Tears down the container and removes the agent's history, artifacts, and assignments.
Overview
What agent resources are and how to attach rules, MCP configs, skills, vaults, integrations, and models to a Nairi agent via the REST API endpoints.