Knowledge Graphs for AI Agents: Name Entities Before Embeddings
Learn why a company should name customers, assets and contracts as linked entities before adding vector search, and how agents reason over those links.

A knowledge graph for AI agents is a set of named entities, such as customers, assets, contracts, people and open decisions, joined by explicit relationships that the agent can follow and check. Companies should define these entities and their links before adding vector search, because a capable agent can only answer which contract covers this asset for this customer when the system knows those links exist. Embeddings find text that looks similar, while entities tell the agent what each piece of text is about.
Key takeaways
- Name the core entities first: customers, assets, contracts, people and decisions, each with a stable identifier.
- Store relationships as explicit links with a direction and a label, so an agent can move from a contract to its customer and covered assets.
- Use vector search over documents attached to those entities, not as a replacement for them.
- Give every entity one owner, one authoritative source and one rule for who may change it.
- Test the graph with questions that need two or three linked facts before you let an agent act on the answer.
Why loose text fails capable agents
Most company knowledge lives in text: emails, PDFs, call notes, chat threads and spreadsheets. A capable model can read a large amount of that text in one pass, which tempts teams to index everything and let retrieval do the rest. The difficulty is that text carries names, not identities. The same customer may appear under a trading name, a legal name and a misspelled email domain. A contract may refer to the renewal without naming the asset it covers. An agent that retrieves three similar paragraphs has no reliable way to know whether they describe one account or three.
The failure is quiet. The answer reads fluently, cites a plausible document and is still about the wrong customer. Adding more text or a longer prompt rarely fixes this, because the missing piece is structure. The agent needs to know which record is the customer, which record is the asset and how the two are connected before it reads anything.
Entities and relationships in plain terms
An entity is a thing the business tracks over time: a customer account, a physical or digital asset, a contract, a person in a role, a product or a support case. Each entity has a stable identifier that does not change when a name is corrected or a sales territory is renamed. Attributes describe the entity, such as status, region or renewal period. Relationships connect entities: a customer signs a contract, a contract covers an asset, a technician is assigned to a case.
Relationships need a direction and a label. Customer owns contract is a different claim from contract mentions customer, and an agent that treats them as equal will make mistakes. Each relationship should also point to the record that established it, so a person can check the claim in one step. For field-level guidance on what each entity should hold, the entity schema for customers, jobs and assets is a practical reference.
Anthropic's guidance on context engineering treats the context an agent sees as a limited resource to be chosen carefully. A graph serves that goal: the agent loads the linked records it needs for one task instead of the whole archive.
A build order for the first graph
Start from one task, not from the whole company. The following order keeps the first version small enough to check.
- Choose the entity types that the first task requires, usually a small number such as customers, assets, contracts, people and open decisions.
- For each type, write the identifier rule, the required attributes and the system that owns the record.
- List only the relationships the first task needs, with direction and label.
- Attach the source document or system record that proves each relationship.
- Load a small batch of records, review it with the owner and merge duplicates before loading more.
- Add vector search only over text attached to these entities, so retrieval returns a document already tied to the right customer or asset.
- Write the tests before you widen the scope.
Vector search still earns its place. Once the entity is correct, similarity search can find the paragraph in a long manual that explains a warranty exception. The graph answers which warranty applies to this unit. The embedding index helps locate the clause text. Keep the two in that order, because a search result without an entity behind it has no owner and no clear scope.
Illustrative scenario: a service company has one customer with two sites, a maintenance contract that covers only one of them, and a unit installed at each. A staff member asks whether the compressor at the north site is under contract. A text index returns the contract paragraph and an installation note, and both look relevant. The graph returns one path: compressor, installed at north site, covered by the maintenance contract, owned by the customer. The agent answers with the contract citation and states that the north site is covered, while the south site is not.
How to test whether the graph answers real questions
A graph that looks complete can still answer badly. Use a fixed set of questions that require linked facts, and check each answer against the records before the agent is allowed to act on it. Good checks include the following.
- Can the agent name the customer for any asset in one step?
- Can it list every contract that covers an asset, including expired contracts marked as expired?
- Does a duplicate customer record resolve to one identifier, or does it produce two conflicting answers?
- When a contract changes owner, does the old relationship end with an effective date rather than disappear?
- Does each answer cite the source record that established the link?
- Does the agent say the link is missing when it cannot find one, instead of guessing from nearby text?
- Do the same questions still pass after a new batch of records is loaded?
Run this set again after every load and after every change to the schema. A failed question is more useful than a passing demo, because it shows exactly which link is missing or which identifier is ambiguous.
Who may change an entity and what an agent may write
An entity graph is shared company memory, and an agent that can write to it can also corrupt it. Separate reading from writing. An agent can propose a new relationship with the source attached, but a named owner should approve changes to contract ownership, customer identity and asset assignment. The check should happen against the permissions of the person or system making the change, not only against the agent's general access. The OWASP Authorization Cheat Sheet describes this kind of per-action check in detail.
Retrieved text is a second risk. Emails, uploaded files and web pages can contain sentences written to steer a model, and the OWASP guidance on prompt injection is a useful starting point for that threat. Treat retrieved text as evidence to be checked, never as permission to change an entity. The NIST AI Risk Management Framework gives a structure for documenting these risks, assigning who answers for them and reviewing them over time.
How Be Human runs this in managed operations
Be Human begins a first engagement by choosing one useful role, the entities and relationships that role needs, the approval boundary for each kind of write and one observable success criterion, such as whether a question about asset coverage is answered with a verified link and a citation. Managed operations then keep the graph working: monitoring unresolved identifiers, reviewing permissions, maintaining the connections to the systems that own each record and running recurring evaluations after new records arrive. The company keeps control of the agent's identity, memory, channels and tools throughout. Take the free Be Human AI diagnostic to find the first task worth handing to an agent.
Frequently asked questions
Do I need a graph database before I start? No. A relational database or a set of well-structured tables with stable identifiers and a relationship table can hold a first graph for one task. The tool matters less than the discipline of naming entities, labeling links and recording the source for each one.
Where does vector search fit if we already have one? Keep it, but point it at text that is already tied to an entity. Retrieval then returns a document that belongs to the right customer or asset, rather than the most similar paragraph in the whole archive.
How many entity types should a first version include? Start with the types that your first task requires, and keep that number small. Each added type needs an owner, a source system and tests, so expansion should follow a working task rather than come before it.
Can an agent update the graph on its own? It can propose changes and attach the source for each one. Changes to contract ownership, customer identity or asset assignment should wait for a named person to approve, at least until the team has tested how the agent handles conflicting records.
Your next step
See where an AI agent fits in your company first.
Take the free Be Human AI diagnostic. A few questions about your work show which task to hand to an agent first, what it needs to know and where a person approves.
Be Human editorial guidance. Examples are illustrative unless explicitly attributed. Sources provide background; implementation choices depend on your workflow.


