analyze • AI Agent SDK

analyze: Analyze an image and return analysis.

analyze

Method

</div>

This is a method of the VisionAgent class in the vision_agent module.

Analyze an image and return analysis.

Signature

python
def analyze(image: str, prompt: Optional[str], detail: Optional[str], model: Optional[str]) -> str

Parameters

ParamField str

Image URL or local file path

ParamField Optional[str]

Custom prompt for analysis (default: general analysis)

ParamField Optional[str]

Detail level (low, high, auto)

ParamField Optional[str]

Override model for this call **kwargs: Additional provider-specific parameters

Returns

ResponseField str

Analysis text

Usage

python
agent = VisionAgent()
    result = agent.analyze(
        "https://example.com/chart.png",
        prompt="What trends does this chart show?"
    )

Uses

  • completion

Used By

Source

View on GitHub

praisonaiagents/agent/vision_agent.py at line 209