Agents

Each agent represents an AI coding agent environment, and is associated with:

  • a unique agent ID

  • a human-readable name

  • an icon (emoji / unicode character)

  • a detection function

  • various metadata in its info() method

Agent usage

Each agent is materialized by a Agent object, from which you can access various metadata:

>>> from extra_platforms import CLAUDE_CODE
>>> CLAUDE_CODE
Agent(id='claude_code', name='Claude Code')
>>> CLAUDE_CODE.id
'claude_code'
>>> CLAUDE_CODE.current
False
>>> CLAUDE_CODE.info()
{'id': 'claude_code', 'name': 'Claude Code', 'icon': '✴️', 'url': 'https://docs.anthropic.com/en/docs/agents-and-tools/claude-code/overview', 'current': False}

To check if the current environment is running in a specific agent, use the corresponding detection function:

>>> from extra_platforms import is_claude_code
>>> is_claude_code()
False

The current agent can be obtained via the current_agent() function:

>>> from extra_platforms import current_agent
>>> current_agent()
Agent(id='unknown_agent', name='Unknown agent')

Recognized agents

Icon

Symbol

Name

Detection function

✴️

CLAUDE_CODE

Claude Code

is_claude_code()

👾

CLINE

Cline

is_cline()

CURSOR

Cursor

is_cursor()

Hint

The UNKNOWN_AGENT trait represents an unrecognized agent. It is not included in the ALL_AGENTS group, and will be returned by current_agent() if the current agent is not recognized.

Groups of agents

There is only one group defined for agents: ALL_AGENTS, which includes all recognized agents.

Icon

Symbol

Description

Detection

Canonical

🧠

ALL_AGENTS

Agents

is_any_agent()

        ---
config:
  sankey:
    height: 400
    showValues: false
    width: 800

---
sankey-beta

ALL_AGENTS,CLAUDE_CODE,1
ALL_AGENTS,CLINE,1
ALL_AGENTS,CURSOR,1
    
        ---
config:
  mindmap:
    padding: 5

---
mindmap
    ((🧠 ALL_AGENTS))
        (✴️ CLAUDE_CODE)
        (👾 CLINE)
        (➤ CURSOR)
    

Predefined agents

Agent definitions and metadata.

extra_platforms.CLAUDE_CODE = Agent(id='claude_code', name='Claude Code')
extra_platforms.CLINE = Agent(id='cline', name='Cline')
extra_platforms.CURSOR = Agent(id='cursor', name='Cursor')
extra_platforms.UNKNOWN_AGENT = Agent(id='unknown_agent', name='Unknown agent')