Documentation Index
Fetch the complete documentation index at: https://docs.meshai.dev/llms.txt
Use this file to discover all available pages before exploring further.
Agent lifecycle management ensures that every AI agent has an expiry date, a review schedule, and a responsible sponsor. Expired and unreviewed agents surface automatically so you can decommission stale agents and enforce periodic access reviews.
Lifecycle Fields
| Field | Type | Description |
|---|
expires_at | ISO 8601 datetime | When the agent authorization expires |
review_frequency | weekly | monthly | quarterly | annually | How often the agent must be reviewed |
sponsor_id | string | The person or team responsible for this agent |
Set Agent Lifecycle
curl -X PATCH https://api.meshai.dev/agents/agt_abc123/lifecycle \
-H "Authorization: Bearer msh_YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"expires_at": "2026-06-30T23:59:59Z",
"review_frequency": "quarterly",
"sponsor_id": "ml-platform-team"
}'
{
"success": true,
"data": {
"agent_id": "agt_abc123",
"expires_at": "2026-06-30T23:59:59Z",
"review_frequency": "quarterly",
"next_review_at": "2026-06-18T00:00:00Z",
"sponsor_id": "ml-platform-team",
"updated_at": "2026-03-18T10:00:00Z"
}
}
You can set any combination of fields — all are optional. Only the fields you include are updated.
List Expired Agents
Returns agents whose expires_at date has passed. Use this to identify agents that need decommissioning or renewal.
curl https://api.meshai.dev/agents/expired \
-H "Authorization: Bearer msh_YOUR_API_KEY"
{
"success": true,
"data": [
{
"id": "agt_old001",
"name": "legacy-support-bot",
"expires_at": "2026-02-28T23:59:59Z",
"sponsor_id": "support-team",
"status": "healthy",
"days_expired": 18
}
],
"meta": {
"total": 1,
"page": 1,
"limit": 25
}
}
List Agents Due for Review
Returns agents whose next review date has passed or is approaching. Use this to enforce periodic access reviews.
curl https://api.meshai.dev/agents/due-review \
-H "Authorization: Bearer msh_YOUR_API_KEY"
{
"success": true,
"data": [
{
"id": "agt_abc123",
"name": "customer-support-agent",
"review_frequency": "quarterly",
"next_review_at": "2026-03-15T00:00:00Z",
"sponsor_id": "ml-platform-team",
"days_overdue": 3
}
],
"meta": {
"total": 1,
"page": 1,
"limit": 25
}
}
Review Frequency Options
| Frequency | Review interval |
|---|
weekly | Every 7 days |
monthly | Every 30 days |
quarterly | Every 90 days |
annually | Every 365 days |
The next_review_at date is automatically calculated from the last review date (or lifecycle creation date) plus the review interval.
Audit Trail
Lifecycle changes are tracked in the audit trail:
| Event Type | Description |
|---|
agent.lifecycle.updated | Lifecycle fields changed (includes old and new values) |
agent.expired | Agent passed its expiry date |
agent.review.due | Agent review is overdue |
Use Cases
- Compliance — EU AI Act requires periodic review of high-risk AI systems. Set
review_frequency to quarterly for high-risk agents.
- Shadow agent cleanup — Set short expiry dates on newly discovered agents to force review.
- Team accountability — Assign
sponsor_id so every agent has a responsible owner.
- Automatic decommissioning — Combine with the kill switch to auto-block expired agents.