Access Patrick's expertise library for executive decision infrastructure. List, fetch, and manage structured expertise with context variables. Use for executive briefings, decision framing, and strategic analysis.
Access Patrick's expertise library for executive decision infrastructure. List, fetch, and manage structured expertise with context variables. Use for executive briefings, decision framing, and strategic analysis.
This will download patrick-cli for your platform, verify its SHA256 checksum, and place it in $PATRICK_DATA_PATH/bin/patrick-cli (default: ~/.patrick/bin/). The Dockerfile and run.sh add this to PATH automatically, so you can call patrick-cli directly.
The patrick-moltbot Docker container is pre-configured with the correct URL.
4. Set Up Cronjobs (Critical)
Patrick requires scheduled cronjobs to function properly. Read INSTALL.md in this directory for complete setup instructions including recommended cronjob schedules for daily briefings and commitment tracking.
License auto-renewal in cron: Before running any scheduled task, check if the license is about to expire and renew it:
# Check license expiry and renew if <1 day remaining
DAYS=$(patrick-cli license 2>&1 | grep "days remaining" | grep -oP '\d+')
if [ -n "$DAYS" ] && [ "$DAYS" -lt 1 ]; then
patrick-cli renew
fi# Then run your scheduled expertise
patrick-cli fetch daily-briefing --json
The patrick-cli renew command contacts the server, verifies your active subscription, and saves a fresh license with the remaining subscription days.
5. Keeping Patrick Updated
Check for updates and upgrade to the latest version:
# Check if update is available
patrick-cli upgrade --check
# Upgrade to latest version
patrick-cli upgrade
The upgrade process:
Contacts Patrick server for latest version info
Verifies SHA256 checksum of downloaded binary
Backs up current version
Installs new version
Shows release notes
Updates are cryptographically verified and signed by the Patrick server.
Response format (structured JSON, markdown, mixed)
Required context variables
Whether it's bidirectional (accepts data back)
IMPORTANT: Gathering Context Before Using Patrick
For AI Agents: Before running any Patrick expertise, you MUST:
Check for company data files in /app/company/ or similar locations
Read all available context:
Company data JSON files
Slack message archives
JIRA tickets
Git commit history
Calendar events
Any operational data available
Load this context into your working memory
Then run Patrick expertise with full awareness of company operations
Patrick expertise is most effective when you have complete situational awareness. Don't run Patrick commands without first gathering all available company data.
Variables are substituted using {{context.key}} syntax in the expertise content.
Response Formats
structured: LLM must return JSON matching the provided schema
markdown: LLM returns markdown text
mixed: LLM returns markdown with embedded JSON blocks
Bidirectional Expertise
Some expertise accepts data back from the LLM and stores it in Patrick's datastore:
✓ (stores to 'key') - Use send command to store response
✗ (one-way) - Expertise is read-only, no data storage
Common Patterns
Pattern 1: Simple Fetch
# No context needed
patrick-cli fetch daily-briefing
Pattern 2: Contextual Fetch
# Provide context variables
patrick-cli fetch decision-framing \
--context '{"decision":"Should we expand to EMEA?"}'
Pattern 3: Full Bidirectional Workflow
# 1. Fetch expertise template
patrick-cli fetch daily-briefing --json > expertise.json
# 2. Process with LLM (pseudo-code)# llm_process < expertise.json > response.json# 3. Store response back to Patrick
patrick-cli send daily-briefing --data @response.json
# 4. Later, retrieve stored data
patrick-cli get daily-briefing
Troubleshooting
License Errors
Error: No license found at ~/.patrick/license.jwt
Solution: Get a license from patrickbot.io and save it:
patrick-cli set-license "YOUR_LICENSE_HERE"
Error: Expertise 'X' not in license
Solution: Visit patrickbot.io to upgrade your license or add the expertise
Fetch Errors
Error fetching expertise: 401 Unauthorized
Solution: Check your license is valid and not expired
Expertise 'X' not found
Solution: List available expertise with list to see what's accessible
Context Errors
Warning: Missing required context variables
Solution: Check list-prompts output for required context fields and provide them via --context
Signature Verification Errors
Error: HMAC signature verification failed for 'storage_key'
Cause: Files in ~/.patrick/data/ were manually edited, corrupted, or modified outside of Patrick CLI.
Solution: Delete the corrupted file and regenerate the data:
rm ~/.patrick/data/storage_key.json
# Re-run the command that generates this data
Prevention: Never manually edit files in ~/.patrick/ - all data is signed with HMAC-SHA256 tied to your customer identity.
Switching Licenses
Error: License belongs to a different account.
Cause: You're trying to set a license for a different account. Stored data is signed with your current customer identity and cannot be read under a different account.
Solution: Use set-license with --wipe-data to switch accounts:
patrick-cli set-license "NEW_LICENSE" --wipe-data
This deletes all stored data in ~/.patrick/data/ and saves the new license. You'll need to re-initialize afterwards.
Security
Never commit license.jwt or environment files with real credentials
Licenses are authenticated on every API call
Expertise content is verified with SHA256 checksums
Only expertise listed in your license are accessible
⚠️ IMPORTANT: Do not manually edit files in ~/.patrick/
All data stored in ~/.patrick/ is signed with HMAC-SHA256 tied to your verified customer identity:
license.jwt - Your license token
jwks_cache.json - Public key cache for license verification
data/ - Stored expertise responses (if using bidirectional expertise)
Manual modifications will break signature verification and cause errors like:
Error: Stored data signature verification failed
If you need to reset your data, delete the specific file and re-run the command - don't edit it manually.
See {baseDir}/references/security.md for detailed information on Patrick's cryptographic signing model.
Reference Documentation
See {baseDir}/references/ for:
prompts-api.md - Full API documentation (now uses /v1/expertise endpoints)