Skip to content

Instantly share code, notes, and snippets.

@davidmezzetti
Created April 17, 2025 15:46
Show Gist options
  • Save davidmezzetti/1bd2581eb112252f56d63a420454b40c to your computer and use it in GitHub Desktop.
Save davidmezzetti/1bd2581eb112252f56d63a420454b40c to your computer and use it in GitHub Desktop.

Browser automation with Playwright

This example adds the Playwright MCP service to txtai agents.

Start the Playright MCP server locally.

npx @playwright/mcp@latest --port 8931

Run a txtai agent with browser automation access.

from txtai import Agent

agent = Agent(
    tools=["http://localhost:8931/sse"],
    model="LLM path (LLM API (OpenAI, Anthropic), Local LLM, GGUF path"
)

agent("Research summer vacation options")
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment