Skip to content

[BUG] Error when the agent is trying to take a screenshot but the engine is lightpanda #149

Description

@edenreich

Summary

{"level":"ERROR","timestamp":"2026-07-30T22:47:24.567Z","caller":"tools/take_screenshot.go:111","msg":"screenshot failed","path":"/tmp/playwright/artifacts/fullpage_2026-07-30_22-47-24.567.png","sessionID":"d1e45d02-321d-4a93-840c-8c4a28019985","error":"screenshots are not supported by the lightpanda engine (it has no graphical rendering engine); use a chromium, firefox or webkit image","stacktrace":"github.com/inference-gateway/browser-agent/tools.(*TakeScreenshotTool).TakeScreenshotHandler\n\tgithub.com/inference-gateway/browser-agent/tools/take_screenshot.go:111\ngithub.com/inference-gateway/adk/server.(*BasicTool).Execute\n\tgithub.com/inference-gateway/adk@v0.26.0/server/agent_toolbox.go:228\ngithub.com/inference-gateway/adk/server.(*DefaultToolBox).ExecuteTool\n\tgithub.com/inference-gateway/adk@v0.26.0/server/agent_toolbox.go:159\ngithub.com/inference-gateway/adk/server.(*OpenAICompatibleAgentImpl).executeToolCallsWithEvents\n\tgithub.com/inference-gateway/adk@v0.26.0/server/agent_streamable.go:582\ngithub.com/inference-gateway/adk/server.(*OpenAICompatibleAgentImpl).RunWithStream.func1\n\tgithub.com/inference-gateway/adk@v0.26.0/server/agent_streamable.go:375"}
{"level":"ERROR","timestamp":"2026-07-30T22:47:24.567Z","caller":"server/agent_streamable.go:599","msg":"failed to execute tool","tool":"take_screenshot","error":"screenshot failed: screenshots are not supported by
 the lightpanda engine (it has no graphical rendering engine); use a chromium, firefox or webkit image","stacktrace":"github.com/inference-gateway/adk/server.(*OpenAICompatibleAgentImpl).executeToolCallsWithEvents\
n\tgithub.com/inference-gateway/adk@v0.26.0/server/agent_streamable.go:599\ngithub.com/inference-gateway/adk/server.(*OpenAICompatibleAgentImpl).RunWithStream.func1\n\tgithub.com/inference-gateway/adk@v0.26.0/serve
r/agent_streamable.go:375"}
{"level":"INFO","timestamp":"2026-07-30T22:47:25.889Z","caller":"tools/execute_script.go:140","msg":"executing script","script_hash":"script_42_chars_646f63756d656e742e626f64792e696e6e657248544d4c2e737562737472696e
","args_count":0,"return_value":true,"timeout_ms":30000,"async":false}

Steps to Reproduce

  1. Starting the agent with lightpanda browser engine
  2. The browser agent is instructed it has a tool to take screenshots
  3. The browser agent tries to take a screenshot and fails because it doesn't support it

Expected Behavior

I expect the browser agent to know before hand what is supports and what not to avoid unnecessary tool calls.

Actual Behavior

The browser agent calls a tool that it has available but it's not supported by the configured engine, perhaps we can disable it for the lightpanda OCI and ensure that disabled tools do not show up as available in the system prompt

Additional info

I only asked the orchestrator:

Can you submit a dummy task to fetch the recent 5 blog posts from https://engineering-blog.eden-reich.com?

I didn't mention anything about screenshots, maybe we have instructions about screenshots that could be deleted? only when the user actually need a screenshot it should try to take a screenshot.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't workingreleased

    Type

    Projects

    Status
    Done

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions