SkillAgentSearch skills...

Open Office Agent

No description available

Install / Use

/learn @tungns2408/Open Office Agent
About this skill

Quality Score

0/100

Supported Platforms

Universal

README

🏢 Open Office Agent

Python 3.11+ License: MIT CI Ko-fi

An open-source AI Agent for office tasks, marketing, and data collection. Built on DeepAgents.

English | Tiếng Việt

✅ Security Reviewed

This project has been thoroughly reviewed using automated SAST scanning (Amazon Q Code Review). All identified issues have been addressed:

  • Code Injection (CWE-94) — Jinja2 SandboxedEnvironment with autoescape=True, template names validated against a strict whitelist
  • Cross-Site Scripting (CWE-79/80) — All user-controlled output escaped via html.escape()
  • Path Traversal (CWE-22) — File paths validated with resolve(), allowlists for extensions, filename sanitization
  • CSRF (CWE-352) — CORS restricted to explicit origins with limited HTTP methods
  • Unrestricted Upload (CWE-434) — File extension allowlist + 50MB size limit + filename sanitization
  • Config Injection — Config loader restricted to known filenames only
  • Telegram File Handling — File suffix validated against allowlist before download

Features

LLM Support (all free tier)

  • 🧠 Google Gemini 2.5 Flash (default) — best free model, function calling + vision
  • 🧠 Google Gemini 2.5 Flash Lite (fallback) — auto-fallback on rate limit, 1,000 req/day free
  • Groq (optional) — Llama 3.3 70B, ultra-fast, 14,400 req/day free
  • ☁️ Cloudflare Workers AI — Llama 3.3 70B, unlimited free (no function calling)
  • 🤖 OpenAI — GPT-4o, GPT-4o-mini (paid, full function calling)
  • 🧬 Anthropic — Claude 3.5 Sonnet/Haiku (paid, full function calling)
  • 🏠 Ollama — Run local models (Llama, Mistral, etc.)

Channels

  • 💬 Mattermost — Via MCP (Model Context Protocol) or webhook
  • 💬 Telegram — Bot integration via python-telegram-bot
  • 📱 Zalo — Personal account integration via zlapi
  • 📲 WhatsApp — Business Cloud API with webhook
  • 🔌 MCP Server — Connect from any MCP client (Mattermost AI, Claude Desktop, etc.)
  • 🌐 REST API — FastAPI with WebSocket support

Office

  • 📝 Meeting Agent — Meeting notes, audio transcription (Whisper), summaries, action item extraction
  • 🌐 Translation Agent — Multi-language translation with domain-specific glossary
  • 📄 Legal Doc Agent — Generate legal documents from templates (9 built-in)
  • 📊 Document Agent — Read & summarize PDF, Word, Excel files

Marketing

  • ✍️ Content Writer — Blog posts, social media (FB/LinkedIn/TikTok), email marketing
  • 🔍 SEO Agent — Keyword analysis, content optimization, on-page audit, meta tags
  • 📧 Email Campaign — Email sequences (5 types), subject line A/B testing
  • 📢 Ad Copy Agent — Ads for Google, Facebook, TikTok, Zalo

Data Collection

  • 🕷️ Web Crawler — Website content crawling with anti-bot handling (Playwright)
  • 📬 Email Scraper — Collect & validate emails from websites
  • 🎯 Lead Generator — Build prospect lists (emails, phone numbers, company info)

Installation

Option 1: Standalone Installer (Recommended for non-developers)

macOS:

# Download from Releases
curl -LO https://github.com/tungns2408/open-office-agent/releases/latest/download/OpenOfficeAgent-macOS.dmg
open OpenOfficeAgent-macOS.dmg
# Drag app to Applications folder

Windows:

# Download from Releases
Invoke-WebRequest -Uri https://github.com/tungns2408/open-office-agent/releases/latest/download/OpenOfficeAgent-Setup.exe -OutFile OpenOfficeAgent-Setup.exe
.\OpenOfficeAgent-Setup.exe

On first run, the app will auto-open your browser to the Setup Wizard where you can:

  1. Choose your LLM provider (Google Gemini free recommended)
  2. Enter your API key
  3. Optionally enable Meeting Agent (requires Whisper — 3GB, 5-10 min install)

After setup, configure channels from Settings UI:

  • Open browser: http://localhost:8000/settings
  • Enable channels (Telegram, Zalo, WhatsApp, Mattermost)
  • Enter tokens/credentials
  • Click "Save & Restart"

Option 2: Install from Source (For developers)

pip install -e .
pip install -e ".[dev]"      # For development (pytest)
pip install -e ".[whisper]"  # For Meeting Agent (optional)
playwright install chromium   # Required for crawl features
cp config.example.yaml config.yaml  # Create your config

Usage

1. Setup

open-office-agent setup
# Fill in api_key and channel tokens in config.yaml

2. Run API Server

open-office-agent serve
# API docs: http://localhost:8000/docs
# Enabled channels (Telegram, Zalo, WhatsApp) start automatically

3. Run Individual Channels

open-office-agent telegram   # Telegram bot only
open-office-agent zalo       # Zalo personal account
open-office-agent whatsapp   # WhatsApp webhook server
open-office-agent mattermost # Mattermost webhook server
open-office-agent mcp        # MCP Server (stdio)

4. Docker

docker compose up -d

LLM Configuration

The agent uses a 3-tier model strategy with automatic fallback:

Primary (Gemini 2.5 Flash) → Fallback (Gemini 2.5 Flash Lite) → Groq (Llama 3.3 70B)

Get API Keys (free)

  1. Google Gemini: https://aistudio.google.com/apikey
  2. Groq (optional): https://console.groq.com/keys

Default Config (Gemini, free)

llm:
  provider: "google-genai"
  model: "gemini-2.5-flash"
  api_key: "your-google-ai-key"

With Groq Fallback

llm:
  provider: "google-genai"
  model: "gemini-2.5-flash"
  api_key: "your-google-ai-key"
  groq_api_key: "your-groq-key"

OpenAI (paid)

llm:
  provider: "openai"
  model: "gpt-4o-mini"
  api_key: "sk-..."

Cloudflare Workers AI (free, no function calling)

llm:
  provider: "openai"
  model: "@cf/meta/llama-3.3-70b-instruct-fp8-fast"
  api_key: "your-cloudflare-api-token"
  # Set base_url in code or env: https://api.cloudflare.com/client/v4/accounts/ACCOUNT_ID/ai/v1

Ollama (local)

llm:
  provider: "ollama"
  model: "llama3.1"
  api_key: ""

Channel Setup

💡 For Installer Users: All channel settings can be configured from the Settings UI at http://localhost:8000/settings. No need to edit config files manually. Just enable the channel, enter credentials, and click "Save & Restart".

Mattermost (via MCP)

  1. Run open-office-agent mcp on your local machine
  2. In Mattermost, configure AI Plugin to connect to the MCP server
  3. Or add to your MCP client config:
{
  "mcpServers": {
    "open-office-agent": {
      "command": "open-office-agent-mcp",
      "args": []
    }
  }
}

Also works with Claude Desktop, Cursor, or any MCP-compatible client.

Mattermost (via Webhook)

  1. Create Bot Account + Outgoing Webhook in Mattermost
  2. Installer users: Go to Settings UI → Channels → Mattermost → Enable → Enter webhook URL & bot token → Save
  3. Source users: Set channels.mattermost.webhook_url and bot_token in Settings UI
  4. Point webhook to http://your-server:8000/mattermost/webhook

Telegram

  1. Create a bot via @BotFather
  2. Installer users: Go to Settings UI → Channels → Telegram → Enable → Paste bot token → Save
  3. Source users: Set channels.telegram.bot_token in config.yaml

Zalo (Personal Account)

  1. Installer users: Go to Settings UI → Channels → Zalo → Enable → Enter phone & password → Save
  2. Source users: Set channels.zalo.phone and channels.zalo.password in config.yaml
  3. Run open-office-agent zalo — login on first run
  4. Save session cookies for subsequent runs (optional)

⚠️ Zalo personal API is unofficial. Use at your own risk.

WhatsApp (Business Cloud API)

  1. Create an app at Meta Developer Console
  2. Set up WhatsApp Business API and get credentials
  3. Installer users: Go to Settings UI → Channels → WhatsApp → Enable → Enter credentials → Save
  4. Source users: Set channels.whatsapp.* fields in config.yaml
  5. Configure webhook URL: https://your-domain/whatsapp/webhook

API

# Chat
curl -X POST http://localhost:8000/chat \
  -H "Content-Type: application/json" \
  -d '{"message": "Create a labor contract for John Doe"}'

# Upload file
curl -X POST http://localhost:8000/upload -F "file=@meeting.mp3"

# Health check
curl http://localhost:8000/health

# List agents
curl http://localhost:8000/agents

Legal Document Templates

| Template | Command | |---|---| | Labor Contract | labor-contract | | Service Contract | service-contract | | Official Letter | official-letter | | Decision | decision | | Meeting Minutes | meeting-minutes | | Proposal | proposal | | Power of Attorney | power-of-attorney | | Notice | notice | | Handover Report | handover-report |

Project Structure

open-office-agent/
├── src/
│   ├── agents/
│   │   ├── router.py           # Agent Router (21 tools)
│   │   ├── meeting.py          # Meeting Agent
│   │   ├── translation.py      # Translation Agent
│   │   ├── legal_doc.py        # Legal Document Agent
│   │   ├── document.py         # Document Reader Agent
│   │   ├── crawl/
│   │   │   ├── web_crawler.py  # Web Crawler (Playwright + httpx)
│   │   │   ├── email_scraper.py # Email Scraper
│   │   │   └── lead_generator.py # Lead Generator
│   │   └── marketing/
│   │       ├── content_writer.py # Content Writer
│   │       ├── seo_agent.py     # SEO Agent
│   │       ├── email_campaign.py # Email Campaign
│   │       └── ad_copy.py       # Ad Copy Agent
│   ├── gateway/
│   │   
View on GitHub
GitHub Stars10
CategoryDevelopment
Updated6d ago
Forks0

Languages

Python

Security Score

85/100

Audited on Mar 20, 2026

No findings