INNER CODE UNIT · Python

list_watchers

bunkeriot/BunkerM · backend/app/agent-api/main.py:274

async def list_watchers(x_api_key: str = Header(...)):
    _auth(x_api_key)
    with _lock:
        data = _load_agents()
    return {"watchers": data["watchers"]}


@app.post("/watchers", status_code=201)
async def create_watcher(body: WatcherCreate, x_api_key: str = Header(...)):
    _auth(x_api_key)
    _require_activation()
    with _lock:
        data = _load_agents()
        total = len(data["watchers"]) + len(data["jobs"])
        if total >= COMMUNITY_MAX_AGENTS:
            raise HTTPException(
                status_code=403,
                detail=f"Community limit: max {COMMUNITY_MAX_AGENTS} agents. Upgrade at bunkerai.dev",

View source record →

📰 Research Paper
Loading…
⏳ Fetching content…