慣性聚合 関心のあるブログ、ニュース、テクノロジーを効率的に追跡
原文を読む 慣性聚合で開く

おすすめ購読元

博客园 - 司徒正美
V
V2EX
T
Tailwind CSS Blog
有赞技术团队
有赞技术团队
aimingoo的专栏
aimingoo的专栏
Apple Machine Learning Research
Apple Machine Learning Research
IT之家
IT之家
Blog — PlanetScale
Blog — PlanetScale
A
About on SuperTechFans
月光博客
月光博客
T
The Blog of Author Tim Ferriss
宝玉的分享
宝玉的分享
Martin Fowler
Martin Fowler
博客园 - 聂微东
The GitHub Blog
The GitHub Blog
V
Visual Studio Blog
WordPress大学
WordPress大学
酷 壳 – CoolShell
酷 壳 – CoolShell
Engineering at Meta
Engineering at Meta
GbyAI
GbyAI

DEV Community

Authentication Security Deep Dive: From Brute Force to Salted Hashing (With Java Examples) Why AI Systems Don’t Fail — They Drift Spilling beans for how i learn for exam😁"Reinforcement Learning Cheat Sheet" I Replaced Chrome with Safari for AI Browser Automation. Here's What Broke (and What Finally Worked) How Python Borrows Other People's Work The $40 Architecture: Processing 1 Billion API Requests with 99.99% Uptime Vibe Coding: A Workflow Guide (From Zero to SaaS) Most webhook security guides protect the wrong side. The scary part is delivery. Headless CMS for TanStack Start: Build a Blog with Cosmic EU Age Verification App "Hacked in 2 Minutes" — What Actually Happened Comfy Cloud’s delete function does not actually remove files Running AI Models on GPU Cloud Servers: A Beginner Guide Event-driven media intelligence with AWS Step Functions and Bedrock I scored 500 AI prompts across 8 quality dimensions — here's what broke How to Call Google Gemini API from Next.js (Free Tier, No Backend Needed) The Portal Protocol: Reclaiming Human Connection in the Age of AI How to Fix Your Team's Scattered Knowledge Problem With a Self-Hosted Forum Intro to tc Cloud Functors: A Graph-First Mental Model for the Modern Cloud Designing Multi-Tenant Backends With Both Ownership and Team Access I Built a Neumorphic CSS Library with 77+ Components — Here's What I Learned PostgreSQL Performance Optimization: Why Connection Pooling Is Critical at Scale Cómo construí un SaaS multi-rubro para gestionar expensas en Argentina con FastAPI + Vue 3 🚀 I Built an Ethical Hacking Scanner Tool – Open Source Project I Replaced /usage and /context in Claude Code With a Single Statusline A Pythonic Way to Handle Emails (IMAP/SMTP) with Auto-Discovery and AI-Ready Design I Collected 8.9 Million Polymarket Price Points — Here's What I Found About How Markets Really Move EcoTrack AI — Carbon Footprint Tracker & Dashboard Everyone's Using AI. No One Agrees How. 5 self-hosted ebook managers worth trying in 2026 Building Your First AI Agent with LangChain: From Chatbot to Autonomous Assistant Common SOC 2 Failures (Real World) Stop Vibe-Checking Your AI App: A Practical Guide to Evals How to Use SonarQube and SonarScanner Locally to Level Up Your Code Quality Your Next To-Do App Is Dead — I Replaced Mine with an OpenClaw AI Sign a Nostr event in 60 lines of Python using coincurve — no nostr-sdk, no nbxplorer, no rust toolchain ITGC Audit Explained Like You’re in Big 4 Patch Tuesday abril 2026: Microsoft parcha 163 vulnerabilidades y un zero-day en SharePoint Stop scraping everything: a better way to track competitor price changes Listing on MCPize + the Official MCP Registry while routing payments OUTSIDE the marketplace — how I kept 100% of my x402 revenue Building an AI-Powered Risk Intelligence System Using Serverless Architecture Why We Ripped Function Overloading Out of Our AI Toolchain Testing AI-Generated Code: How to Actually Know If It Works SaaS Churn Is Killing Your Business. Here Is What to Do About It (Without a Support Team) The Speed of AI Is No Longer Linear - And Self-Improving Models Are Why How to Implement RBAC for MCP Tools: A Practical Guide for Engineering Teams From Standard Quote to Persuasive Proposal: AI Automation for Arborists I built a CLI that scaffolds complete multi-tenant SaaS apps Axios CVE-2025–62718: The Silent SSRF Bug That Could Be Hiding in Your Node.js App Right Now The dashboard that ended our friendship Data Pipelines Explained Simply (and How to Build Them with Python)
私のパーソナルAIアシスタントを復活させた——今はWindows上でプライバシー優先のTelegramボットだ
Sreedhara Murthy · 2026-05-24 · via DEV Community

これはGitHub Finish-Up-A-Thon Challenge


への提出です。 私が作ったもの

デジタル秘書は、プライバシーを最優先した個人のAIアシスタントで、あなたのWindows PCで動作し、Telegramを通じてあなたとコミュニケーションを取ります。クラウドサブスクリプションは不要です。Dockerも不要です。あなたのマシンからデータが流出することはありません。それをあなたが選択するまで。

メッセージを送信 → パソコンがそれを処理 → スマートでメモリに対応した返信を受け取ります。音声入力、音声出力。ファイル、ウェブ検索、リマインダー、OCR — すべてTelegramから。

GitHub: github.com/sree1959git/Digital-Secretary


デモ

インストールウィザード

インタラクティブなウィザードは3分未満で完了します:

  ____  _       _ _        _   ____                    _
 |  _ \(_) __ _(_) |_ __ _| | / ___|  ___  ___ _ __ ___| |_ __ _ _ __ _   _
 | | | | |/ _` | | __/ _` | | \___ \ / _ \/ __| '__/ _ \ __/ _` | '__| | | |
 | |_| | | (_| | | || (_| | |  ___) |  __/ (__| | |  __/ || (_| | |  | |_| |
 |____/|_|\__, |_|\__\__,_|_| |____/ \___|\___| _|  \___|  \__\__,_|_|   \__, |
          |___/                                                              |___/

  Your personal AI secretary. On Telegram. On Windows.

  Step 1: Telegram Bot Token
  Step 2: OpenRouter API Key
  Step 3: Default AI Model
  Step 4: Name Your AI Secretary
  Step 5: Personality

フルスクリーンモードに入力 フルスクリーンモードを終了

ボットが動作中

You: Remind me to call the dentist tomorrow at 10am
Digital Secretary: Done! I've set a reminder for tomorrow at 10:00 AM: "Call the dentist". 
                   I'll message you here on Telegram when it's time.

You: [sends photo of whiteboard]
Digital Secretary: I can see a whiteboard with what appears to be a sprint plan. 
                   The items listed are: [extracted text from OCR + vision analysis]

You: [voice message] "What did we discuss last week about the project?"
Digital Secretary: [voice reply] Based on our previous conversations, we talked about...

フルスクリーンモードに入る フルスクリーンモードを終了

アーキテクチャの概要

Telegram (Your Phone)
        │
        ▼
Digital Secretary (Windows PC)
        │
        ├── 🧠 AI: OpenRouter / Ollama / llama.cpp
        ├── 💾 Memory: SQLite FTS5 (persistent, searchable)
        ├── 🛠️ Tools: files, shell, web, OCR, MCP servers
        ├── 📅 Scheduler: APScheduler-backed reminders
        ├── 🎙️ STT: faster-whisper (local Whisper)
        └── 🔊 TTS: edge-tts (Microsoft neural voices)

フルスクリーンモードに入る フルスクリーンモードを終了


戻り組のストーリー

それが始まった場所(以前)

約6ヶ月前、私はこのプロジェクトの最初のバージョンを構築しました—当時はAntidoteと呼ばれていました—週末の実験として。アイデアは単純でした:月額サブスクリプション不要で、私のWindows PCで動作し、既に携帯電話にインストールしていたTelegramを使用する個人的なAIアシスタントが欲しかったのです。

  1. 月額サブスクリプション不要
  2. 私のWindows PCで動作
  3. Telegram(既に携帯電話にインストールしていた)を使用

3日で動作するプロトタイプができた。しかし、その後人生があった。プロジェクトはそこに置かれ—機能的ではあったが荒い:

  • 設定ファイルに埋め込まれたハードコーディングされたパス (C:/Users/Sreedhar/...)
  • ボットは質問に答えたが、再起動の間はすべてを忘れていた
  • 全く音声サポートがなかった
  • 1,000行に達した単一のPythonファイル
  • ドキュメントなし — 自分で設定する方法を覚えていなかった

私はこれらをCODE_REVIEW_REPORT.mdで残虐かつ正直に記録した

「設定ファイルには個人のパスがハードコードされている... メモリはセッションごとにのみ生存する... OcrImageToolはTelegramチャンネルに登録されているが、メインツールレジストリには登録されていない... 自動起動タスクの名前はwizard.pyとautostart.pyで一致しない...」

私が変更したこと(その後)

このチャレンジのために再度手を加える際、クライアントのコードベースを初めて見たかのように扱った。変更点は以下の通りです:

アーキテクチャの改善:

  • モノリスを適切なパッケージ構造に分割しました: agent/channels/memory/providers/security/tools/
  • SQLite FTS5でMemoryStoreを追加しました—このボットはセッション間であなたを覚えておくことができます
  • ContextBuilderを導入しました—これはアイデンティティファイル(SOUL.mdAGENTS.mdUSER.md)からシステムプロンプトを組み立てます
  • OpenAI互換の機能定義を持つ適切なToolRegistryを作成しました

新しい機能が追加されました

  • 🎙️音声入出力 — Whisper (ローカルSTT) + Edge-TTSニューラルボイス(3段階ボイスシステム)
  • 📅 スケジューラ — 「毎日3時に立ち上がってストレッチするのを思い出して」
  • 🖼️ 視覚 + OCR — 写真を送信し、テキストを抽出し、画像を説明
  • 🔌 MCPブリッジ — 任意のModel Context Protocolサーバーにプラグイン
  • 🔐 ハードウェアに依存する暗号化 — シークレットはWindows UUIDに鍵付けられたFernetで保存

品質の向上:

  • インタラクティブな設定ウィザード(手動のJSON編集不要)
  • Windows Task Schedulerによる自動起動
  • Ctrl+C / SIGTERMによる適切な優雅なシャットダウン
  • 段落境界で応答を分割します(単語の途中でのTelegramの切り詰めは行いません)
  • /modelコマンドで会話中にAIモデルを切り替えます

再ブランド化:

  • AntidoteからDigital Secretaryに改名されました—新しい名前は実際に何をするかをよりよく反映しています:それはあなたの個人的な秘書であり、「AI」だけではありません
  • 新しいCLI:digital_secretaryおよびdigital_secretary setup

GitHub Copilot(Antigravity IDE経由)は、この復活期間中に本当に価値があります。最も大きな違いを造成した具体的な瞬間は以下の通りです:

GitHub Copilot(Antigravity IDE経由)(via Antigravity IDE)は、この復活期間中に本当に価値があります。ここに、具体的な瞬間を記載します:

1. 音声パイプライン設計

3層音声応答システムは最も難しい設計課題でした:

  • レベル1:"それを読み上げる" → 最後の応答のTTS再生、LLMコールなし
  • Tier 2:「これは説明して」→ LLM が自然な言葉で再説明
  • Tier 3:デフォルトの音声クエリ→ LLM が音声用に応答を要約

:私は英語で問題を説明し、Copilot が状態機構をスケッチし、初期の _is_readout_request() を書いた_is_explain_request() パターンマッチング。エッジケースを考慮するのに1時間かかるところを、数分で書けた。

2. ハードウェア制約暗号化

# Copilot suggested this elegant approach for Windows-specific key derivation
def _derive_key(uuid_bytes: bytes) -> bytes:
    return hashlib.pbkdf2_hmac(
        "sha256",
        uuid_bytes,
        salt=b"digital_secretary_v1",
        iterations=480_000,
    )

フルスクリーンモードに入る フルスクリーンモードから退出する

PBKDF2を使うべきだと気づき、2024年のOWASPの推奨に基づいて480Kの特定の反復回数を提案した。

3. SQLite FTS5 メモリ検索

以前、FTS5を使ったことがなかった。Copilotがスキーママイグレーションを書き、MATCHクエリを書き、なぜ rankが適切な関連性順序のために否定される必要があるかを説明した。その過程で新しいことを学んだ。

4. Windows シグナルハンドリングバグ

# This pattern only works on Unix:
loop.add_signal_handler(signal.SIGTERM, callback)

# Copilot caught this and suggested the Windows-compatible approach:
signal.signal(signal.SIGTERM, _signal_handler)

フルスクリーンモードに入る フルスクリーンモードを終了

コードレビューの際にプラットフォーム互換性の問題を見つけ出しました—ユーザーが報告してくれなければ私が発見するはずだったものです.


利用例

Digital Secretaryは、個人的なAIを望む人々のために設計されています

シナリオ あなたの行動 それが行うこと
パーソナルアシスタント 「ミルクを買い物リストに追加」 記憶に保存し、必要に応じて呼び出す
毎日のお知らせ 8時のスケジュールメッセージ リマインダーとメモの要約を送信
文書リーダー PDF写真を送信 OCR+AIによる要約
コードヘルパー エラーを貼り付け、修正を尋ねる ウェブを検索し、ファイルを読み取り、解決策を提案
会議メモ 声で要点を記録 記録してメモリに保存
家庭秘書 共有リマインダー 家族全員のタスクをスケジュール
研究補助 「Xに関する最近の論文を探す」 ウェブ検索+要約
オフラインAI ローカルllama.cpp設定 クラウド不要、インターネット不要

技術的アーキテクチャのハイライト

持続するメモリ

# Search semantic memory with FTS5
results = await memory.search("dentist appointment", limit=5)
# Returns: [Memory(content="User mentioned dentist on Tuesday...", category="fact")]

フルスクリーンモードに入る フルスクリーンモードから退出する

すべての会話は要約され、保存されます。次に関連する質問を尋ねると、関連する記憶が自動的にシステムプロンプトに注入されます。

ツールの使用例

「明日の天気はどうですか?」と質問すると、LLM:

  1. 呼び出すことを決定しますweb_search("weather tomorrow [your city]")
  2. 結果を取得します
  3. 詳細な予報のためにfetch_webpage(url)を呼び出します
  4. 自然言語の応答を生成

テレグラムの交換で一括で行います

マルチプロバイダーAI

# Switch between providers transparently
provider = get_provider()  # reads config, returns right provider

# All providers implement the same interface
response = await provider.chat(messages=messages, tools=tool_defs)

フルスクリーンモードに入る フルスクリーンモードから退出する

OpenRouter (100以上のモデル)、Ollama (ローカル)、およびllama.cpp (超ローカル、GPUまたはCPU)と連携します


開始方法

git clone https://github.com/sree1959git/Digital-Secretary.git
cd Digital-Secretary
.\start.ps1

フルスクリーンモードに入る フルスクリーンモードを終了

起動器はすべてを処理します — Pythonのバージョン確認、venvの作成、依存関係のインストール、およびウィザードの起動

完全なセットアップガイド: TELEGRAM_BOT_SETUP.md


次に何をするか

プロジェクトのロードマップはまだやるべきことがあることを正直に示しています:

  • マルチエージェントルーティング — 独立/finance/health/work はスコープ付きメモリを持つサブエージェントです
  • 承認ワークフロー — ファイル書き込みとシェルコマンドの承認に使用するTelegramのインラインボタン
  • 持続可能な会話履歴 — 各ターンをすべて保存し、要約だけではありません
  • ウェブUI — メモリのレビュー、リマインダーの管理、モデルの切り替えを行うダッシュボードです

この挑戦が、このモノを棚に置きっぱなしにしないで済むようになるのにちょうど良いきっかけでした。

試してみたら、コメントでどう思うか教えてください。 👇


タグ: #devchallenge #githubchallenge #python #telegram #ai #windows #opensource