Agent resources
Unassign
Detach a rule, MCP config, skill, vault, integration, or model from a Nairi agent. The resource itself stays in your organization, just no longer attached.
DELETE /api/public/v1/agents/{agent_id}/resources/{resource_id}{agent_id} accepts either the ULID (cci_...) or the human-readable slug (the agent's agent_id field). {resource_id} is the ccr_… value returned by GET /resources, not the underlying entity_id.
If the resource being unassigned does not exist, the response is 404 Not Found (not 400).
Example
curl -X DELETE https://api.nairi.ai/api/public/v1/agents/AGENT_ID/resources/RESOURCE_ID \
-H "Authorization: Bearer $NAIRI_API_KEY"await fetch(
`https://api.nairi.ai/api/public/v1/agents/${agentId}/resources/${resourceId}`,
{
method: "DELETE",
headers: {
Authorization: `Bearer ${process.env.NAIRI_API_KEY}`,
},
},
);require "net/http"
require "uri"
uri = URI("https://api.nairi.ai/api/public/v1/agents/#{agent_id}/resources/#{resource_id}")
req = Net::HTTP::Delete.new(uri)
req["Authorization"] = "Bearer #{ENV['NAIRI_API_KEY']}"
Net::HTTP.start(uri.host, uri.port, use_ssl: true) { |h| h.request(req) }import os
import requests
requests.delete(
f"https://api.nairi.ai/api/public/v1/agents/{agent_id}/resources/{resource_id}",
headers={"Authorization": f"Bearer {os.environ['NAIRI_API_KEY']}"},
)package main
import (
"net/http"
"os"
)
func main() {
agentID := os.Getenv("AGENT_ID")
resourceID := os.Getenv("RESOURCE_ID")
req, _ := http.NewRequest(
"DELETE",
"https://api.nairi.ai/api/public/v1/agents/"+agentID+"/resources/"+resourceID,
nil,
)
req.Header.Set("Authorization", "Bearer "+os.Getenv("NAIRI_API_KEY"))
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
}Response: 204 No Content
Assign
Attach a rule, MCP config, skill, vault, integration, or model to a Nairi agent. Returns the updated attachment list ready for the next deploy call.
Overview
What container environment variables are, when to use them instead of vault secrets, and how to set them on your Nairi agents through the REST API.