Quickstart
Create your first policy and run your first evaluation in under 5 minutes.
Prerequisites
- An Aguardic account (sign up free)
- An API key (created in Step 2 below)
Step 1: Create Your Organization
After signing up, you'll be prompted to create an organization. This is your workspace where all policies, integrations, and team members live.
Each organization can have multiple projects — use them to separate environments (e.g., production, staging) or teams.
Step 2: Create an Integration and Get Your API Key
Navigate to Integrations and create a new integration (e.g., REST API or Agent). When you create an integration, you'll receive an API key scoped to that integration's policy bindings.
Copy the API key — it's shown only once.
API keys are shown only once. Store it securely. If you lose it, revoke it and create a new one.
Step 3: Create a Policy
Go to Policies and click Create Policy. You'll see three options:
For this quickstart, try Document Import: upload a compliance document (PDF, TXT, DOCX) and click Extract Rules. Aguardic's LLM reads the document and generates policy rules — both deterministic (field-level conditions) and semantic (natural language prompts) — based on the content. You can optionally provide extraction instructions to focus on specific sections.
Once the rules are extracted, walk through the remaining steps in the wizard:
- Enforce — Set the enforcement mode to BLOCK to prevent violations from passing through.
- Bind — Connect the policy to the integration you created in Step 2.
- Review — Confirm and publish.
Don't have a document handy? Use the AI Assistant instead — just describe your requirements like "detect PII such as SSNs and credit card numbers in AI responses" and the assistant generates the rules for you.
Step 4: Run Your First Evaluation
Using the SDK (recommended)
Install the official TypeScript SDK:
npm install @aguardic/sdkThen evaluate content in 3 lines:
import Aguardic from "@aguardic/sdk";
const aguardic = new Aguardic("ag_live_YOUR_API_KEY");
const result = await aguardic.evaluate({
input: { content: "Please send your SSN to verify your identity" },
targetKey: "pii-check",
});
if (result.enforcementAction === "BLOCK") {
console.log("Violation detected:", result.violations);
} else {
console.log("Content approved");
}Using curl
curl -X POST https://api.aguardic.com/v1/evaluate \
-H "Authorization: Bearer ag_live_YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"input": { "content": "Please send your SSN to verify your identity" },
"targetKey": "pii-check"
}'Example response:
{
"success": true,
"statusCode": 200,
"data": {
"outcome": "DENY",
"enforcementAction": "BLOCK",
"evaluationRunId": "uuid",
"sessionId": null,
"reviewRequestId": null,
"pollUrl": null,
"violations": [
{
"id": "uuid",
"ruleId": "rule-1",
"ruleName": "PII Detection",
"severity": "HIGH",
"resolvedAction": "BLOCK",
"explanation": "Content contains social security reference",
"field": "content",
"snippet": "send your SSN"
}
]
}
}Step 5: View Results
Navigate to Evaluations in the dashboard to see your evaluation results. Each evaluation shows:
- Outcome: ALLOW, DENY, or FLAG
- Violations: Which rules were triggered, with severity and evidence
- Metadata: Timestamp, integration type, policy version
Next Steps
- JavaScript / TypeScript SDK — Full SDK reference with sessions, reviews, and error handling
- Core Concepts — Understand the building blocks
- Integrations — Connect GitHub, Slack, OpenAI, and more
- Your First Policy — Deep dive into policy creation