Picture a design team arguing for a week in the comments of one Figma file. Should the sign-up button be a pill?
They settle it. The designer deletes the thread to tidy up.
A month later a new hire asks your AI assistant about the button. It answers: "The team agreed on a pill. See the comments."
There are no comments. The thread is gone from Figma. The memory of it is not.
Nothing crashed. The assistant just remembers something that no longer exists, and design decisions are exactly what people ask it about. So for Mergetober I built a Figma connector for Cognee. The code is in PR #372 for issue #4552.
What it does
Cognee turns documents into a knowledge graph an agent can search. The connector feeds it from Figma:
- Each file becomes one document: its type, folder, page names, frame and section names, and the text of every text layer. FigJam stickies count too.
- Each comment thread becomes one document: the comment and its replies in time order with their authors, which frame it is pinned to, and whether it is resolved.
- A deleted file, a deleted comment, or a folder you deselect is forgotten on the next sync.
A Figma file is a canvas, not prose. So geometry, images, hidden layers and default layer names like "Frame 12" are never read. Only the words are kept.
source = figma_source(token, folder_ids=["<folder id>"])
await cognee.remember(source, dataset_name="figma")
Files and their comments share one node set per folder, so a search can be limited to one folder. There is also an optional OAuth integration that plugs into Cognee's connect and folder-picker flow.
What the API does not give you
Figma has no change feed and no delete feed. The folder listing gives each file's last_modified, not its version number. The call that costs is GET /v1/files/:key, the whole node tree, which sits in Figma's strictest rate-limit tier. The docs list 10 to 20 requests a minute for Dev and Full seats, and about 20 a month for View and Collab seats.
It gets worse. Comments do not move a file's timestamp. You cannot list a user's teams. And listing folders needs a private OAuth app, because public apps are not allowed the folders:read scope.
So I treat requests like money.
Cognee does the incremental part by content. A document whose text is unchanged keeps its id and never reaches the LLM again.
Two things my first design got wrong
I found both by reading my own code the way a reviewer would.
It cached too much. The cache kept whole rendered rows, title and folder name included. But a rename or a folder move may not change a file's timestamp. The cache would have kept serving the old title forever. Now the cache holds only what the node tree contributes. The title and folder come fresh from the listing every run.
It could never finish a big team. When Figma returned a 429 that outlasted the retries, the whole run failed. The next run started from zero and hit the same wall. Now at most 100 node trees are fetched per run, and a rate limit stops fetching cleanly. Files not reached keep the text they were last synced with, so nothing is forgotten. The sync counts say so with failed_budget or failed_rate_limit.
I also made it stricter than it needed to be. An empty selection raises, because an empty list must never mean "forget everything". A selection that suddenly lists no files, when files were synced before, raises too.
One more thing came from reviewers on my Stripe connector. A node set per record makes a big graph. So here I used one per folder.
How I tested it
There are 68 tests on Python 3.10 and 3.12. Figma is an in-memory fake behind dlt's real HTTP stack. 8 of them run the whole Cognee pipeline with a mocked LLM: deleted files and comments leave the graph, an unchanged re-sync makes no LLM call, a sync cut short by the budget keeps what it has, and a file and its comments share a node set.
Then I ran it against a real Figma account on the free plan: a folder with two design files and one comment thread with a reply.
The only surprise was timing. My first sync after the edit saw nothing, because Figma saved the change a few seconds after I read the folder. The next run caught it.
What I did not test
The OAuth connect flow, because it needs a private Figma app. Large files and long syncs. I used two small files. Paid plans, and the actual rate limits of the free plan. All of that is covered by the fake, not by Figma.
Try it
The example is packages/connector/figma/examples/example.py. You need a personal access token (Settings, Security) with the scopes file_content:read, file_comments:read, folders:read and file_metadata:read, plus a folder id or a team id.
Use a separate dataset, delete a comment, and see if your assistant lets go.


Top comments (0)