Interactive Chat Workflows
Alprina’s conversational interface lets you triage findings, launch scans, and request fixes without leaving the terminal. Use these patterns to get the most from the chat agent.
Case Study: DevTeam’s Incident Response with AI Chat
Background: At 2 AM on a Saturday, DevTeam’s monitoring alerted them to suspicious activity on their production API. Junior developer Alex was on-call but had never handled a security incident before. The senior security engineer was unreachable on vacation.
The Crisis:
- Time: 2:17 AM Saturday
- Alert: Unusual API traffic patterns detected
- Team Available: 1 junior developer (6 months experience)
- Security Knowledge: Limited
- Pressure: Production system potentially compromised
- Challenge: No security expert available for guidance
Traditional Approach Would Require:
- Wait until Monday for security team (48+ hours exposure)
- Pay $5,000-10,000 for emergency incident response firm
- Risk data breach during waiting period
- Potential cost: $4.45M average breach (IBM data)
Alprina Chat Solution: Alex used the interactive chat assistant to get real-time expert guidance.
The Response Timeline:
2:17 AM - Initial Assessment:
alprina chatAlex: We're seeing unusual API traffic. Can you help me investigate?
Alprina: I'll guide you through incident response. Let's start by scanning your logs.2:22 AM - Evidence Collection:
Alex: /scan ./logs/api-access.log
Alprina: [Analyzes logs, identifies 47 suspicious requests]
Alprina: I've detected potential SQL injection attempts from IP 203.0.113.422:28 AM - Threat Analysis:
Alex: What should I do first?
Alprina: Here's your incident response checklist:
1. Immediate: Block IP 203.0.113.42 at firewall (CRITICAL)
2. Verify: Check database for unauthorized access
3. Contain: Rotate API keys and database credentials
4. Document: Save this conversation for audit trail2:35 AM - Containment:
Alex: /scan ./api/auth --profile code-audit
Alprina: [Discovers SQL injection vulnerability in auth endpoint]
Alprina: CRITICAL: Line 47 in auth.py is vulnerable to SQL injection2:42 AM - Remediation:
Alex: /fix AUTH-001
Alprina: [Generates secure parameterized query with 94% confidence]
Alex: Show me exactly what to change
Alprina: [Displays before/after code with detailed explanation]2:55 AM - Verification:
Alex: I've applied the fix. How do I verify it worked?
Alprina: Run these verification steps:
1. Retest with: alprina scan ./api/auth --profile code-audit
2. Verify: No SQL injection vulnerabilities found
3. Check: Review recent database logs for unauthorized access3:15 AM - Documentation:
Alex: /save ~/incidents/2024-11-09-api-breach.json
Alex: Generate an executive summary for my CTO
Alprina: [Creates non-technical summary with timeline and actions taken]Final Results:
- Response Time: 58 minutes (vs 48+ hours waiting for expert)
- Vulnerability Fixed: Critical SQL injection patched
- Breach Prevented: No data compromised
- Cost Saved: $5,000-10,000 (emergency response firm)
- Potential Breach Cost Avoided: $4.45M (IBM average)
- Junior Developer: Handled incident successfully without senior help
CTO’s Response Monday Morning: “Alex, this is exactly how incident response should work. You contained the threat, fixed the vulnerability, and documented everything perfectly. Great work.”
Alex’s Testimonial: “I’ve never handled a security incident before. Alprina’s chat assistant walked me through every step like having a senior security engineer on call 24/7. It turned a terrifying situation into a learning experience.”
Key Lessons:
- AI Chat = 24/7 Expert Guidance: No waiting for senior engineers
- Interactive Learning: Junior developers learn while responding
- Documented Response:
/savecreates audit trail automatically - Cost-Effective: 5,000+ emergency response
- Confidence Building: Team can handle incidents independently
Launch the Assistant
alprina chatCommon options:
--model claude-3-5-sonnet-20241022— pick your preferred model.--load ~/.alprina/out/latest-results.json— preload the latest scan output for context.--no-streaming— disable streaming if you prefer full responses.
Core Command Palette
Type /help inside chat to see every command. Frequently used options:
| Command | Purpose |
|---|---|
/scan <target> | Triggers a scan without leaving chat. |
/explain <id> | Breaks down a specific finding using its identifier. |
/fix <id> | Produces mitigation guidance and code snippets. |
/report | Generates and saves a fresh report (HTML, PDF, or JSON). |
/save <path> | Exports the full conversation and context for auditing. |
/clear | Starts a new session while keeping your authentication intact. |
Example:
You: /scan ./services/payments
Alprina: [Runs scan, returns findings]
You: /explain PAY-001
You: /fix PAY-001Guided Triage
Structure conversations to tackle the riskiest issues first.
You: Load the latest scan and show the critical findings only.
Alprina: [Lists critical issues with summaries]
You: Rank them by exploitability.
You: Draft Jira ticket language for the top two findings.Cross-Agent Collaboration
Ask the assistant to enlist additional agents:
You: Run a deep chain on ./services/payments that covers red team, blue team, and retest phases.
You: Summarize overlapping findings across agents.
You: Recommend control improvements the Blue Team suggested.Incident Response Coaching
You: /scan ./incident-artifacts
You: Build an incident timeline with key events.
You: Suggest immediate containment steps and long-term follow-up.
You: Provide a stakeholder update I can send to leadership.Automating With Prompts
Create repeatable prompt templates stored in your notes or scripts, then paste them into chat after launching:
cat <<'EOF'
Audit the latest scan for:
- Authentication weaknesses
- Insecure data storage
Then produce:
1. Summary for engineers
2. Executive overview (non-technical)
3. Remediation checklist
EOFLaunch the session:
alprina chat --load ~/.alprina/out/latest-results.jsonPaste the template to get consistent answers across teams.
Saving and Sharing Sessions
Use /save to archive conversations:
You: /save ~/security/alprina-session-2024-11-15.jsonThe saved file includes prompts, responses, and referenced findings—ideal for audits and knowledge bases.
Pair these workflows with the CLI Scan Recipes to automate data collection, then let the chat assistant drive the remediation loop with your team.