Deploy an Agent Workflow in 5 Minutes
Deploy a visual AI agent builder with compliance auditing. This guide uses Dify with Lucid's workflow profile for prompt injection protection and SOC2 compliance controls.
Alpha Access Required
Lucid is in private alpha. Request access before proceeding.
Time to complete: ~4 minutes
What You'll Get
At the end of this quickstart, you'll have:
- A live Dify agent builder at a unique URL
- Llama 3.1 70B model for complex reasoning tasks
- Compliance auditors protecting every workflow:
- Prompt injection detection
- SOC2 controls (PII detection, credential scanning)
- AI Passports for audit trails and compliance reporting
Step 1: Install and Authenticate
If you haven't already, install the CLI and log in:
# Install the CLI
pip install lucid-cli
# Log in to your account
lucid login -e your@email.com -p yourpassword
Expected output:
Logged in as your@email.com
Step 2: Deploy Your Agent Builder
Run a single command to deploy:
lucid apply --app dify --model llama-3.1-70b --profile workflow
Expected output:
[*] Creating serverless environment...
[+] Environment created: env-xyz789ghi012
Connection URL: https://env-xyz789ghi012.serverless.lucid.ai
App: dify
Model: meta-llama/Llama-3.1-70B-Instruct
Auditors: injection, soc2
Region: us-east-1
[+] Environment ready!
Step 3: Access Your Agent Builder
Open the Connection URL in your browser:
https://env-xyz789ghi012.serverless.lucid.ai
You now have access to Dify's visual agent builder. Try creating your first agent:
- Click "Create App" and select "Agent"
- Name it "Customer Support Bot"
- Add a system prompt: "You are a helpful customer support agent."
- Test it in the preview panel
Every interaction is automatically audited for security and compliance.
Step 4: Verify Security (Optional)
Confirm your environment has valid TEE attestation:
lucid verify environment env-xyz789ghi012
Expected output:
[*] Fetching routing info for environment env-xyz789ghi012...
[+] Model: https://model-abc.serverless.lucid.ai (us-east-1) - amd_sev_snp
[+] Auditor: https://auditor-def.serverless.lucid.ai (us-east-1) - amd_sev_snp
[+] App: https://app-ghi.serverless.lucid.ai (us-east-1) - amd_sev_snp
[*] 3/3 endpoints have attestation reports
What the Workflow Profile Includes
The workflow profile activates these auditors:
| Auditor | What It Does |
|---|---|
| Injection | Blocks prompt injection and jailbreak attempts |
| SOC2 | PII detection, credential scanning, access logging |
SOC2 Compliance Features
The SOC2 auditor provides:
- PII Detection: Identifies personal data (names, emails, SSNs, etc.)
- Credential Scanning: Blocks API keys, passwords, tokens from leaking
- Access Logging: Records all interactions for audit trails
- Data Classification: Tags sensitive data for compliance reporting
Alternative: Deploy n8n
Prefer n8n for workflow automation? Just change the app:
lucid apply --app n8n --model llama-3.1-70b --profile workflow
n8n provides:
- 400+ integrations (Slack, GitHub, databases, etc.)
- Visual workflow designer
- AI nodes for LLM-powered automation
Build a Sample Agent Workflow
Once in Dify, try this example workflow:
Customer Feedback Analyzer
- Create a new Workflow app
- Add an LLM node with this prompt:
Analyze the following customer feedback and extract: 1. Sentiment (positive/negative/neutral) 2. Key topics mentioned 3. Suggested action items Feedback: {{input}} - Connect to an output node
- Test with sample feedback:
"The product is great but shipping took too long. Would buy again if delivery improves."
The workflow runs through the auditor chain, ensuring no PII leaks and no injection attempts succeed.
View Compliance Reports
Check your AI Passports for compliance documentation:
lucid passport list
ID AGENT TIMESTAMP
pass-101 env-xyz789 2024-01-15T14:00:00Z
pass-102 env-xyz789 2024-01-15T14:05:00Z
View detailed compliance data:
lucid passport show pass-101
Passport ID: pass-101
Hardware Attested: true
TEE Type: AMD SEV-SNP
Auditors: injection, soc2
PII Detected: false
Credentials Detected: false
Injection Blocked: false
EU Data Residency
For GDPR compliance, deploy to the EU region:
lucid apply --app dify --model llama-3.1-70b --profile workflow --region eu
Clean Up
When you're done experimenting, you can manage your environment through the Observer dashboard at observer.lucid.sh or use the status command:
lucid status
Serverless environments can be stopped via the Observer UI. For local development environments, use:
lucid teardown
Next Steps
- Deploy a chat interface - Quick chat with Open WebUI
- Deploy a code assistant - Autonomous coding with OpenHands
- Policy as Code - Advanced auditor configuration
- Auditor Catalog - See all compliance mappings
Summary
You deployed a compliant agent builder with:
| Component | Value |
|---|---|
| App | Dify |
| Model | Llama 3.1 70B |
| Auditors | injection, soc2 |
| TEE | AMD SEV-SNP |
| Time | ~4 minutes |
Your agent workflows are now protected by hardware-backed security with compliance controls meeting SOC2 requirements.