PHPackages                             flextype-components/agent - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Utility &amp; Helpers](/categories/utility)
4. /
5. flextype-components/agent

ActiveLibrary[Utility &amp; Helpers](/categories/utility)

flextype-components/agent
=========================

Agent component provides a simple way to detect the kind of device that made the request.

v1.1.1(8y ago)031MITPHPPHP ^7.1.3

Since Apr 12Pushed 8y ago1 watchersCompare

[ Source](https://github.com/flextype-components/agent)[ Packagist](https://packagist.org/packages/flextype-components/agent)[ Docs](https://github.com/flextype-components/agent)[ RSS](/packages/flextype-components-agent/feed)WikiDiscussions master Synced 3d ago

READMEChangelog (1)DependenciesVersions (2)Used By (0)

Agent Component
===============

[](#agent-component)

[![version](https://camo.githubusercontent.com/98461fd39a6ad414ce4f6539d637885f04a4138fba65a452d579c06fa284c719/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f76657273696f6e2d312e312e312d627269676874677265656e2e7376673f7374796c653d666c61742d737175617265 "Version")](https://camo.githubusercontent.com/98461fd39a6ad414ce4f6539d637885f04a4138fba65a452d579c06fa284c719/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f76657273696f6e2d312e312e312d627269676874677265656e2e7376673f7374796c653d666c61742d737175617265)[![MIT License](https://camo.githubusercontent.com/942e017bf0672002dd32a857c95d66f28c5900ab541838c6c664442516309c8a/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f6c6963656e73652d4d49542d626c75652e7376673f7374796c653d666c61742d737175617265)](https://github.com/flextype-components/agent/blob/master/LICENSE)

Agent component provides a simple way to detect the kind of device that made the request.

### Installation

[](#installation)

```
composer require flextype-components/agent

```

### Usage

[](#usage)

```
use Flextype\Component\Agent\Agent;
```

Returns true if the user agent that made the request is identified as a mobile device.

```
if (Agent::isMobile()) {
    // Do something...
}
```

Returns true if the user agent that made the request is identified as a robot/crawler.

```
if (Agent::isRobot()) {
    // Do something...
}
```

Returns TRUE if the string you're looking for exists in the user agent string and FALSE if not.

```
if (Agent::is('iphone')) {
     // Do something...
}

if (Agent::is(array('iphone', 'ipod'))) {
    // Do something...
}
```

License
-------

[](#license)

See [LICENSE](https://github.com/flextype-components/agent/blob/master/LICENSE)

###  Health Score

25

—

LowBetter than 37% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity4

Limited adoption so far

Community8

Small or concentrated contributor base

Maturity58

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 100% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Unknown

Total

1

Last Release

2954d ago

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/477114?v=4)[Sergey Romanenko](/maintainers/Awilum)[@Awilum](https://github.com/Awilum)

---

Top Contributors

[![Awilum](https://avatars.githubusercontent.com/u/477114?v=4)](https://github.com/Awilum "Awilum (6 commits)")

---

Tags

agentcomponentflextypeflextype-componentphpuser-agentAgent

### Embed Badge

![Health badge](/badges/flextype-components-agent/health.svg)

```
[![Health](https://phpackages.com/badges/flextype-components-agent/health.svg)](https://phpackages.com/packages/flextype-components-agent)
```

###  Alternatives

[jenssegers/agent

Desktop/mobile user agent parser with support for Laravel, based on Mobiledetect

4.8k67.8M440](/packages/jenssegers-agent)[maestroerror/laragent

Power of AI Agents in your Laravel project

630106.4k](/packages/maestroerror-laragent)[symfony/ai-agent

PHP library for building agentic applications.

30536.7k44](/packages/symfony-ai-agent)[llm-agents/agents

LLM Agents PHP SDK - Autonomous Language Model Agents for PHP

16410.9k9](/packages/llm-agents-agents)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
