Skip to content

Register Build

agents.register_build(AgentRegisterBuildParams**kwargs) -> Agent
POST/agents/register-build

Register an agent at build time, before it is deployed, so it can be permissioned and shared prior to deploy. Idempotent by name.

ParametersExpand Collapse
description: str

The description of the agent.

name: str

The unique name of the agent.

agent_input_type: Optional[Literal["text", "json"]]

The type of input the agent expects.

One of the following:
"text"
"json"
registration_metadata: Optional[Dict[str, object]]

The metadata for the agent’s build registration.

ReturnsExpand Collapse
class Agent: …
id: str

The unique identifier of the agent.

acp_type: AcpType

The type of the ACP Server (Either sync or async)

One of the following:
"sync"
"async"
"agentic"
created_at: datetime

The timestamp when the agent was created

formatdate-time
description: str

The description of the action.

name: str

The unique name of the agent.

updated_at: datetime

The timestamp when the agent was last updated

formatdate-time
agent_input_type: Optional[Literal["text", "json"]]

The type of input the agent expects.

One of the following:
"text"
"json"
production_deployment_id: Optional[str]

ID of the current production deployment.

registered_at: Optional[datetime]

The timestamp when the agent was last registered

formatdate-time
registration_metadata: Optional[Dict[str, object]]

The metadata for the agent’s registration.

status: Optional[Literal["Ready", "Failed", "Unknown", 3 more]]

The status of the action, indicating if it’s building, ready, failed, etc.

One of the following:
"Ready"
"Failed"
"Unknown"
"Deleted"
"Unhealthy"
"BuildOnly"
status_reason: Optional[str]

The reason for the status of the action.

Register Build

import os
from agentex import Agentex

client = Agentex(
    api_key=os.environ.get("AGENTEX_SDK_API_KEY"),  # This is the default and can be omitted
)
agent = client.agents.register_build(
    description="description",
    name="name",
)
print(agent.id)
{
  "id": "id",
  "acp_type": "sync",
  "created_at": "2019-12-27T18:11:19.117Z",
  "description": "description",
  "name": "name",
  "updated_at": "2019-12-27T18:11:19.117Z",
  "agent_input_type": "text",
  "production_deployment_id": "production_deployment_id",
  "registered_at": "2019-12-27T18:11:19.117Z",
  "registration_metadata": {
    "foo": "bar"
  },
  "status": "Ready",
  "status_reason": "status_reason"
}
Returns Examples
{
  "id": "id",
  "acp_type": "sync",
  "created_at": "2019-12-27T18:11:19.117Z",
  "description": "description",
  "name": "name",
  "updated_at": "2019-12-27T18:11:19.117Z",
  "agent_input_type": "text",
  "production_deployment_id": "production_deployment_id",
  "registered_at": "2019-12-27T18:11:19.117Z",
  "registration_metadata": {
    "foo": "bar"
  },
  "status": "Ready",
  "status_reason": "status_reason"
}