prompt_tool.md · 3.9 KB

Prompt Tool

Summary

The Prompt Tool enables the management, storage, and execution of prompts within the mindX system. Prompts are treated as first-class infrastructure, stored in memory, and can be versioned, shared, and executed by agents.

Technical Explanation

The Prompt Tool follows mindX doctrine:

Architecture

Prompt Types

Categories

Prompts are organized by mindX layers:

Usage

Creating a Prompt

from tools.prompt_tool import PromptTool
from agents.memory_agent import MemoryAgent

memory_agent = MemoryAgent() prompt_tool = PromptTool(memory_agent=memory_agent)

result = await prompt_tool.execute( operation="create", name="mindX Inception", content="You are mindX, an augmentic deployment platform...", description="Core mindX inception prompt", prompt_type="inception", category="governance", tags=["core", "inception", "platform"], author="system" )

Retrieving a Prompt

result = await prompt_tool.execute(
    operation="get",
    prompt_id="prompt_id_here"
)

content = result["content"] metadata = result["metadata"]

Executing a Prompt with Variables

result = await prompt_tool.execute(
    operation="execute",
    prompt_id="template_prompt_id",
    variables={
        "agent_name": "MyAgent",
        "task": "Analyze data"
    }
)

executed_content = result["executed_content"]

Searching Prompts

result = await prompt_tool.execute(
    operation="search",
    query="inception",
    search_content=True
)

prompts = result["results"]

Ingesting from External Sources

result = await prompt_tool.execute(
    operation="ingest",
    name="AgenticPlace Prompt",
    content="...",
    source="AgenticPlace",
    prompt_type="agent",
    category="development"
)

Versioning Prompts

result = await prompt_tool.execute(
    operation="version",
    prompt_id="original_prompt_id",
    new_content="Updated prompt content...",
    version_notes="Added new instructions"
)

Operations

Integration

The Prompt Tool integrates with:

File Structure

data/prompts/
├── prompt_registry.json    # Metadata registry
└── {prompt_id}.prompt      # Individual prompt files

All DocumentsDocument IndexThe Book of mindXImprovement JournalAPI Reference