> ## Documentation Index
> Fetch the complete documentation index at: https://docs.cotool.ai/llms.txt
> Use this file to discover all available pages before exploring further.

# Environment map

> How Cotool automatically maps your log tables, SIEM schemas, and infrastructure so detections and agents write accurate queries.

Cotool maintains a cached **Environment map** of the datasets, tables, sourcetypes, and schemas available in your connected systems. Instead of guessing field names or running expensive schema discovery on every turn, detection authoring and agent query tools read from this map first and then fetch detailed field schemas on demand.

## What Cotool maps

Cotool automatically runs background environment-mapping jobs for connected platforms:

| Platform family | Connected sources mapped | Refresh cadence |
| - | - | - |
| **Cotool Logs** | ClickHouse databases, tables, column schemas, sample rows, and recommended filters/queries | Daily (01:00 UTC) + automatically after new ingest |
| **SIEMs & Data Lakes** | Splunk, Datadog, Elastic, Microsoft Sentinel, Sumo Logic, Panther, Scanner, RunReveal, Snowflake, Databricks, ClickHouse | Weekly (Sunday, 00:00–02:00 UTC) |
| **Code, Edge & Cloud CLIs** | GitHub repositories, Cloudflare configuration, AWS, Google Cloud, and Azure CLI environments | Daily (GitHub) / Weekly (Cloudflare & CLIs) |

For each dataset or table, the map stores a compact index (dataset/table IDs, sourcetypes, and short descriptions), column or field summaries, representative sample rows, and query hints.

## How Cotool uses the map

* **Detection authoring & planning:** When you author a scheduled detection or plan coverage, Cotool injects a compact summary of your available datasets and tables so the agent immediately knows which sources exist and can drill into exact schemas before writing SQL or queries.
* **Agent query tools:** SIEM, warehouse, and Cotool Logs tools provide the cached compact map in their tool context so agents construct valid filters and column names on the first query instead of trial-and-error lookups.
* **Post-ingest refresh:** When a newly connected Cotool Logs stream begins landing events, Cotool triggers an automatic refresh of your Cotool Logs map (rate-limited to once per source per hour) so newly populated tables become discoverable quickly.

> [!NOTE]
>
> The [Threat Model](https://docs.cotool.ai/knowledge/threat-model.md) does not rely on cached
> environment summaries alone — it actively inspects your connected tools and
> CLIs to assess current infrastructure, attack surface, and visibility gaps.

## Related

> [card] [Threat model](https://docs.cotool.ai/knowledge/threat-model.md)
>
> How Cotool builds a living profile of your environment and attack
> surface.

> [card] [Author and publish detections](https://docs.cotool.ai/detections-platform/authoring.md)
>
> Write scheduled Python detections grounded in your actual log schemas.


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.