aws-samples / aws-samples/remote-swe-agents
Limit token usage limit per session
- Dominant language
- TypeScript
- Stars
- 243
- Forks
- 50
- Avg merge
- 1h 19m
- Merged PRs (30d)
- 24
Description
We want to limit the token usage per session (e.g. force stop an agent if it consumes more than $5.)
# Todo
1. Create global config page on webapp. We can rename the current common prompt page for this.
2. Save the pricing threshold on dynamodb.
3. Worker loads the config when starting it's turn.
4. Worker ends it's loop when the cost exceeds the limit.
5. Users can set new cost limit per session to continue the session.
Managing cost limit per session can be too complicated. We'll postpone this implementation until enough feedback is gathered.
Contributor guide
Research direction
Start with the webapp's current common prompt page, then trace how worker turns begin and how session state is stored in DynamoDB. Review the postponed requirements for configuration, threshold persistence, worker stopping, and continuing a session. Done means users can set a per-session cost limit and the worker stops and can continue when the limit is exceeded.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- aws, typescript
- Domain
- backend, cloud, web-dev
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 25/100