Image understanding

Image understanding#

Setting imageModel to a vision-capable one-shot model enables the hosted understand_image(image, prompt) tool.

TypeScript
import { createAgent } from '@coresourceai/sdk';

const visualAgent = createAgent({
  type: 'agent',
  systemPrompt: 'Inspect supplied images before drawing conclusions.',
  model: 'deepseek/deepseek-v4-pro',
  imageModel: 'makora/kimi-2.7-code'
});

const result = await visualAgent.run({
  prompt: 'Read the attached chart and explain its largest change.',
  files: ['./quarterly-chart.png']
});

await visualAgent.close();

The image model is fixed by configuration; the agent cannot change it. The tool accepts a run-local image path, a public HTTPS image URL, or an image data URL and makes a separately metered request through the hosted runtime. Local files are uploaded as run inputs before the hosted tool reads them.