Skip to content

hylmithecoder/AI_Agentic_In_Word

Repository files navigation

πŸ€– AgenticAIOnWord

A powerful Microsoft Word 2010 Add-in that brings Agentic AI capabilities directly into your document workflow. Built with C++/ATL and designed for seamless integration with AI services via the Model Context Protocol (MCP).

Version Word Platform


✨ Features

  • 🎯 Task Pane UI - Modern, elegant interface integrated into Word
  • πŸ—„οΈ SQLite Database - Local storage for settings, history, and context
  • πŸ€– MCP Client - Connect to AI servers via Model Context Protocol
  • ⚑ High Performance - Native C++ with optional Zig components

πŸ“ Project Structure

AgenticAIOnWord/
β”œβ”€β”€ πŸ“‚ include/           # Header files (.h)
β”‚   β”œβ”€β”€ framework.h       # ATL/Office framework includes
β”‚   β”œβ”€β”€ Connect.h         # Add-in connection handler
β”‚   β”œβ”€β”€ TaskPaneControl.h # Task pane UI control
β”‚   └── ...
β”‚
β”œβ”€β”€ πŸ“‚ src/               # Source files (.cpp)
β”‚   β”œβ”€β”€ Connect.cpp       # IDTExtensibility2 implementation
β”‚   β”œβ”€β”€ TaskPaneControl.cpp # UI implementation
β”‚   └── ...
β”‚
β”œβ”€β”€ πŸ“‚ res/               # Resources
β”‚   β”œβ”€β”€ AgenticAIOnWord.rc  # Resource script
β”‚   β”œβ”€β”€ *.rgs              # Registry scripts
β”‚   └── AgenticAIOnWord.def # Module definition
β”‚
β”œβ”€β”€ πŸ“‚ idl/               # Interface definitions
β”‚   └── AgenticAIOnWord.idl
β”‚
β”œβ”€β”€ πŸ“‚ scripts/           # Helper scripts
β”‚   └── RegisterWordAddin.reg
β”‚
β”œβ”€β”€ CMakeLists.txt        # CMake build configuration
└── AgenticAIOnWord.vcxproj # Visual Studio project

πŸ› οΈ Build Requirements

  • Visual Studio 2022 with C++ desktop development
  • Windows SDK 10.0.19041.0 or later
  • Microsoft Office 2010 (32-bit) or later
  • CMake 3.20+ (optional, for CMake builds)

πŸš€ Quick Start

Build

# Using MSBuild (recommended)
msbuild AgenticAIOnWord.vcxproj /p:Configuration=Debug /p:Platform=Win32

# Or using CMake
cmake -B build -A Win32
cmake --build build --config Debug

Register

# Run as Administrator
regsvr32 "Debug\AgenticAIOnWord.dll"

Activate in Word

  1. Open Word 2010
  2. Go to File β†’ Options β†’ Add-ins
  3. Select COM Add-ins β†’ Go...
  4. Check Agentic AI Assistant
  5. Click OK

πŸ—ΊοΈ Roadmap

Phase 1: Database Integration πŸ—„οΈ

  • Integrate SQLite for local storage
  • Store user preferences and settings
  • Cache conversation history
  • Document context persistence

Phase 2: Elegant UI ✨

  • Modern Task Pane design with GDI+
  • Dark/Light theme support
  • Smooth animations and transitions
  • Rich text input with markdown preview
  • Responsive layout

Phase 3: MCP Integration πŸ”Œ

  • Implement MCP Client protocol
  • Connect to MCP-compatible AI servers
  • Tool calling and resource management
  • Streaming responses

Phase 4: Zig MCP Bridge ⚑

  • High-performance MCP client in Zig
  • Async networking with minimal overhead
  • C/C++ interop via Zig's C ABI
  • Cross-platform potential

Phase 5: Advanced Features πŸš€

  • Document analysis and summarization
  • Smart formatting assistance
  • Multi-language support
  • Voice commands (optional)

πŸ—οΈ Architecture

β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
β”‚                     Microsoft Word 2010                      β”‚
β”œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€
β”‚                   AgenticAIOnWord Add-in                     β”‚
β”‚  β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”  β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”  β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”  β”‚
β”‚  β”‚  Task Pane  β”‚  β”‚   Connect   β”‚  β”‚    Word Object      β”‚  β”‚
β”‚  β”‚     UI      │◄──   Handler   │───      Model          β”‚  β”‚
β”‚  β””β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”˜  β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜  β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜  β”‚
β”‚         β”‚                                                    β”‚
β”‚  β”Œβ”€β”€β”€β”€β”€β”€β–Όβ”€β”€β”€β”€β”€β”€β”  β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”                           β”‚
β”‚  β”‚   SQLite    β”‚  β”‚ MCP Client  │◄──── Zig Bridge           β”‚
β”‚  β”‚   Storage   β”‚  β”‚  (C++/Zig)  β”‚                           β”‚
β”‚  β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜  β””β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”˜                           β”‚
β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”Όβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜
                             β”‚
                    β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β–Όβ”€β”€β”€β”€β”€β”€β”€β”€β”
                    β”‚   MCP Server    β”‚
                    β”‚ (Claude, GPT,   β”‚
                    β”‚  Local LLM...)  β”‚
                    β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜

πŸ“š Technology Stack

Component Technology
Core Add-in C++ / ATL / COM
UI Framework Win32 GDI+ / Direct2D
Database SQLite 3
AI Protocol Model Context Protocol (MCP)
High-perf Bridge Zig
Build System MSBuild / CMake

πŸ”§ Development

Adding SQLite Support

#include <sqlite3.h>

// Initialize database
sqlite3* db;
sqlite3_open("agenticai.db", &db);

// Create tables
sqlite3_exec(db, R"(
    CREATE TABLE IF NOT EXISTS settings (
        key TEXT PRIMARY KEY,
        value TEXT
    );
    CREATE TABLE IF NOT EXISTS history (
        id INTEGER PRIMARY KEY,
        timestamp DATETIME DEFAULT CURRENT_TIMESTAMP,
        role TEXT,
        content TEXT
    );
)", nullptr, nullptr, nullptr);

MCP Client Interface (Planned)

class IMCPClient {
public:
    virtual HRESULT Connect(LPCWSTR serverUrl) = 0;
    virtual HRESULT SendMessage(LPCWSTR message, IMCPCallback* callback) = 0;
    virtual HRESULT CallTool(LPCWSTR toolName, LPCWSTR args) = 0;
    virtual HRESULT Disconnect() = 0;
};

πŸ“„ License

MIT License - See LICENSE for details.


🀝 Contributing

Contributions are welcome! Please read the contributing guidelines before submitting PRs.


Made with ❀️ for enhanced document productivity

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published