Skip to main content
Plans: Free, Individual, Pro, and Enterprise. Self-hosted: Enterprise license.
Nasiko Cloud and self-hosted Enterprise servers serve these grants routes at /api/agents/{id}/.... Some paths match a self-hosted open-source server’s, but the request shapes differ: user and agent grants take the grantee in the path, not the body. For the open-source routes, see Agent access API. On Free, making an agent public, granting it to an org unit or the organization, and transferring its ownership return 402 with code plan_feature_not_included. Behavioral guide: User → agent access. The dashboard’s Access tab and, on Enterprise deployments, nasiko-ee access call these routes.

Who can call

Every route needs a session (Authorization: Bearer <token>) from the agent’s owner, a user with the admin role, or a superuser, except the org unit and organization grants below. The GET routes answer anyone else with 200 and {"available": false}. Write routes answer 403:
Sharing, making public, and transferring ownership of a coding agent’s harness agent are refused with 409:
Revoking a grant is always allowed. Every agent and user ID is a UUID.

Read grants

GET /api/agents/{id}/grants
Sorted by type, then creation time. GET /api/agents/{id}/visibility returns the same grants with the public flag:
404 if the agent doesn’t exist. GET /api/agents/{id}/users lists everyone who can reach the agent through ownership, a user grant, or an org unit grant:
GET /api/agents/{id}/accessible-agents lists the public agents and the agents shared with this agent:

Share with a user or agent

POST /api/agents/{id}/grants/users/{user_id} and POST /api/agents/{id}/grants/agents/{target_id} No body. 201 on success, including when the grant already exists.
Sharing with an agent adds this agent to the agents target_id can reach. It doesn’t change which agents may call which. DELETE the same path to revoke. 204 on success, 404 if there was no such grant.

Share with an org unit or the organization

POST /api/agents/{id}/grants/units/{unit_id} shares the agent with everyone in the unit and every unit beneath it. You can make or revoke this grant if you have the admin role, lead the unit or a unit above it, or own the agent and belong to the unit. Anyone else gets 403. POST /api/agents/{id}/grants/organization shares the agent with every signed-in user of the deployment. It needs the admin role or a superuser; anyone else gets 403. It doesn’t make the agent public. No body. 201 on success. DELETE the same path to revoke: 204, or 404 if there was no such grant.

Public or private

POST /api/agents/{id}/grants/public makes the agent reachable by every signed-in user. 201. DELETE /api/agents/{id}/grants/public makes it private. 204, or 404 if the agent doesn’t exist. Nasiko’s own built-in harness agents stay public, and making one private returns 409 with "code": "agent_not_shareable".

Rename

PUT /api/agents/{id}/name 204 on success. 400 with name cannot be empty. 404 if the agent doesn’t exist. 409 with "code": "agent_not_renamable" for a harness agent.

Transfer ownership

PUT /api/agents/{id}/owner