agents

Serialize

Serialize an Agent to the .agent file format.

Useful for storing the Agent with your code in a version control system, or for editing with an AI tool.

By default, the deployed version of the Agent is returned. Use the query parameters version_id or environment to target a specific version of the Agent.

get/agents/{id}/serialize

Request

  • Base URL: https://api.humanloop.com/v5
  • URL: https://api.humanloop.com/v5/agents/{id}/serialize
  • Auth: API key in header X-API-KEY

Path parameters

idstring required

Unique identifier for Agent.

Query parameters

version_idstring

A specific Version ID of the Agent to retrieve.

environmentstring

Name of the Environment to retrieve a deployed Version from.

Response

Response with status 200

object required

Changes

No recorded changes to this operation across all 1 revision of this API.