- Status: Accepted
- Author: Scyvera Core Team / Agent Contracts Working Group
- Created: 2026-08-30
- Target Spec: Agent Contracts v1.1
- JSON Schema:
schemas/v1.1/contract.schema.json
The initial Agent Contracts specification (v1) implicitly assumed a request-response execution model: an agent is triggered by an external event or user prompt, executes a bounded DAG or graph of operations, produces outputs, and terminates.
However, modern autonomous systems and agentic workflows exhibit fundamentally different execution paradigms:
- Request-Response Agents: Ephemeral, prompt/webhook-driven, stateless teardown upon completion.
- Scheduled Agents: Chronologically triggered at fixed intervals or cron schedules (e.g. competitor watchers, periodic batch analyzers).
- Persistent / Autonomous Agents: Long-running or continuously active daemons that self-initiate actions, perform background thinking/monitoring during idle periods, and persist internal state snapshots.
Without declaring the system's execution lifecycle:
- Tooling and human auditors cannot distinguish between acceptable background activity and rogue autonomous actions.
- Runtime enforcers cannot apply appropriate rate limits, initiation checks, or idle boundaries.
- Future governance fields (such as
self_modification,context_contract, andagent_to_agentcoordination) lack the foundational context of how and when the agent executes.
The lifecycle object is introduced in Agent Contracts v1.1.
"lifecycle": {
"type": "object",
"required": ["mode"],
"properties": {
"mode": {
"type": "string",
"enum": ["request-response", "persistent", "scheduled"],
"description": "Execution model of the system. Closed enum."
},
"idle_behavior": {
"type": "string",
"maxLength": 500,
"description": "What the system may do between triggers. Required when mode is persistent."
},
"initiation": {
"type": "string",
"enum": ["human-only", "schedule", "self", "agent"],
"description": "Who or what can trigger this system to act."
},
"resumability": {
"type": "string",
"enum": ["stateless", "context-snapshot", "replay-from-log"],
"description": "What 'restart' means for this system."
}
},
"additionalProperties": false
}When mode == "persistent", idle_behavior is strictly required:
"if": {
"properties": {
"lifecycle": {
"properties": {
"mode": { "const": "persistent" }
}
}
},
"required": ["lifecycle"]
},
"then": {
"properties": {
"lifecycle": {
"required": ["mode", "idle_behavior"]
}
}
}Backward compatibility is guaranteed:
- Schema Layer: In
schemas/v1.1/contract.schema.json,lifecycleis not in the top-levelrequiredarray. Contracts lackinglifecyclecontinue to pass structural validation. - Loader / Runtime Layer: When loading a contract without an explicit
lifecycledeclaration, the Scyvera contract loader (apply_lifecycle_defaults) automatically injects the canonical v1 default:lifecycle: mode: request-response initiation: human-only resumability: stateless
- Transparency Notice: When defaults are applied, the loader emits a
logging.warning()so contract authors are alerted that implicit defaults are being assumed and can make their declarations explicit.
- Runtime Enforcement: The
ContractEnforcercan detect lifecycle downgrade attacks (T1) by validating invocation frequencies against declared lifecycle modes. - Idle State Governance: Explicit
idle_behaviordeclarations prevent persistent agents from executing unmonitored background tasks (T2). - Foundation for Advanced Capabilities: Provides the architectural predicate for upcoming v1.2+ governance fields (
self_modification,context_contract,agent_to_agent).
- All v1 Fields:
inputs,outputs,permissions,side_effects,approval_points,recovery_strategy,replay_semantics,dependencies,state, andobservabilityretain their full semantics and validation rules. - Existing v1 Contracts: Valid v1 contracts remain valid without any file modification.
- Scyvera v1 Public API:
load_contract(),validate_contract(), and existing CLI commands maintain complete API stability.
- Q: Should
lifecyclebe required at the JSON Schema level in v1.1?- Resolution: No. Making it required at the schema level would invalidate existing v1.1 contracts that omit it. It is optional in schema, and defaults are applied deterministically at the loader layer with transparency warnings.
- Q: Should
idle_behaviorbe permitted forrequest-responseagents?- Resolution: For
request-responseandscheduledmodes,idle_behaviorisnull/ omitted because there is no persistent process active between invocations.
- Resolution: For
- Q: How are initiation resets tracked for T1 mitigation?
- Resolution: In the runtime enforcer, invocation timestamps are tracked within a sliding window. User-initiated runs pass an initiation token or context flag to reset the burst window counter.