# jenssegers/agent

👮 A PHP desktop/mobile user agent parser with support for Laravel, based on Mobiledetect

Repository: https://github.com/jenssegers/agent
Canonical: https://ross.abutalabs.com/products/agent
Homepage: https://jenssegers.com
Language: PHP
License: MIT
License Family: permissive
Topics: user-agent, mobile-detect, robot, browser, platform, accept-language
Last push: 2024-08-05T12:34:44+00:00

## Health v2 (maintenance only)
Score: 23/100 (v2, computed 2026-09-02T17:46:02.011165+00:00)
- activity 0, release rhythm 8, longevity 100
- inputs: {"age_days": 4771, "days_push": 758, "days_rel": null, "gap_med": null, "n_releases_24m": 0}
- flags: none
- formula: round(0.45*activity + 0.35*rhythm + 0.20*longevity); archived -> min(score, 10)

## Adoption (not part of the score)
Stars 4850, forks 538 (observed 2026-08-28T04:09:01.409774+00:00)

## What it is
A PHP user agent parser that identifies browsers, operating systems, devices, robots, and accept languages, built on Mobile Detect with added desktop support. It integrates with Laravel via a service provider and facade.

## Use cases
- detect mobile devices from user agent strings in PHP
- parse browser and OS from a user agent header
- serve different layouts for phones and tablets
- get the visitor's preferred languages from accept-language headers
- detect bots and crawlers visiting a site
- log device and platform info for analytics in a Laravel app

## When to choose
- you need user agent parsing in a PHP or Laravel application
- you want mobile, tablet, and desktop detection in one package
- you need device names, platforms, and browser names from user agent strings

## When to avoid
- you need highly accurate, frequently updated user agent detection for modern devices
- you are not working in PHP
- you need client-side browser feature detection rather than user agent sniffing

## Facets
- artifact type: library
- maturity: maintenance
- function: parser, nlp
- domain: web-development, developer-tools
- platform: php
- tags: user-agent-parsing, mobile-detection, laravel, browser-detection, device-detection, web-server

## Member repositories
- jenssegers/agent (main) score 23

## Provenance
- Observed fields: from GitHub, fetched 2026-08-28T04:09:01.409774+00:00.
- Health v2: computed from the inputs above; adoption is never an input.
- Inferred fields (summary, facets, guidance): AI-extracted, prompt v1, taxonomy v1, on 2026-08-29T18:18:25.094720+00:00, confidence not recorded.
  - readme: https://github.com/jenssegers/agent (fetched 2026-08-28T04:09:01.409774+00:00, sha cdc9e013868d)
  - homepage: https://jenssegers.com (fetched 2026-08-29T09:01:06.629566+00:00, sha f248c41703ca)
  - site_page: https://jenssegers.com/decoupling-releases-from-deploys-using-feature-flags (fetched 2026-08-29T09:01:06.639620+00:00, sha a3f5bde70237)
  - site_page: https://jenssegers.com/speed-up-phpstorm-with-nyan-cat (fetched 2026-08-29T09:01:06.642214+00:00, sha 07a29de58bf3)
  - site_page: https://jenssegers.com/laravel-smtp-driver-vs-api-drivers (fetched 2026-08-29T09:01:06.644443+00:00, sha dbd815356933)
- Data as of 2026-08-30T08:39:29.467469+00:00.
