# Syl Guardian > Syl Guardian is a causal guardrail for AI agents. Before an agent acts on a claim like "this campaign's ad spend drove those conversions", Guardian checks whether the claimed effect is causal after adjusting for confounders, and returns a pass, caution, or hold verdict with the naive vs. adjusted effect and a confidence interval. The wedge is ad-spend and budget decisions. All numbers are computed deterministically by statistical code (statsmodels, scikit-learn, networkx); an LLM is never used to compute a number, only optionally to prune a causal graph or write prose. For strict reproducibility, set the engine config steps `cleaning` and `discovery` to `"rule"`. ## Get started - [Syl Guardian overview](https://sylai.io/guardian): what it does, and where to request a trial API key - [Guardian API and MCP docs](https://sylai.io/guardian/docs): request/response shape, verdicts, errors, engine config, uploads - [Agent rules template](https://sylai.io/guardian-agent-rules.md): ready-to-paste CLAUDE.md, AGENTS.md and .cursorrules sections that make an agent verify ad-spend claims with Guardian - [Public MCP listing on GitHub](https://github.com/connor274/syl-guardian-mcp): registry name `io.sylai/guardian` - [Python client on PyPI](https://pypi.org/project/syl-guardian-client/): `syl-guardian-client`, an MIT-licensed thin client for the Guardian REST API (source: https://github.com/connor274/syl-guardian-client) ## Install the MCP server Hosted endpoint (streamable HTTP): `https://guardian.sylai.io/mcp`. Authenticate with an `X-API-Key` header; get a trial key at https://sylai.io/guardian. Tool listing needs no key; the key is checked when a tool is called. Claude Code: ```bash claude mcp add --transport http syl-guardian https://guardian.sylai.io/mcp \ --header "X-API-Key: " ``` Claude Desktop and other stdio-only clients, via `mcp-remote`: ```json { "mcpServers": { "syl-guardian": { "command": "npx", "args": ["-y", "mcp-remote", "https://guardian.sylai.io/mcp", "--header", "X-API-Key:${SYL_API_KEY}"], "env": { "SYL_API_KEY": "" } } } } ``` ## Python client, CrewAI and LangChain `pip install syl-guardian-client` (extras `[crewai]` and `[langchain]`). It only makes HTTP calls to `https://guardian.sylai.io`. Set the API key in the `SYL_GUARDIAN_API_KEY` environment variable; get a trial key at https://sylai.io/guardian. ```python from syl_guardian_client import GuardianClient result = GuardianClient().review("ad_spend", "conversion_value", data=rows, time_col="date", step=500, known_confounders=["brand_query_click_pct"]) result.verdict # "pass" | "caution" | "hold" ``` - CrewAI: `from syl_guardian_client.integrations.crewai import SylGuardianTool` - LangChain: `from syl_guardian_client.integrations.langchain import guardian_review_tool` ## Tools and endpoints - `guardian_review` (MCP) / `POST https://guardian.sylai.io/v1/guardrail/review` (REST): review a causal claim. Key arguments: `cause`, `effect`, a dataset (`csv`, `data`, or `dataset_id`), optional `known_confounders` (a list of column names; the argument is not called `confounders`), `time_col` for time series, `step` (the proposed change, for business-terms restatement), `units`, `config`, `seed`. - `guardian_request_upload` (MCP, hosted only): for more than about 200 rows, call this (it uses no review quota), run the returned `curl` command to PUT the CSV, then pass the returned `dataset_id` to `guardian_review`. Uploads are single-use and expire after 30 minutes. - REST upload flow: `POST /v1/uploads`, then `PUT /v1/uploads/{dataset_id}?token=...`, then `POST /v1/guardrail/review` with `dataset_id`. - Verdicts: `pass` (proceed), `caution` (proceed only with a reduced or narrowed change), `hold` (do not act on the claim as stated). ## Using Guardian for ad spend - Set `cause` to the spend column and `effect` to the outcome column (for example conversion value), and send only the rows for the campaign in question. - Pass `time_col` for the date column and `step` for the proposed budget change. - Pass known confounders (for example seasonality or brand-query share) as `known_confounders`. - Send only cause, effect, `time_col` and confounder columns. Drop downstream columns such as ROAS, clicks and conversions: they are consequences of spend, and controlling for them biases the estimate. - Report the verdict, naive vs. adjusted effect and confidence interval alongside any recommendation. ## Optional: other Syl products (secondary, aimed at teams and enterprises) - [Syl Pulse](https://sylai.io/pulse): email-driven causal analytics for leaders; also exposes an MCP tool, `pulse_analyze` - [Syl Analyze](https://sylai.io/analyze): desktop causal inference app for analysts - [Changelog](https://sylai.io/changelog)