Blog

Engineering

Agent Policies: How Cogent Turns Organizational Context into Security Rules

Agent Policies discovers how your organization works and it turns that context into rules your team can review and apply in Cogent.

10min read

Karan Gugle

Member of Technical Staff

Karan Gugle

Member of Technical Staff

Handwritten Rules

Configuring traditional security software meant teaching it how your organization worked. Your team had to establish which systems mattered, who owned them, and what made a finding urgent, then keep those answers current. Customers have described 18-month deployments and thousands of rules written by hand.

Rule builders and query builders gave security teams a way to turn organizational knowledge into repeatable decisions. But the team still had to find that knowledge: reconcile a scanner record with a business system, work out which field represented an accountable owner, and track down the exception buried in an operating procedure. Writing the query came after much of the hard work.

Every reorganization, new cloud account, or integration change meant revisiting those rules. A query could keep executing successfully while quietly missing the population it was supposed to cover.

That missing context has consequences. A security team cannot prioritize a system properly when it knows nothing about its business role or the data it holds. We already put agents to work investigating vulnerabilities and planning remediation. Configuring the tools those agents depend on deserves the same attention.

Put Agents to Work

Agent Policies uses background agent swarms to discover how an organization operates and express that understanding as rules. These agents run hundreds of investigations a day across your policies, drawing on connected sources to develop and test candidate rules before bringing the evidence and expected impact to your team for review.

This is part of DefenseOS, the context and execution layers behind Cogent's Cyber Defense Factory. The Context Engine connects assets, findings, systems, and teams so agents can reuse what other investigations have established. Agent Policies builds on those relationships to codify the organization's decisions about asset context, risk scoring, prioritization, and remediation.

A policy can determine a system's business criticality, identify the team accountable for an asset, or establish how findings should be routed. Depending on the policy, its rules can return a single value, contribute multiple values, or establish relationships in a graph. Those outputs become context that other security work can use.

The engineering challenge is making this work repeatedly across a changing enterprise. We need agents that can understand unfamiliar source data, discover a pattern that applies beyond a handful of examples, and test its consequences before asking anyone to approve it.

The Asset Owners policy combines service-specific exceptions, approved assignments, and rules drawn from connected sources. Expanding the Jira rule reveals how the owning-team field, service catalog, and GitHub manifest support assigning Payments API’s linked assets to Payments Platform.

Specialist Agent Swarms

Each policy tile gives a specialist agent a defined area of responsibility. Ownership, data sensitivity, business criticality, and remediation routing require different judgments, even when they draw on the same underlying records. An ownership agent needs to distinguish the person assigned a ticket from the team accountable for a service. A data sensitivity agent needs to understand what the service stores and processes.

We configure these specialists with domain instructions, relevant tools, Integration Skills, and the current policy. Those skills capture our solutions engineers' collective experience across hundreds of enterprise deployments: which queries expose useful fields, how to break an inventory into meaningful groups, where a vendor's terminology is misleading, and which API behaviors require special handling. That experience is available to the agent when it investigates a new environment.

The skills matter even when a customer has not documented every operating procedure. They give agents useful starting points and ways to interpret vendor data, while customer records and instructions establish which conventions apply in that organization. A broadly useful vendor mapping and a customer-specific exception can coexist in the same policy.

The specialists use Integration Skills to query MCPs and share what they learn through the Context Engine. An established relationship between a service, its assets, and its team can support several investigations, so every agent does not have to reconstruct it independently. Agents read prior work, contribute new context, and retain access to the underlying sources when a relationship needs checking.

Specialist agents consult MCP tools, documents, and exports while sharing the Context Engine. They investigate different policy areas in parallel, reuse established relationships, and contribute findings that help other specialists continue the work.

Decoding Raw Data

We build MCPs for every source integration, with tools that let agents explore raw data directly. An agent can filter and paginate through an inventory, retrieve an entity's full record, and inspect nested fields or related entities as it follows a lead.

An integration's documented schema is only a starting point. Enterprise tools have custom fields, nested objects, account-specific settings, and different representations of the same entity. A list endpoint may return a convenient summary while the details needed for a policy live behind another query.

Source Sampling collects tens of thousands of records per source entity type and tracks how their schemas evolve. The sampling agent uses Integration Skills and source documentation to explore the available representations. It tests whether a different field selection or detail request reveals useful information, then preserves the richer original response. If the result is large, it can collect smaller pages without stripping out the fields the investigation needs.

The selection of records matters as much as their shape. Sampling only the newest records, the first page, or one account can hide entire classes of behavior. The sampler slices and dices the data to capture both common patterns and less frequent cases that a single query might miss. It records what it collected and where coverage remains limited, so subsequent runs can continue the work.

A Jira custom field is a familiar example of schema evolution. One organization may store an owning team in customfield_10452, a selected option with an id and a display value; another may represent the same concept differently. As the sampler observes new fields and richer records, Cogent updates its source understanding and exposes versioned contracts to rule authors. An omitted field is not silently treated as a negative answer.

Source Sampling runs multiple times a day, refreshing this foundation as integrations change. Agents get representative data they can inspect and evaluate without fetching every record again for each experiment. The samples retain their update history and scope, which also tells us when an investigation needs fresher or broader evidence.

A Source Sampling agent finds System owning team on a Jira issue, with the option value Payments Platform and Service ID payments-api. Cogent updates its observed schema, making the newly observed field and representative record available to the Asset Owners agent.

Hunting for Patterns

A useful investigation starts by choosing where to spend effort. In Rule Discovery, the agent reads the current policy, pending suggestions, available coverage information, and relevant organizational context. A large unclassified population, a newly uploaded procedure, or evidence that no longer agrees with an existing assumption can give it a starting point. Rule Discovery runs hundreds of times per day across all policies.

From there, it follows several possible explanations. It queries source records, checks related entities in the Context Engine, reads supporting documents, and returns to the raw data when a hypothesis needs more evidence. A promising lead may turn out to describe a ticket workflow rather than ownership, or a naming convention may break across accounts. The agent can abandon that lead and investigate another.

We want the investigation to find a reusable relationship. Reasoning separately about every entity would repeatedly pay for the same discovery. A rule based on a stable source attribute or a documented operational role can cover both the entities we have seen and future entities that satisfy the same conditions. The agent checks the scope against existing rules so it does not confuse rediscovering a covered population with closing a gap.

Exceptions are part of that work. A general mapping may be valid for most of a population while a documented subgroup needs a different result. The agent can express the relationship as related rules or branches within a rule, preserving the exception explicitly. For a first_match policy, a specific exception can precede a broader rule. For a multi_match policy, every matching rule contributes. An asset may have several compensating controls, such as network isolation and endpoint protection, with separate rules contributing each control to the policy's output.

The agent now has a candidate rule and evidence for why it should work. Next, we test it on independently collected records to see whether it holds beyond the examples that led to it.

Maya Chen is assigned the Jira ticket to coordinate the work, so the agent drops the assignee lead. It follows payments-api through the Context Engine to sys-payments-api and its linked assets, checks the GitHub manifest’s identity mapping, then corroborates Jira’s Payments Platform value against the service catalog before sending the candidate to validation.

Testing the Boundaries

Testing needs to show how a proposed rule changes the policy's answers, including existing assignments, protected exceptions, and records with missing fields. A rule can match the intended population and still produce the wrong result when combined with the surrounding rules.

Source Sampling gives the agent tens of thousands of real records to test against, including records it did not use to develop the rule. With those records and their schemas already available, it can tighten a condition, add an exception, and rerun its tests without another round of vendor API calls.

We test the new rule alongside the rest of the policy, comparing results with and without it on the same records. An ownership rule might fill a gap for one group while overriding an existing exception for another. The agent can inspect both effects, adjust the rule's conditions or its position in the policy, and retest before asking your team to approve it.

Rule Preview gives your team a dry run of a proposed policy change. Before applying a rule, you can inspect the affected entities and see which values it would add, overwrite, or remove.

To make those comparisons fast, we built a native evaluator for CEL that runs over prepared inputs without invoking the full data-processing pipeline. It evaluates the existing policy and the proposed change using the same behavior as the production rules engine, including how missing values are handled.

Separating data acquisition from execution lets the agent spend its iterations on logic instead of repeatedly retrieving the same inputs. Rule Preview runs the proposed change across the entire entity population, so your team can see its full impact before applying it.

The broad Jira mapping passes the Payments API case, but would replace Finance Systems on Ledger and assign Batch to Merchant Operations despite the catalog conflict. The agent adds exception and conflict guards, then reruns the checks to confirm that Ledger keeps its owner and Batch stays unresolved for review.

Your Team Decides

By the time a rule reaches your team, the agents have done the research, written the logic, and tested how it behaves within the policy. You decide what takes effect, with Citations to explain the reasoning and Rule Preview to show what would change.

For MCP evidence, a post-tool hook records the tool call and its original response directly from the agent runtime. When the agent cites that evidence, we verify that the excerpt appears in the saved response. You can open the MCP receipt alongside the agent's explanation and inspect the exact passage or fields behind its reasoning.

Rule Preview shows how many entities would change and lets you inspect their values before and after, accounting for the rules already in your policy. With the evidence and impact in front of you, your team can approve, edit, or reject the proposal, or ask the General Agent to investigate further. Once you approve a rule, Cogent applies it to your environment.

Opening the Jira ticket and service catalog lets the reviewer check both the proposed Payments Platform owner and the Finance Systems exception. Rule Preview distinguishes new assignments from assets already covered, so the team can inspect the impact before adding the rule to the policy. Coverage updates after the rule is applied.

Bring Your Expertise

Your team has tribal knowledge that your security tools do not capture. A service may have changed hands before its inventory record was updated, or a business unit may follow an exception that has never been encoded in a rule. Agent Policies lets you supply that judgment directly.

Cogent draws on your security tools and business tools like Notion and Slack, alongside documents and data your team uploads. That gives teams several ways to make organizational context available, including procedures and mappings that do not live behind a dedicated integration. A file can explain how to interpret a source field or establish an exception that the agent needs to investigate.

With Rule Creation, you can describe the rule you want in natural language. The agent uses the same Integration Skills, MCPs, and Context Engine to work out the source fields and scope, build executable logic, and bring the result back through testing and review. We want security practitioners to explain how their company works as naturally as they would to a knowledgeable colleague, then review the rule the agent builds from that explanation.

The Ledger exception shown earlier starts with a practitioner’s instruction to retain Finance Systems even when Jira lists Payments Platform. Cogent checks the Jira record against the catalog, limits the rule to sys-payments-ledger, and uses Rule Preview to show which existing assignments the exception would protect.

Keeping Policies Current

Early in a deployment, broad gaps give agents substantial ground to cover. As the policy becomes more complete, useful work increasingly involves checking assumptions, investigating exceptions, and responding to changes. High coverage gives us a foundation for more targeted investigation; it does not establish that every inference is correct.

Shared context helps identify where that attention matters. For example, if a system is determined to be internet exposed, a data sensitivity agent can recheck what it stores, since sensitive data raises the stakes of a compromise. The same applies to systems already identified as crown jewels: their classifications deserve careful scrutiny as new evidence arrives.

Cogent is always on, working for you in the background. Through Drift Detection, agents revisit existing rules as your environment changes and bring proposed updates to your team, with the evidence and impact ready to review.

As new information arrives, Cogent evaluates what has changed and which policies may need attention. Relevant specialists use that evidence to revisit their assumptions, while useful findings become part of shared context for other agents to build on.

Bring us a configuration problem your team is still solving by hand. Talk to our team about how Cogent can help with your security challenges.

Related articles

View all articles

View all articles

BWoGo1kY  aR  d4eAm#oF

See Cogent In Action

Schedule a personalized demo today to learn how Cogent can supercharge your vulnerability management program.

Book a demo

Book a demo

Free risk assessment

Free risk assessment

B%o1oOkY  aK  dPeBm#oQ

See Cogent In Action

Schedule a personalized demo today to learn how Cogent can supercharge your vulnerability management program.

Book a demo

Book a demo

Free risk assessment

Free risk assessment

B9oMoHkE  aP  dKe4m@o0

See Cogent In Action

Schedule a personalized demo today to learn how Cogent can supercharge your vulnerability management program.

Book a demo

Book a demo

Free risk assessment

Free risk assessment