Skip to main content
The @agent decorator is used to define agent metadata and information about the runtime environment that will be provisioned to execute it.
@agent(
    name="my-agent",
    required_env_vars=["CLAUDE_API_KEY"]
)
The only required argument for the @agent decorator is the name argument. The name must be unique per workspace; changing the name will create a new agent or overwrite an existing agent if the name already exists.

Arguments

name
string
required
The name of the agent.
required_env_vars
array
The environment variables that are required to run your agent. Automations cannot be enabled when these are not defined.