Levain LabsLevain Labs
API ReferenceOrganization

Publish Recipe Version

Publish a version of an org agent from a source archive.

Publish a version of an org agent from a source archive.

Upload a gzipped tar whose single top-level directory contains the agent's recipe package. The first publish under a slug creates the org agent; later publishes append versions and make the newest one active. Slugs are global, so a slug already taken by another publisher is refused.

Any workspace in the org can then adopt the agent via POST /api/v1/managed-agents/{slug}/adopt; adopting workspaces follow the active version.

POST
/api/v1/org/agents/{slug}/versions

Authorization

HTTPBearer
AuthorizationBearer <token>

In: header

Path Parameters

slug*Slug

Header Parameters

X-API-Key?string|null

Request Body

multipart/form-data

TypeScript Definitions

Use the request body type in TypeScript.

Response Body

application/json

application/json

curl -X POST "https://api.levainlabs.com/api/v1/org/agents/string/versions" \  -F sdist="string"
{
  "version": 0,
  "status": "string",
  "s3_content_hash": "string",
  "created_at": "string"
}
{
  "detail": [
    {
      "loc": [
        "string"
      ],
      "msg": "string",
      "type": "string",
      "input": null,
      "ctx": {}
    }
  ]
}