@agent Decorator
The @agent decorator defines a top-level agent container. Agents are the primary unit of deployment and governance in Waxell.
Basic Usage
from waxell_sdk import agent
@agent(
name="support-agent",
description="Handles customer support inquiries",
version="1.0.0"
)
class SupportAgent:
pass
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
name | str | Yes | Unique identifier for the agent |
description | str | No | Human-readable description |
version | str | No | Semantic version string |
capabilities | list | No | List of capability references |
metadata | dict | No | Arbitrary key-value metadata |
AgentSpec
The decorator produces an AgentSpec object that captures your intent:
from waxell_sdk.core.specs import AgentSpec
# The decorator creates this internally
spec = AgentSpec(
name="support-agent",
description="Handles customer support inquiries",
workflows=[...],
decisions=[...],
tools=[...]
)
Governance Integration
Agents are governed by policies defined in the control plane:
- Rate Limits: Control execution frequency
- Approvals: Require human approval for sensitive actions
- Audit: All executions are logged
Next Steps
- @workflow Decorator - Add workflows to your agent
- Tutorials - Build a complete agent