Skip to content

Improve agent detection logic by sniffing agent splash screen #60

@johnstcn

Description

@johnstcn

Thanks for the context @35C4n0r. It sounds like we could potentially improve detection by looking at the process tree (or output matching given that they are unique enough).

Originally posted by @mafredri in #54 (comment)

Problem

Our agent detection logic right now has two phases:

  1. User optionally explicitly specifies agent type
  2. agentapi attempts to detect agent type from CLI command and overrides based on the first argument.

This may not work in some cases, e.g. the command to invoke the agent is a script run_agent.sh that executes an arbitrary agent command.

Proposed Solution

We can improve this logic by "sniffing" the initial output of the agent. Each type of agent outputs a splash screen on startup which can be sniffed for certain magic strings to determine the agent type.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions