Company Brain: How a Graph on FalkorDB Doubled AI Agent Accuracy Over RAG A company brain built on FalkorDB's graph database scored 80.0 on a 1,203-question held-out test versus 39.2 for retrieval with the same model, while using about a fifth of the tokens, according to results from FalkorDB's Graph Hacks hackathon. The winning Company Brain track entry, inherit-brain by Zeyu Sun, loaded Salesforce AI Research's HERB enterprise dataset into 30 FalkorDB product graphs with 56,708 nodes and 164,698 edges and gave the agent nine fixed read-only Cypher queries via GRAPH.RO_QUERY. The hackathon drew 7,899 developers and 1,213 projects, with 458 teams building agents on FalkorDB in the Company Brain track. Every company has a brain. It's spread across tickets, pull requests, docs, chat threads and a few people's heads. Ask an AI assistant who decided something, why, or whether it still applies, and it finds the paragraph that looks most similar and hopes for the best. Graph Hacks, FalkorDB's online hackathon, drew 7,899 developers and 1,213 projects. In its Company Brain track, 458 teams built agents on FalkorDB that actually understand how an organization works. The best one more than doubled answer accuracy over retrieval, using the same model. Key takeaways. On a 1,203-question test it never saw during development, a company brain built on a FalkorDB graph scored 80.0 against 39.2 for retrieval with the same model, while sending about a fifth of the tokens. The difference comes from questions that cross several hops, like who fixed the bugs customers later reopened. The strongest projects kept every fact linked to its source, tracked whether decisions still stand, and gave agents fixed, read-only queries instead of free-form access. Build your own company brain. Start free on FalkorDB Cloud https://app.falkordb.cloud/signup?cta=cta-top and load your first graph today. What is a company brain? A company brain is a knowledge graph of how an organization works, its people, teams, systems, decisions and documents and the connections between them, that AI agents query to answer questions with evidence. FalkorDB is the graph database underneath, with vector and full-text search in the same engine, read-only queries for agents, and a separate graph per team, product or customer. It's the same idea as giving enterprise AI agents a context layer instead of a bigger context window https://www.falkordb.com/reference/enterprise-ai-agents-context-layer/ . Company brain vs. search over documents | Question | Search over documents | Company brain on FalkorDB | |---|---|---| | Who decided this, and why? | Finds a paragraph that mentions it | Follows the decision to the people and sources behind it | | Does this still apply? | Old and new versions look the same | Follows the chain of what replaced what | | Who fixed the bugs customers reopened? | Guesses from similar text | Joins people, fixes, bugs and dates in one query | | Show me the evidence | Quotes something similar | Returns the path and the source record IDs | | Can the agent change company data? | Depends on the tool | No, it only gets fixed read-only queries | How did Graph Hacks teams build a company brain? 1. Answer the multi-hop questions retrieval gets wrong inherit-brain · Zeyu Sun · See the code https://github.com/zeyusuntt/inherit-brain · Use the app https://zeyusuntt.github.io/inherit-brain/ · Blog https://dev.to/zeyusuntt/what-retrieval-missed-a-company-brain-on-falkordb-tested-on-1203-held-out-questions-3m4m A new maintainer inherits a product and asks a simple question. Who wrote the fixes for bugs that customers later reopened? Answering it means connecting people to pull requests, pull requests to bugs, and bugs to dated reopen events. Retrieval with the same model named four other engineers and scored zero. Zeyu loaded Salesforce AI Research's HERB enterprise dataset into 30 FalkorDB product graphs, 56,708 nodes and 164,698 edges, where every edge keeps the IDs of the records it came from. The agent picks from nine fixed tools that run parameterized Cypher through GRAPH.RO QUERY under a read-only user for each product. Then he froze the graphs and tested on 1,203 questions the system had never seen. MATCH b:Bug WHERE b.reopened = true AND $components IS NULL OR b.component IN $components AND $companies IS NULL OR any x IN b.companies WHERE x IN $companies MATCH pr:PR - fx:FIXES - b MATCH p:Person - op:OPENED - pr MATCH b - hs:HAS EVENT - rs:BugEvent WHERE rs.type = 'RESOLVED' AND pr.link IN rs.fix pr links MATCH b - :HAS EVENT - ro:BugEvent WHERE ro.type = 'REOPENED' AND ro.ts rs.ts RETURN p.eid, p.name, p.role, b.id, pr.link, op.src, fx.src + hs.src, rs.id That join returns the answer in 13 ms, with the source record for every hop. | Approach same model | Score | Median input tokens | |---|---|---| | Graph tools on FalkorDB | 80.0 | 10,117 | | Retrieval tools, same model | 39.2 | 46,451 | | Whole product in one prompt | 26.0 | 125,947 | | Hybrid RAG | 19.2 | 5,176 | In the builder's words. "GRAPH.RO QUERY rejects write queries on the server, so the tools' read-only contract holds even if a tool's Cypher were wrong." Zeyu Sun, inherit-brain Try it. Pick one question your team keeps asking that crosses three systems, and write it as one Cypher query. Start free on FalkorDB Cloud https://app.falkordb.cloud/signup?cta=brain-multihop . 2. Trace every decision to its source, and know if it still stands Lineage · Anmol Gupta · See the code https://github.com/ANMOLGUPTA-24/lineage-agent · Use the app https://anmolgupta-24.github.io/lineage-agent/demo/ · Blog https://medium.com/@anmolgupta.skp/python-already-said-no-tracing-26-years-of-rejected-ideas-with-a-graph-d8060ecc1cba Python's design decisions are public but scattered across 26 years of proposals, forum threads and rulings. So the same ideas, like do-while loops, switch statements and better lambdas, keep coming back, and core developers keep re-explaining old rulings. Every company has its own version of this problem. Lineage turns that history into one FalkorDB graph of 745 PEPs, 1,085 rejected ideas as their own nodes, 1,748 discussion threads and 2,175 people. Ask "has Python already decided this?" and it returns the ruling, who made it, whether the idea came back, quoted sources, and who to ask, with the graph path and the exact Cypher it ran. php MATCH path = p:PEP {number: $n} <- :REJECTED IN - a:Alternative - c:CITES - q:PEP WHERE p - :REJECTS APPROACH OF - q RETURN path, q.number, q.status, a.title, CASE WHEN coalesce c.quote, '' = '' THEN a.text ELSE c.quote END, a.url And to check whether a ruling still stands, it follows the chain of proposals that replaced it to the latest one. MATCH path = p:PEP {number: $n} <- :SUPERSEDES 1..6 - latest:PEP WHERE NOT - :SUPERSEDES - latest RETURN path, latest.number, latest.status ORDER BY length path DESC In the builder's words. "Vector search, full-text search and graph algorithms in one engine. A question can go from a semantic match straight into a multi-hop traversal without a second datastore or a sync job between them." Anmol Gupta, Lineage Try it. Add a SUPERSEDES edge every time a decision or policy changes, and your agent will always know which one is current. Start free on FalkorDB Cloud https://app.falkordb.cloud/signup?cta=brain-decisions . Three more company brain ideas worth stealing Fix the answers you already gave. Ripple, by Sahil Mane and Harsh Gupta, records every answer its assistant gives as an edge in a FalkorDB graph to the exact version of the fact it used. When a policy changes, one traversal finds every person, agent and cached plan still holding the old version, blocks stale agent actions, and goes back to tell people "Earlier I told you..." Watch the demo https://youtu.be/JopDbxaT04o . Join systems that never talk to each other. Blackbox, by Divyam Singh and Manish Modak, puts 4,235 NTSB accident investigations and 225,627 FAA maintenance reports into one FalkorDB graph, joined by aircraft and by location on the airframe. For Southwest Flight 812, it shows cracks on the same stringer line rising from 9 to 18 to 31 aircraft in the years before the 2011 rupture. Watch the demo https://youtu.be/knjB0BusVGM . Keep docs true to code. Staleproof, by Raj Karia, indexes code and docs across repositories into one FalkorDB graph. When a function changes, it follows the calls to every doc paragraph and code example that the change could make wrong, even in another repository. In one test across three repos, it reached 120 affected doc sections, 46 of them outside the repo that changed. Watch the demo https://youtu.be/9G OtgPoeBg . Building agents that need to remember, not just look things up? Read 5 agent memory patterns from 647 Graph Hacks projects https://www.falkordb.com/blog/ai-agent-memory-graph-patterns/ . Frequently asked questions What is a company brain? A company brain is a knowledge graph of how an organization works, including its people, teams, systems, decisions and documents, that AI agents query to answer questions with evidence. It answers questions like who decided something, whether it still applies, and who knows a part of the system. How is a company brain different from RAG? RAG finds text that looks similar to a question. A company brain stores how facts connect, so it can answer questions that cross several hops and show the path behind the answer. In one Graph Hacks test with the same model, graph tools scored 80.0 and retrieval tools 39.2 on 1,203 held-out questions. Read more on where the GraphRAG accuracy gap comes from https://www.falkordb.com/reference/graphrag-vs-vector-rag-accuracy-gap/ . How do you keep a company brain up to date? Store changes as new facts linked to the ones they replace, instead of overwriting. Then the agent can tell what is current, and you can find everyone who was told the old version. How do you stop an AI agent from changing company data? Give the agent a small set of fixed, parameterized queries instead of free-form database access, and run them read-only. On FalkorDB, GRAPH.RO QUERY rejects writes on the server, and each team or product can have its own graph and read-only user. How do I build a company brain on FalkorDB? Start with one question your team keeps asking, load the systems that answer it into one graph joined on shared IDs, and expose a few read-only queries to your agent through the FalkorDB MCP server or the Python or Node.js client. Give your agents a company brain Every project here runs on the same FalkorDB you can start with one Docker command, docker run -p 6379:6379 -p 3000:3000 -it --rm falkordb/falkordb:latest , or a free cloud instance. Load two systems your team uses, join them on one shared ID, and ask the question nobody can answer today. Start free on FalkorDB Cloud https://app.falkordb.cloud/signup?cta=cta-bottom Not ready to build yet? Join the FalkorDB Discord https://discord.gg/Y2mMT9VdMy to get help from our engineers, share what you build, and hear about the next Graph Hacks first.