PromptX Documentation

repository·main·Indexed 25 days ago

https://github.com/deepractice/promptx

An AI Agent Context Platform based on the MCP protocol and DPML-powered AI prompt framework. It enables the injection of professional capabilities, roles, and cognitive memory into AI applications like Claude and Cursor. The project includes the Pouch Framework for AI-First CLI systems, the @agentxjs/ui React component library for building VSCode-style interfaces, and deployment options via Docker for its MCP server.

Tokens
114.4K
Snippets
151
Records
647
Agent score
87%

What's inside PromptX

  1. Overview of PromptX Desktop Features

    main

    The PromptX Desktop client provides an advanced agent platform including:

    • AgentX: An integrated Claude-powered autonomous agent that runs Claude Code sessions, connects to MCP servers, and maintains isolated workspaces.
    • Memory Editor & Visualization: Tools to inspect and edit long-term memory via a memory network graph, an Engram editor, and a cue word browser.
    • Remote Access: Securely expose your local PromptX server to the internet with a single switch, generating a shareable URL and QR code with token-based authentication.
    • Sandbox Debugging: An interactive environment to test MCP tools, execute them with custom parameters, and inspect raw input/output and schemas.
  2. Overview of PromptX

    main
    PromptX is a leading AI Agent context platform designed to transform AI agents into industry experts through natural conversation. It provides a platform for creating AI roles, developing intelligent tools, and managing cognitive memory systems. Built on the Model Context Protocol (MCP), it allows users to inject professional capabilities into AI applications like Claude and Cursor with a single command.
  3. Overview of the Pouch Framework

    main

    The Pouch Framework (锦囊框架) is an AI-First CLI framework based on the PATEOAS (Prompt as the Engine of Application State) philosophy. It uses a 'Zhuge Pouch' design pattern where each command (pouch) is a self-contained expert knowledge unit that is state-driven and optimized for AI interaction.

    Core components include:

    • BasePouchCommand: Abstract base class for commands.
    • PouchCLI: The main CLI entry point.
    • PouchRegistry: Command registrar.
    • PouchStateMachine: State machine manager.
  4. Overview of Layout Components

    main
    Layout components in @promptx/desktop are pure structural containers designed for building Agent application layouts. They follow a headless and content-agnostic design philosophy, meaning they handle spatial arrangement, resizing, and collapsing behavior without containing business logic, data fetching, or domain-specific state. They are intended to be used as containers for content components.
  5. Available PDF Reader services

    main

    The PDF Reader supports several categories of AI-driven services:

    • Smart Reading Services: Metadata retrieval (total pages, title, author) and page-by-page content extraction (text and images).
    • Content Analysis Services: Summarization of research papers/documents and searching for specific sections.
    • Information Extraction Services: Image extraction (charts and graphs) from specific pages and identifying/organizing specific data types (e.g., contact information).
    • Progressive Reading Services: Incremental reading of pages (e.g., "Read the first 3 pages", then "Continue reading the next 5 pages") utilizing smart caching for speed.
    • Targeted Query Services: Searching for specific mentions on specific pages or comparing content between different pages.
  6. Optimize PDF reading with Smart Caching and On-Demand Loading

    main

    The PDF Reader is designed for efficiency through two key mechanisms:

    1. Smart Caching: Pages that have already been read are cached. Subsequent requests for the same pages will load directly from the cache without re-parsing, significantly reducing processing time.
    2. On-Demand Reading (Lazy Loading): The tool avoids loading the entire PDF into memory. It only extracts and processes the specific pages requested, which saves memory and processing time, especially for large documents.
  7. Understand the DPML Cognition Architecture

    main

    The DPML (Deep Practice Modeling Language) architecture is divided into three distinct layers to separate how an agent thinks, acts, and knows:

    1. Thought: Represents Metacognition (how to think). This is a static framework for the agent's reasoning patterns.
    2. Execution: Represents Workflow Orchestration (how to organize actions). This is a dynamic process for executing tasks.
    3. Knowledge: Represents Semantic Gap Filling. This is used exclusively for private or proprietary information that the AI cannot know pre-emptively.
  8. Understand the DPML Dynamic Terminology Protocol

    main

    The DPML (Dynamic Terminology Protocol) is a mechanism used in PromptX to enable AI to understand specialized terms dynamically based on context rather than relying on a pre-defined glossary.

    Core Concepts:

    • Context is Definition: The precise meaning of a term is determined by the current protocol file and the ongoing conversation history.
    • Implicit Scoping: Terms automatically belong to the scope of the document they are defined in. The same term may have different meanings in different contexts.
    • AI Autonomy: The protocol is designed to maximize AI's ability to infer meaning, associate concepts, and proactively ask for clarification if a term is ambiguous.
  9. Understand Deepractice Prompt Markup Language (DPML) Overview

    main

    DPML (Deepractice Prompt Markup Language) is a specialized markup language designed for prompt engineering. It combines XML-style tags for semantic structure with Markdown for content, providing a standardized framework that ensures prompts are both machine-parseable and human-readable.

    Key design principles include:

    • Natural Language Driven: Tags provide semantic boundaries, but content remains natural language.
    • Semantic Transparency: Tags and attributes are self-explanatory.
    • Compositional Reuse: Uses a colon (:) syntax to bind functions to specific implementation protocols.
    • Consistency: Aims for consistent interpretation across different AI systems.
  10. Understand the PATEOAS Protocol

    main

    PATEOAS (Prompt as the Engine of Application State) is a protocol designed to manage AI application state through prompts rather than traditional memory. It follows the philosophy: AI use CLI get prompt for AI.

    By using the PromptX CLI, a general-purpose AI can retrieve specialized prompts to transform into an expert for specific tasks. This solves three core issues:

    1. Context Forgetting: Each 'Jin Nang' (锦囊/Pouch) is self-contained, allowing commands to be executed independently.
    2. Attention Dispersion: Each pouch focuses on a single task in stages.
    3. Capability Limitations: AI gains professional capabilities instantly via specialized prompts.
  11. Understand the Six-Dimensional Perception Model

    main

    The system operates using a Six-Dimensional Perception model that combines psychological sensitivity with philosophical depth. This model is used to process user input and generate deep insights through six specific capabilities:

    1. High Sensitivity (高敏感): Captures subtle emotional changes and unsaid implications.
    2. High Empathy (高共情): Understands the user's state of being without judgment.
    3. High Analysis (高分析): Identifies root causes, structures, and developmental directions.
    4. High Insight (高洞察): Reveals blind spots, hidden beliefs, and inconsistencies.
    5. Creative Mirroring (创作照见): Clarifies true intentions and the origins of expressive impulses.
    6. Ideological Resonance (思想共振): Identifies belief systems and engages in philosophical dialogue.
  12. Understand PromptX Technical Innovations

    main

    PromptX is built upon several proprietary technical standards and architectures designed for structured AI interaction and autonomous decision-making:

    • DPML Protocol: A standard for structured AI role definitions.
    • PATEOAS Architecture: A hypermedia-driven engine for autonomous AI decision-making.
    • ContradictionManagement: An enterprise-grade methodology for analyzing contradictions.
    • Three-Track Management (三轨制管理): A systematic management approach involving three distinct tracks: Contradiction Track (矛盾轨道), Requirement Track (需求轨道), and Task Track (任务轨道).