An interactive, multi-phase conversational agent that guides developers, architects, and program managers through a structured AI governance risk assessment. Built with the Anthropic SDK and callable directly from the Claude Code terminal.
The assistant conducts a three-phase governance review of any AI service or feature:
| Phase | Name | What happens |
|---|---|---|
| 1 | Data Collection & Context Mapping | The agent interviews you about your AI service — what it does, what data it uses, who it affects, and how autonomous it is |
| 2 | Risk Analysis & Vulnerability Assessment | The agent analyzes your answers across bias & fairness, privacy & data protection, security & robustness, and regulatory alignment |
| 3 | Mitigation & Governance Recommendations | A prioritized, structured report with technical mitigations, process governance steps, transparency guidance, and an incident response protocol |
After the report, you are asked whether you are satisfied. Answering no restarts the full assessment from Phase 1.
- Python 3.9+
- An Anthropic API key
# 1. Navigate to the project directory
cd AiGovernanceAssistant
# 2. Install dependencies
pip install -r requirements.txt
# 3. Set your Anthropic API key
export ANTHROPIC_API_KEY="sk-ant-..."python3 governance_assistant.pyOpen Claude Code in this project directory and type:
/project:governance-assistant
Claude will display the setup instructions and the command to launch the agent.
Claude Code will automatically use .claude/agents/governance-assistant.md when you ask it to perform a governance review within a Claude Code session via the Agent tool.
The agent greets you and begins Phase 1 immediately:
Assistant: Hello! I'm your AI Governance Assistant...
Let's start with Phase 1. Can you describe the AI service
or feature you're building and the problem it solves?
You: We're building a loan approval model for retail banking...
[Phase 1 Q&A continues until all 6 areas are covered]
Assistant: Thank you — I now have everything I need. Moving to Phase 2...
[Phase 2 runs autonomously — no input required]
Assistant: Phase 2 complete. Generating your governance report...
[Phase 3 structured report is printed]
────────────────────────────────────────────────
Are you satisfied with this report? (yes / no): yes
Thank you for using the AI Governance Assistant. Goodbye!
AiGovernanceAssistant/
├── governance_assistant.py # Main agent script
├── requirements.txt # Python dependencies
├── CLAUDE.md # Agent persona & workflow (read by Claude Code)
└── .claude/
├── agents/
│ └── governance-assistant.md # Sub-agent definition for Claude Code
└── commands/
└── governance-assistant.md # /project:governance-assistant slash command