Skip to content

Track distributed agent decision limiter storage #13

@JOY

Description

@JOY

Context

PR #10 adds in-memory per-player rate limiting and daily token budgeting for /v1/agent/decide. That is acceptable for the current single-gateway prototype, but it does not coordinate usage across multiple gateway instances.

Required Before Scaling

  • Move agent decision request limits to Redis or another shared store.
  • Move daily token budgets to a shared atomic counter keyed by trusted player identity.
  • Preserve local disabled-limit behavior when config values are zero for development.
  • Add tests for concurrent budget increments and retry-after behavior.

Notes

This is intentionally tracked outside PR #10 so the current prototype can enforce budget gates without introducing distributed infrastructure prematurely.

Metadata

Metadata

Assignees

No one assigned

    Labels

    area:ai-agentOffline player agent, NPC intelligence, and agent observabilityarea:gatewayGo LLM gateway and provider routingpriority:p2Important but not blocking current milestonesize:mMedium task

    Type

    No type

    Projects

    Status

    Backlog

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions