Pretorin Compliance

行业场景

by pretorin-ai

让 AI 工具访问 NIST 800-53、FedRAMP、CMMC 和 NIST 800-171 等合规数据。

什么是 Pretorin Compliance

让 AI 工具访问 NIST 800-53、FedRAMP、CMMC 和 NIST 800-171 等合规数据。

README

<p align="center"> <img src="assets/Logo_White+Orange.png" alt="Pretorin" width="400"> </p> <p align="center"> <strong>Compliance tools for developers. Integrate with AI agents or your CI pipeline.</strong> </p> <p align="center"> <a href="https://pypi.org/project/pretorin/"><img src="https://img.shields.io/pypi/v/pretorin" alt="PyPI version"></a> <a href="https://registry.modelcontextprotocol.io/"><img src="https://img.shields.io/badge/MCP_Registry-Listed-green" alt="MCP Registry"></a> <a href="https://modelcontextprotocol.io"><img src="https://img.shields.io/badge/MCP-Compatible-green" alt="MCP Compatible"></a> <a href="https://opensource.org/licenses/MIT"><img src="https://img.shields.io/badge/License-MIT-yellow.svg" alt="License: MIT"></a> <a href="https://github.com/pretorin-ai/pretorin-cli/actions"><img src="https://github.com/pretorin-ai/pretorin-cli/actions/workflows/test.yml/badge.svg" alt="Tests"></a> <a href="https://www.python.org/downloads/"><img src="https://img.shields.io/badge/python-3.10%2B-blue" alt="Python 3.10+"></a> </p>

Beta — Pretorin is currently in closed beta. Framework/control browsing works for everyone. Platform write features (evidence, narratives, monitoring) require a beta code. Sign up for early access.

Pretorin CLI gives developers and AI agents direct access to compliance data, implementation context, and evidence workflows.

mcp-name: io.github.pretorin-ai/pretorin

Two Usage Modes

  1. Pretorin-hosted model mode: run pretorin agent run and route model calls through Pretorin /v1 endpoints.
  2. Bring-your-own-agent mode: run pretorin mcp-serve and connect the MCP server to your existing AI tool (Claude Code, Codex CLI, Cursor, etc.).

Quick Start

bash
uv tool install pretorin
pretorin login
pretorin skill install

Run the walkthrough:

bash
bash scripts/demo-walkthrough.sh

Hosted Model Workflow (Recommended)

Use this flow when you want pretorin agent run to go through Pretorin-hosted model endpoints.

  1. Authenticate with your Pretorin API key:
bash
pretorin login
  1. Optional: point model traffic to a custom/self-hosted Pretorin endpoint:
bash
pretorin config set model_api_base_url https://platform.pretorin.com/api/v1/public/model
  1. Verify runtime setup:
bash
pretorin agent doctor
pretorin agent install
  1. Run an agent task:
bash
pretorin agent run "Assess AC-2 implementation gaps for my system"

Key behavior:

  • Preferred setup is pretorin login with no shell-level OPENAI_API_KEY override.
  • Model key precedence is: OPENAI_API_KEY -> config.api_key -> config.openai_api_key.
  • If OPENAI_API_KEY is set in your shell, it overrides stored login credentials.

Add to Your AI Tool

Use this flow when you already have an AI agent/tool and want Pretorin as an MCP capability provider.

<img src="assets/Rome-bot_Basic-1.png" alt="Rome-bot" width="120" align="right">

Install the Skill

The Pretorin skill teaches your AI agent how to use MCP tools effectively for compliance workflows. Install it for Claude Code and/or Codex CLI:

bash
pretorin skill install                # both agents
pretorin skill install --agent claude # claude only
pretorin skill install --agent codex  # codex only
pretorin skill status                 # check what's installed

1. Claude Code

bash
claude mcp add --transport stdio pretorin -- pretorin mcp-serve

Team setup via .mcp.json:

json
{
  "mcpServers": {
    "pretorin": {
      "type": "stdio",
      "command": "pretorin",
      "args": ["mcp-serve"]
    }
  }
}

2. Codex CLI

Add to ~/.codex/config.toml:

toml
[mcp_servers.pretorin]
command = "pretorin"
args = ["mcp-serve"]

If you installed Pretorin with uv tool install or pipx, prefer pinning the absolute path from command -v pretorin to avoid PATH drift between shells and GUI apps.

For Claude Desktop, Cursor, and Windsurf setup, see docs/MCP.md.

Core Commands

Platform-backed review and update workflows are single-scope: set one active system + framework first with pretorin context set, then run evidence, note, monitoring, narrative, or MCP-assisted compliance commands inside that scope. Multi-framework work must be split into separate runs. Evidence, narratives, and notes all support a local-first workflow: create locally, list, then push to the platform.

CommandPurpose
pretorin frameworks listList available frameworks
pretorin frameworks control <framework> <control>Get control details and guidance
pretorin context setSet active system/framework context
pretorin context showInspect and validate the active context
pretorin context clearClear the active context
pretorin evidence createCreate local evidence file
pretorin evidence listList local evidence files
pretorin evidence pushPush local evidence to Pretorin
pretorin evidence searchSearch platform evidence
pretorin evidence upsert <ctrl> <fw>Find-or-create evidence and link it
pretorin narrative createCreate local narrative file
pretorin narrative listList local narrative files
pretorin narrative pushPush local narratives to Pretorin
pretorin narrative get <ctrl> <fw>Get current control narrative
pretorin narrative push-file <ctrl> <fw> <sys> <file>Push a single narrative file
pretorin notes createCreate local note file
pretorin notes list --localList local note files
pretorin notes pushPush local notes to Pretorin
pretorin notes list <ctrl> <fw>List platform control notes
pretorin notes add <ctrl> <fw> --content ...Add control note directly
pretorin monitoring pushPush a monitoring event
pretorin agent run "<task>"Run Codex-powered compliance task
pretorin review run --control-id <id> --path <dir>Review local code for control coverage
pretorin skill installInstall Pretorin skill for AI agents
pretorin skill statusCheck skill install status per agent
pretorin mcp-serveStart MCP server

Quick context checks:

bash
pretorin context show --quiet
pretorin context show --quiet --check

pretorin login clears the stored active context when you switch API keys or platform endpoints, which helps prevent old localhost or deleted-system scope from leaking into a new environment.

Artifact Authoring Rules

  • Narrative and evidence markdown must be human-readable for auditors: no markdown headings, use lists/tables/code blocks/links.
  • Markdown image embeds are temporarily disabled until platform-side file upload support is available.

Configuration

Credentials are stored at ~/.pretorin/config.json.

VariableDescription
PRETORIN_API_KEYAPI key for platform access (overrides stored config)
PRETORIN_PLATFORM_API_BASE_URLPlatform REST API base URL (/api/v1/public)
PRETORIN_API_BASE_URLBackward-compatible alias for PRETORIN_PLATFORM_API_BASE_URL
PRETORIN_MODEL_API_BASE_URLModel API base URL used by agent/harness flows (default: https://platform.pretorin.com/api/v1/public/model)
OPENAI_API_KEYOptional model key override for agent runtime

Documentation

Full documentation is built with mdbook. To view it locally:

bash
# Install mdbook (if you don't have it)
cargo install mdbook

# Serve the docs and open in your browser
cd docs && mdbook serve --open

This starts a local server at http://localhost:3000 with live-reload.

To build static HTML without serving:

bash
cd docs && mdbook build
# Output is in docs/book/

Quick links

Development

bash
git clone https://github.com/pretorin-ai/pretorin-cli.git
cd pretorin-cli
uv pip install -e ".[dev]"
pytest
ruff check src/pretorin
ruff format --check src/pretorin

License

MIT License. See LICENSE.

常见问题

Pretorin Compliance 是什么?

让 AI 工具访问 NIST 800-53、FedRAMP、CMMC 和 NIST 800-171 等合规数据。

相关 Skills

面试体系设计

by alirezarezvani

Universal
热门

按岗位、级别和团队设计面试流程,生成能力矩阵、题库与评分标准,分析面试官偏差并校准招聘门槛,适合搭建或优化企业招聘体系。

团队招人没章法时,用它快速搭建岗位化面试流程、题库与评分标准,还能兼顾校准面试偏差,招聘更稳更准。

行业场景
未扫描9.0k

抽认卡

by BytesAgain

热门

Spaced repetition study tool with deck management. Use when you need flashcard.

行业场景
未扫描3.7k

教程文档

by anderskev

热门

Tutorial patterns for documentation - learning-oriented guides that teach through guided doing

行业场景
未扫描3.7k

相关 MCP Server

by boosted-chat

热门

Flight search & booking for AI agents. 400+ airlines, $20-50 cheaper than OTAs.

行业场景
137

Search company disclosures and financial statements from the Korean market. Retrieve stock profiles, market classifications, and historical trading data across major exchanges. Accelerate equity research with accurate, date-specific insights for Korean securities.

做韩国股研时,用它能一站查公司披露、财报和历史行情,按日期精确追溯关键信息,比手动翻交易所高效太多。

行业场景
103

检索韩国市场公司的披露文件与财务报表,并获取股票概况等关键信息。

想研究韩股公司时,它能一站式拉取披露、财报和股票概况,省去跨站查资料的麻烦,对跨境投研尤其省时。

行业场景
103

评论