AWS Builder Center

Company Brain: Building a Memory for Teams That Never Stops Changing

Company Brain is a FalkorDB-powered context graph that connects conversations, tickets, documents, people, and pull requests. It detects when a team’s latest decision no longer matches the ticket or code, then gives humans and AI agents the evidence they need to act on the right version of the requirement.

The Problem Wasn’t a Lack of Information

Building Company Brain, a context graph that helps teams and their coding agents keep up with how decisions change.
Most teams don’t have too little information. They have information in too many places.
A product decision happens in Slack. The ticket still reflects last week’s requirement. The design document has another version. A pull request implements something slightly different. Then someone asks, “What are we actually building?”
The answer exists. It’s just scattered across tools, messages, and people’s memories.
That gap becomes more consequential when an AI coding agent joins the workflow. Give an agent an outdated ticket and it may confidently build exactly what the ticket says and still build the wrong thing.
That was the problem behind Company Brain.
The project began with a question: What if a team could connect its conversations, requirements, documents, and code into a living map of how decisions evolve?

Context is more than a collection of documents

Company Brain uses FalkorDB to represent team context as a graph.
The graph contains people, messages, decisions, requirements, tickets, documents, features, pull requests, projects, teams, and client deliverables. More importantly, it records how those things relate.
A message can change a requirement. A requirement can amend a ticket. A pull request can implement a particular version of that requirement. A project can depend on the feature, and a client deliverable can depend on the project.
That means the system can follow a decision through the work it affects.
Two relationships became especially important: SUPERSEDES and IMPLEMENTS.
When a requirement changes, Company Brain doesn’t overwrite the old version. It keeps the history and links the new version to what came before. A pull request can then be connected to the specific version it implemented.
That makes it possible to ask more useful questions than “What does the ticket say?” For example:
  • What did the team decide earlier?
  • What replaced that decision?
  • Did a pull request implement an older requirement?
  • Has the newest decision reached the ticket and documentation?
Keeping the history turned out to be essential. Without it, the system could see the latest text, but couldn’t reliably explain how the team got there.


Turning scattered tools into one graph

The first engineering challenge was bringing data from different tools into a consistent model.
Company Brain includes connectors for Slack, Discord, GitHub, ticket systems, documents, and Google Drive. Each connector translates its source data into a shared event format. From there, the pipeline identifies entities, extracts possible decisions or requirement changes, resolves relationships, and stores the resulting graph in FalkorDB.
Writes are idempotent: nodes are merged using stable identifiers, so rebuilding the graph doesn’t create another copy of every message. This matters because the project supports both a synthetic demo company and real repositories or team integrations. Replaying the same inputs should produce the same logical graph.

When a conversation moves ahead of the ticket

The main feature is the Drift Monitor.
Drift happens when a newer decision in a conversation hasn’t reached the requirement recorded in a ticket or when the code still reflects an older version.
Imagine a ticket that says:
Export tickets created in the last 30 days.
Later, a product manager writes in Slack:
The export should support any date range up to 12 months and include every custom field.
If the ticket remains unchanged and a pull request still implements the 30-day version, the work has drifted from the decision.

The monitor looks for a requirement that came from a conversation, remains the newest version, hasn’t been superseded or explicitly dismissed, and hasn’t been implemented by a pull request. It doesn’t simply treat the latest message as the truth. “Should we also support XLSX?” is a proposal, not necessarily a decision. A cosmetic ticket edit shouldn’t erase a meaningful requirement change.
Each drift alert comes with evidence: who made the decision, where it was made, the previous requirement, the affected ticket, any stale pull requests or documents, and the graph path connecting them.
The goal is for an alert to be explainable. A team should be able to inspect why the system raised it instead of being asked to trust a mysterious score.



Seeing a feature’s history at a glance

A graph is useful for connecting facts. A timeline can make those connections easier to understand.
Company Brain’s feature timeline places ticket versions, chat changes, documents, and pull requests on one time axis. It highlights the period when the conversation moved ahead of the ticket or implementation.
That view helps answer questions such as: When did the requirement change? Was the pull request created before or after that decision? How long did the work remain out of sync? Did the documentation catch up? Which version was eventually shipped?
Instead of searching through hundreds of messages, someone can see the feature’s evolution in one place.


Letting people and agents ask the graph

Company Brain also includes a graph-powered question-answering layer. People can ask who made a decision, what replaced the original requirement, who knows a particular area, what work is blocked, or which client deliverables could be affected by a delay.
The agent doesn’t get unrestricted access to the database. It uses fixed, read-only tools backed by FalkorDB queries, including  current_spec ,  drift ,  who_knows ,  decision_history ,  impact , and  find .
Answers include the graph paths used to produce them. That matters because a useful answer should point back to the decision, ticket, pull request, or source message behind it.
It also enables one of the project’s most important demonstrations: giving a coding agent the current specification before it starts work.
Without Company Brain, the agent reads the stale BD-101 ticket and implements the old requirement: a 30-day export with five columns.
With the MCP server connected, the agent calls  current_spec("BD-101") . It finds the newer Slack decision, learns that the export should support a range of up to 12 months and include custom fields, and sees that an existing pull request shipped the older behavior.
The agent didn’t become more intelligent. It had better context.
Company Brain acts as a memory layer between an organization’s scattered decisions and the agent writing code.


Keeping the graph current

A company brain that’s accurate only at startup quickly becomes outdated itself.
Company Brain uses webhooks and live integrations to keep the graph updated. Slack and Discord messages can trigger drift checks. Ticket edits create new requirement versions. GitHub pull-request webhooks connect implementation to requirements. Document updates refresh mentions and embeddings.
Server-Sent Events push changes to open dashboards. The API also uses FalkorDB’s Redis compatibility for event-bus communication between processes, so a bot-detected drift can appear in the dashboard without a manual refresh. Each organization has its own isolated FalkorDB graph, with organization-scoped caches and live events.

The hard parts were about meaning

The most difficult problems weren’t simply about connecting tools. They were about deciding what the data meant.
A message isn’t automatically a decision. A ticket edit isn’t automatically a supersession. A pull-request reference isn’t always proof of implementation.
Natural language is ambiguous. “Should we support XLSX?” is a question, not an approved requirement. “I’d like to work on this” signals interest, not a change in scope. Company Brain’s extraction layer uses heuristic rules and an optional OpenAI-compatible LLM, along with decision rights: for certain requirement changes, only relevant ticket creators or assignees can make them.
Pull requests are also not always explicit about what they implement. Not every one says “Fixes BD-101.” When there’s no direct ticket reference, the system can use graph proximity author, open tickets, related features, timing, and surrounding context to find a possible connection. That link is less certain than an explicit reference, so the graph records how it was resolved.
Even graph traversal needs care. A naïve shortest-path query can return a technically valid but unhelpful answer if many entities connect through a central feature hub. For “how are these connected?” queries, the system uses bidirectional path logic and avoids paths that pass through a generic hub just to look short.
And real team data is messier than a controlled demo. Code review comments, status updates, proposals, and explanations can resemble requirement changes. For that reason, automated drift flags from real data are candidates for human review, not unquestionable truth.

Measuring what the graph contributes

Company Brain includes ablation tests that disable important graph relationships. When version reasoning through  SUPERSEDES  and  IMPLEMENTS  is removed, false alerts increase significantly. Ticket IDs alone aren’t enough: one ticket can be associated with several versions of a requirement.
In a synthetic stress test with more than 22,000 nodes, the system found all planted drifts. The whole-graph drift query ran at a median of approximately 39 milliseconds in that test.
There’s an important qualification: a comparable SQLite version can detect the same drift when given the same extracted facts. That result changed how I describe the project. The breakthrough wasn’t simply choosing a graph database.
FalkorDB’s value was in the combination of flexible relationships, version history, explainable traversal, variable-depth queries, graph exploration, and the ability to add entity types without redesigning every table. The graph made those connections natural to represent and investigate.

What I learned

The hardest part of Company Brain wasn’t connecting an LLM. It was deciding what counted as a decision, what it replaced, and what evidence would justify linking it to the work.
That distinction shaped the entire system. A useful context layer has to preserve uncertainty as well as history. It needs to show why it thinks two things are connected, and leave room for a person to correct it.
Company Brain started as a way to detect stale tickets. It grew into a broader context layer for explaining decisions, surfacing risks, generating current specifications, and giving coding agents a more accurate picture of the work they’re about to do.
The central idea is simple:
Software teams don’t just need more information. They need the relationships between their information.
That’s what Company Brain is designed to preserve.
Any opinions in this article are those of the individual author and may not reflect the opinions of AWS.
Enjoyed reading this content? Let the author know!

Your likes, comments, shares, and saves help creators reach more builders.

Loading recommendations

Loading article