The team developed an AI agent within Cursor to automate marketing tasks in Yandex Direct. The agent integrates data from Wordstat, Yandex Direct, Yandex Metrica, and Yandex Audience via Python-based MCP servers. It uses a read-only access list for Direct to prevent unauthorized writing operations.

The workflow follows a strict sequence: analysis, generation of a campaign_patch.json file, a dry-run to simulate changes, human review, and final application. To ensure security, the application of changes is blocked if the SHA256 hash of the patch does not match the original approved version.

The agent handles five key processes: audience analysis and JTBD, keyword and demand analysis via Wordstat, drafting ad campaigns, managing target audiences through Yandex Audience, and generating weekly reports. For example, in one account, 35 edit packages were prepared and 26 were approved.

The team is currently testing two methods of approval: written confirmation in the chat or a button in a web panel. The system is designed to ensure that changes are only written to the API after human verification, keeping the process controllable and transparent.