SecureAssist is a production-ready, multi-agent AI platform built on Django 6, inspired by OpenClaw and designed with security as the top priority. It allows users to chat with a powerful Orchestrator that can research, write code, build entire sub-applications, and manage long-term semantic memoryโall within a secure, audited, and hot-reloadable environment.
๐ Security-First Philosophy: Every aspect of SecureAssist is built with security in mindโfrom out-of-band secret management to autonomous self-healing capabilities that prevent system vulnerabilities.
๐ก Inspired by OpenClaw: SecureAssist takes inspiration from OpenClaw's innovative approach to AI agent architecture, extending it with enhanced security, autonomous error recovery, and comprehensive document management capabilities.
- Install: Run
./setup.sh(Linux/macOS) orsetup.bat(Windows) - Configure: Complete the onboarding wizard (
python onboard.py) - Launch: Start the platform (
python run.py) - Chat: Open your Telegram bot and start chatting!
For detailed instructions, see the Setup Instructions section below.
- ๐ง Infinite Semantic Memory: Uses LanceDB to store and recall past conversations and tool results forever.
- ๐ ๏ธ Dynamic App Generation: Build new specialized apps on the fly using the Developer Agent and OpenCode CLI.
- ๐ Expanded LLM Ecosystem: Seamlessly switch between OpenAI, Anthropic, Google Gemini, Ollama, OpenRouter, and Together AI.
- ๐๏ธ Advanced OCR & Vision: Extract text from scanned PDFs and images using local Ollama Vision models (Llava) with Tesseract fallback.
- ๐๏ธ Local Text-to-Speech: High-quality local voice synthesis using microsoft/VibeVoice-1.5B.
- ๐ก๏ธ Out-of-Band Secure Credentials: Signal-based input mechanism ensures API keys are never seen by the LLM.
- ๐ Git Checkpoints & Rollback: Automatic pre-generation checkpoints with one-click rollback and autofix capabilities.
- ๐ฅ Self-Healing Supervisor: Watchdog service in
run.pythat captures crash logs and auto-restarts the server on failure. - ๐ MCP Server Support: Standardized Model Context Protocol endpoints for interoperability with external AI tools (Cursor, Claude Desktop).
- ๐ Webhook Integration: Trigger external notifications and workflows based on agent actions and tool results.
- ๐ Intelligent Document Management: Automatically detect file types (images, PDFs, CSVs, XLS, videos), store them securely, and organize by category. Files are stored first, processed only on request.
- ๐ค File Retrieval & Delivery: Request any stored document and the agent will send it back to you via Telegram instantly.
- ๐ Autonomous Self-Healing: The Orchestrator and Developer agents can detect, diagnose, and fix errors automatically without user intervention.
- ๐ Daily Briefing Sweeper: AI-synthesized daily activity reports delivered as a briefing.
- โจ Agent Personalization: Fully customizable name, persona, and voice profile for a unique AI identity.
- ๐ป Universal Productivity Suite: Built-in tools for Email reading/sending, Calendar management, and Structured Data Entry.
- ๐๏ธ Autonomous Voice Ingestion: Speak to your agent via Telegram; it transcribes, extracts intent, and takes action automatically.
- ๐ Knowledge Graph: Semantic linking between documents, contacts, and tasks for a unified data web.
- ๐ Task & Finance Engine: Proactive to-do management with reminders and a built-in financial ledger for budget tracking.
- โก SecureAssist Task Engine (SATE): Decompose complex objectives into parallelized, dependency-aware task graphs for maximum efficiency.
- ๐ฐ Intelligence Feeds: Subscribe topics for the agent to monitor the web and alert you on significant updates.
- ๐ก๏ธ Security-First Architecture: Features mandatory ORM logging for tools, secret injection at runtime, and comprehensive audit logs.
- โก Zero-Downtime Hot-Reloading: Inject new models and tools with syntax protection to prevent system instability.
Generate a specialized "Lawyer App" that can research NY state law, extract text from massive PDF evidence files, and store client data in a secure databaseโall via natural language.
Create a "Research App" that monitors market sentiments using Tavily Web Search, processes quarterly reports with Vision parsing, and maintains a long-term memory of investment theses.
Compose "Macro Tools" to chain web research with email drafting and scheduling, creating high-level autonomous workflows for business operations.
We provide automated setup scripts for all major platforms.
For Linux / macOS:
chmod +x setup.sh
./setup.shFor Windows:
setup.batAfter installation, the Onboarding Wizard will launch automatically. It will:
- Generate your unique Secret Keys for encryption.
- Configure your LLM Providers (OpenRouter, Together AI, Ollama, OpenAI, etc.).
- Set up Advanced OCR and Local TTS settings.
- Configure Embedding models for semantic memory (Ollama, OpenAI, etc.).
- Initialize Git repository (if not already initialized) for version control.
- Create your secure vault at
~/.secureassist/vault.json(outside project directory for security).
If you need to run it again later:
python onboard.pyOne-Click Launcher (Recommended)
python run.pyThis starts the Backend, Bot, and Supervising Watchdog in one command.
For professional deployments on a VPS, use Gunicorn with Uvicorn workers. Our hot-reload system supports Gunicorn by signalling the master process to refresh workers when new apps are generated.
- Start Gunicorn with a PID file:
gunicorn secureassist.asgi:application \
-k uvicorn.workers.UvicornWorker \
--pid /tmp/gunicorn_secureassist.pid \
--bind 0.0.0.0:8000- Configuration: SecureAssist will automatically detect
/tmp/gunicorn_secureassist.pidand send aSIGHUPsignal to trigger a graceful reload across all workers whenever the Developer Agent builds a new capability.
The API will be available at: http://127.0.0.1:8000/api/v1/
The API Documentation (Swagger) is at: http://127.0.0.1:8000/api/v1/docs
Once both processes are running, simply open your Telegram Bot and start chatting:
App Generation:
- "I'm a lawyer" โ Builds a legal assistant app with case management
- "Create a finance tracking app" โ Generates a custom financial tool
- "Build an app for managing contracts" โ Creates a contract management system
Memory & Recall:
- "What do we know about case X?" โ Uses semantic memory to recall past conversations
- "Remember that I prefer morning meetings" โ Stores preferences for future reference
- "What did we discuss last week about project Alpha?" โ Retrieves historical context
File Operations:
- Upload any file (image, PDF, document) โ Automatically stored
- "Extract text from the last image" โ Runs OCR on demand
- "Send me the contract I uploaded" โ Retrieves and sends file back
- "Search for documents about legal cases" โ Finds files by content
Tool Execution:
- "Research the latest AI regulations" โ Uses web research tools
- "Schedule a meeting tomorrow at 2 PM" โ Creates calendar event
- "Send an email to john@example.com" โ Composes and sends email (with approval)
Everything you do in the chat is securely logged and immediately functional.
SecureAssist is not just a chatbot; it's an intelligent workspace manager with robust file handling capabilities.
SecureAssist accepts any file type via Telegram:
- Images: JPG, PNG, WebP, GIF
- Documents: PDF, DOC, DOCX, TXT, MD
- Spreadsheets: CSV, XLS, XLSX
- Videos: MP4, AVI, MOV, and animations
- Other: Any file type you need to store
When you upload a file, SecureAssist follows a secure, two-phase process:
-
Phase 1: Immediate Storage (Automatic)
- File type is automatically detected
- File is stored in
media/uploads/{type}/with a unique ID - Metadata is recorded (name, type, size, upload date, user)
- No processing occursโfiles are stored safely first
-
Phase 2: Processing (On Request Only)
- OCR extraction: "Extract text from the last uploaded image"
- PDF parsing: "Read the PDF I just uploaded"
- Vision analysis: "Analyze this document layout"
- File retrieval: "Send me the contract I uploaded yesterday"
Ask the agent to retrieve any stored document:
- "Send me the last file I uploaded"
- "Find and send me the invoice from last week"
- "Show me all PDFs I've stored"
The agent will automatically send the file back to you via Telegram.
Use natural language to find files:
- "Search for documents about legal contracts"
- "Find all images uploaded this month"
- "Show me PDFs related to project Alpha"
The system includes a proactive "Sweeper" service that:
- Reviews all agent actions and tool results from the day.
- Synthesizes a professional summary briefing.
- Can be scheduled as a daily cron job (e.g., "Generate my daily briefing every night at 11 PM").
SecureAssist comes with a built-in "OS Integration" layer for essential professional tasks.
- Send: Send professional emails via SMTP with user approval.
- Read: The
check_inboxtool allows the agent to monitor and summarize your incoming communications.
- Manage: Create, update, and list appointments or meetings.
- Reminders: Schedule pro-active reminders that the bot will trigger via your primary chat interface.
The Generic Entity Registry allows you to save structured information without needing special apps.
Manage your credentials safely using the CLI utility:
python scripts/vault_admin.pyThis tool allows you to add/update secrets with masked input, keeping them separate from your working project.
SecureAssist ensures your development process is robust and reversible.
- Automated Checkpoints: The system commits changes before and after every generation.
- Commands:
/git_status: Check current development state./rollback: Revert to the last stable checkpoint immediately.
SecureAssist includes multiple layers of autonomous error recovery:
Process-Level Recovery:
- The Process Supervisor in
run.pymonitors system health - Automatically restarts processes on crash
- Captures and displays the last 10 lines of crash logs for debugging
- Prevents system downtime during heavy development or app generation
Agent-Level Self-Healing:
- Orchestrator Agent can detect tool execution failures and automatically retry with recovery
- Developer Agent validates generated code and fixes syntax errors autonomously
- App Recovery: If app generation fails, the system automatically attempts to fix issues and retry
- Tool Reload: Failed tools trigger automatic app reload and tool re-registration
Error Detection & Recovery Flow:
- Error occurs (tool failure, syntax error, migration issue)
- Agent identifies the root cause
- Automatic fix attempt (syntax correction, app reload, migration fix)
- Retry the operation
- If successful, continue; if not, report with detailed diagnostics
This ensures autonomous app creation where the system can build, validate, and fix issues without manual intervention.
SecureAssist acts as a proactive operating system for your professional life.
Send a voice note to the Telegram bot. The system will:
- Transcribe the audio using Whisper.
- Extract intent (e.g., "Remind me to call John" or "Track $50 for lunch").
- Execute the corresponding tool immediately.
Everything in SecureAssist is connected. You can link a Document to a Contact, or a Task to a Project.
- "Link this contract to the Acme Corp contact."
- "Show me all tasks related to Project Alpha."
The agent doesn't just wait for you.
- It tracks a global to-do list with priorities and due dates.
- It proactively suggests tasks during your Daily Briefing.
For heavy-duty workflows, use the Parallel Execution Engine:
- DAG Execution: Breaks down "Research X then Build Y" into a graph of sub-tasks.
- Parallelism: Runs independent tasks (e.g., researching 3 competitors) simultaneously.
- Efficiency: Reduces wait time by maximizing agent concurrency.
Monitor the web for topics you care about.
- "Monitor the web for 'Generative AI legal news' every day."
- The agent will ping you on Telegram if it finds something significant.
SecureAssist is designed to play well with other tools and services.
SecureAssist acts as a proactive MCP server, exposing its tools and context to external AI clients.
- API Endpoint:
http://localhost:8000/api/v1/mcp/ - Capabilities: List tools, retrieve schemas, and execute tools directly from Cursor, Claude Desktop, or other AI-powered IDEs.
Tip
Example Usecase: Imagine you have a custom "Legal Research" app in SecureAssist. By connecting SecureAssist to Cursor via MCP, you can highlight code in Cursor and ask: "Does this function align with the compliance guidelines in our SecureAssist legal database?" Cursor will use the SecureAssist tool via MCP to fetch the answer.
You can register external HTTP endpoints to receive real-time updates from your agent.
- Events:
tool_execution_success,tool_execution_failed, and more. - Security: HMAC-SHA256 signatures are included in the
X-SecureAssist-Signatureheader for verification. - Configuration: Manage webhooks via the chat: "Register a webhook to https://my-service.com/hooks"
Security is the foundation of SecureAssist. Inspired by OpenClaw's security-first approach, every component is designed to prevent "Agent Rebellion" or accidental leakage of sensitive credentials. Security is not an afterthoughtโit's built into the core architecture.
Unlike typical projects that store keys in a local .env file, SecureAssist uses an Out-of-Workspace Vault:
- Location:
~/.secureassist/vault.json(outside your project directory). - Isolation: When an LLM agent or generated code scans your workspace, it will find no sensitive keys.
- Access: Tools access secrets only via Runtime Injection (they are injected just for the function call and never stored in the agent's memory).
The Orchestrator includes a final safety net. Every response is scanned for known secrets before being sent to the user. Any leaked keys are automatically replaced with [REDACTED].
Secrets are never stored in agent memory or code:
- Secrets are injected only at tool execution time
- Each tool call receives secrets as isolated parameters
- Secrets are cleared from memory immediately after use
- No secrets appear in logs, responses, or generated code
Every action is logged for security and compliance:
- Tool executions with input/output summaries
- User actions and agent decisions
- Policy violations and access denials
- All stored in
AuditLogmodel for review
- Do not manually move secrets into the
.envfile within the project - Always use the
onboard.pywizard to update your credentials - Review audit logs regularly to monitor agent behavior
- Use approval requirements for sensitive operations (email, file deletion, etc.)
- Keep your vault file (
~/.secureassist/vault.json) with restricted permissions (600)
/core: Core framework logic, decorators, registry, and memory services./agents: The "brains" of the platform (Orchestrator, Developer, ContextManager)./apps: Dynamically generated sub-applications./integrations: API, Telegram, and other entry points./data: Persistent storage for LanceDB and SQLite.
SecureAssist is evolving rapidly. Here is what's coming next:
- ๐ฅ Multi-User Collaboration: Role-Based Access Control (RBAC) for teams sharing an agent.
- ๐ฑ Mobile Companion App: Native Flutter/React Native app for on-the-go access.
- ๐ฃ๏ธ Live Voice Mode: Real-time, 2-way audio conversations (WebRTC).
- ๐ณ Docker Compose Support: Simplified self-hosting container stack.
- ๐ฏ Agent Fine-Tuning Studio: UI to train custom LoRAs for specific agent personas.
- ๐ Enterprise Integrations: Native connectors for Slack, Jira, Linear, and Salesforce.
Bot not responding:
- Check that both the Django server and Telegram bot are running (
python run.py) - Verify your Telegram bot token is correct in the vault
- Check logs in
logs/secureassist.log
File upload fails:
- Ensure
media/uploads/directory exists and is writable - Check database migrations are applied:
python manage.py migrate - Verify file size limits in Django settings
App generation errors:
- The system will automatically attempt to fix issues
- Check
/git_statusin Telegram to see current state - Use
/rollbackto revert to last stable checkpoint - Review logs for detailed error messages
Secret/API key issues:
- Run
python onboard.pyto reconfigure - Use
python scripts/vault_admin.pyto manage secrets - Ensure secrets are stored in
~/.secureassist/vault.json, not in project.env
OCR/Vision not working:
- For local OCR: Ensure Ollama is running with
nomic-embed-text:latestmodel - For vision: Configure vision model in onboarding (OpenAI GPT-4o, Anthropic Claude, or Ollama Llava)
- Check API keys are correctly configured in vault
Database errors:
- Run migrations:
python manage.py migrate - If issues persist, check
db.sqlite3permissions - For production, consider PostgreSQL instead of SQLite
- Check the logs:
logs/secureassist.log - Review audit logs in Django admin for tool execution history
- Use
/git_statusto see current development state - The system's self-healing capabilities will attempt to fix many issues automatically
This project is licensed under the MIT License.
SecureAssist is inspired by OpenClaw and builds upon its innovative approach to AI agent architecture. We extend our gratitude to the OpenClaw community for their pioneering work in secure, autonomous AI systems.