Allow unlimited custom agents in local environment mode

Co-authored-by: sharath <sharath@kortix.ai>
This commit is contained in:
Cursor Agent 2025-08-11 07:00:26 +00:00
parent 23514db06d
commit 97c1334e6f
2 changed files with 11 additions and 0 deletions

View File

@ -142,6 +142,16 @@ async def check_agent_run_limit(client, account_id: str) -> Dict[str, Any]:
async def check_agent_count_limit(client, account_id: str) -> Dict[str, Any]:
try:
# In local mode, allow practically unlimited custom agents
if config.ENV_MODE.value == "local":
logger.debug(f"Local mode detected - bypassing agent count limit for account {account_id}")
return {
'can_create': True,
'current_count': 0, # Return 0 to avoid showing any limit warnings
'limit': 999999, # Practically unlimited
'tier_name': 'local'
}
try:
result = await Cache.get(f"agent_count_limit:{account_id}")
if result:

View File

@ -272,6 +272,7 @@ class Configuration:
_MAX_PARALLEL_AGENT_RUNS_ENV: Optional[str] = None
# Agent limits per billing tier
# Note: These limits are bypassed in local mode (ENV_MODE=local) where unlimited agents are allowed
AGENT_LIMITS = {
'free': 2,
'tier_2_20': 5,