I’d like to be able to manage my Kagi settings through an API so an AI agent can do it for me. Something like telling it “create a Ruby lens with these sites” or “block these content farms” and having it just happen.
Right now this is a real blocker between me using Kagi and taking it seriously. Most of Kagi’s value comes from customising it, but doing that by hand through the settings pages is slow enough that I haven’t, so in the trial it felt close to Google so i'm really on the fence about using Kagi long term.
The Search API already inherits lenses and domain rules from the account, so the read side exists. What’s missing is being able to create and edit them. People are already working around this, kagi-cli does it by scraping the settings pages with a session token, which isn’t something I want to hand to a third-party tool.
I’d use an AI agent to manage my settings by prompt. For example, “make a Rails lens with the API docs, guides, GitHub and rubygems” and ask questions "is there anything else i should include/have missed that you would recommend included in this lense" or “block that site and anything like it” while I’m working, without opening the settings pages.
Similar setups elsewhere: Brave Goggles and uBlock filter lists are shareable plain text rules, and GitHub, Linear and Notion offer scoped APIs plus MCP servers so agents can use them.
The Search API already reads my lenses and domain rules, so this just adds the write side: create, update and delete endpoints for lenses, domain rules, bangs and redirects, with a settings-only scoped key. An official MCP server would make it work with AI tools straight away.