Add first-class runtime mode support for long-lived and request-based agent execution
- Dominant language
- TypeScript
- Stars
- 1.3k
- Forks
- 815
- Avg merge
- 13h 31m
- Merged PRs (30d)
- 2
Description
### Language Implementation
- [ ] Python
- [ ] TypeScript
### Feature Type
- [ ] Action Provider Template
- [ ] Wallet Provider Template
- [ ] Framework Extension
- [ ] Core Requirements
- [ ] Other
### 🚀 The feature, motivation and pitch
## Overview
AgentKit agents can run in both long-lived processes (workers, daemons) and request-based environments (serverless, APIs), but the framework does not currently expose explicit runtime modes or helpers optimized for these different execution models.
## Problem Description
Without runtime-specific support:
- Developers must manually adapt lifecycle, retries, and cleanup logic.
- Agents may behave inefficiently in serverless environments.
- Long-lived agents lack clear conventions for persistence and shutdown handling.
## Proposed Solution
Add explicit runtime modes (e.g. `longLived` and `requestScoped`) that adjust default behavior for retries, cleanup, and execution boundaries, while still allowing customization.
### Acceptance Criteria
AgentKit provides clear runtime modes with sensible defaults. Developers can choose the appropriate mode without reinventing lifecycle logic. Existing integrations continue to work without changes.
### Alternatives
_No response_
### Additional context
_No response_
Contributor guide
Assessment
This issue has not been assessed yet.