Prerequisites
- Hipocap account and project
- Python application with function calls you want to protect
- API key from your Hipocap project
- Hipocap server running (self-hosted or cloud)
Installation
Install the Hipocap Python client:Basic Setup
1. Initialize Hipocap
Hipocap integrates with Laminar for observability. Initialize both together:2. Analyze Function Calls
Callanalyze() on the observability client returned from initialize():
Analysis Modes
Quick Analysis Mode
For low-latency requirements, use quick analysis:Full Analysis Mode
For maximum security, enable all stages:Handling Decisions
Theanalyze() method returns a dictionary with analysis results:
Configuration Options
Analysis Stages
input_analysis(default:True) - Enable Stage 1 input analysisllm_analysis(default:False) - Enable Stage 2 LLM analysisquarantine_analysis(default:False) - Enable Stage 3 quarantine analysisquick_analysis(default:False) - Use quick mode for faster analysis
Keyword Detection
Policy Selection
Integration with Observability
All Shield decisions are automatically traced in Hipocap’s observability platform (powered by Laminar). Analysis results are sent as OpenTelemetry spans, so you can:- View blocked attempts in the traces view
- Analyze security patterns across all function calls
- Review audit logs for compliance
hipocap.security.analysis with all analysis results as span attributes.
Next Steps
- Keyword Detection - Configure keyword detection
- Prompt Injection Protection - Understand multi-stage analysis
- Governance & RBAC - Set up access control
