API Reference
AI Agent
Endpoints for working with AI Agent resources in klink.cloud. All requests are authenticated with your API token — see Authentication.
- GET/api/v1/ai-agent-models
List Models
Lists the models an AI agent flow can use. Send a
slugasmodelwhen saving a flow. Models markedlegacyare listed for reference only and are rejected on save. - GET/api/v1/ai-agents
Listing
Lists the AI agents in your workspace.
- POST/api/v1/ai-agents
Create
Creates an AI agent with no flow. Next, save a flow with Update Flow and publish it with Publish.
- GET/api/v1/ai-agents/{id}
Detail
Returns an AI agent with a summary of its draft and live flows. Use Get Flow for the flow content.
- PATCH/api/v1/ai-agents/{id}
Update
Renames an AI agent or changes its session timeout. Send only the fields you want to change; anything you leave out stays as it is. To change the flow, use Update Flow.
- DELETE/api/v1/ai-agents/{id}
Delete
Permanently deletes an AI agent and cannot be undone.
- GET/api/v1/ai-agents/{id}/flow
Get Flow
Returns the agent's draft (default) or live flow. The response is shaped so you can edit it and send it back to Update Flow: keep the node
ids and sendtoolIds.toolsandproviderToolsare for reading only. - PUT/api/v1/ai-agents/{id}/flow
Update Flow
Replaces the agent's whole draft flow. Customers are not affected until you Publish.
- GET/api/v1/ai-agents/{id}/flow/versions
List Versions
Lists every published version of the agent's flow.
isLivemarks the one customers currently get. - POST/api/v1/ai-agents/{id}/publish
Publish
Publishes the current draft as a new live version. This affects real customers: new conversations get the new version right away, while conversations already in progress keep their version until they have been inactive for
inactivityTimeoutseconds.