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.
The Prompt Tool follows mindX doctrine:
data/prompts/ with a registry in prompt_registry.jsonsystem: System-level prompts (inception, core instructions)agent: Agent-specific promptsuser: User-defined promptstemplate: Reusable prompt templates with variablesinception: Platform initialization promptsinstruction: Instruction sets for agentsPrompts are organized by mindX layers:
marketing: Marketing and narrative promptscommunity: Community and governance promptsdevelopment: Development and deployment promptscognition: Cognitive and reasoning promptsexecution: Execution and orchestration promptsgovernance: Governance and alignment promptsfrom 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"
)
result = await prompt_tool.execute(
operation="get",
prompt_id="prompt_id_here"
)
content = result["content"]
metadata = result["metadata"]
result = await prompt_tool.execute(
operation="execute",
prompt_id="template_prompt_id",
variables={
"agent_name": "MyAgent",
"task": "Analyze data"
}
)
executed_content = result["executed_content"]
result = await prompt_tool.execute(
operation="search",
query="inception",
search_content=True
)
prompts = result["results"]
result = await prompt_tool.execute(
operation="ingest",
name="AgenticPlace Prompt",
content="...",
source="AgenticPlace",
prompt_type="agent",
category="development"
)
result = await prompt_tool.execute(
operation="version",
prompt_id="original_prompt_id",
new_content="Updated prompt content...",
version_notes="Added new instructions"
)
create: Create a new promptget: Retrieve a prompt by IDupdate: Update an existing promptdelete: Delete a promptlist: List all prompts (with optional filters)execute: Execute a prompt with variable substitutionsearch: Search prompts by content or metadataversion: Create a new version of a promptingest: Ingest a prompt from external sourceThe Prompt Tool integrates with:
data/prompts/
├── prompt_registry.json # Metadata registry
└── {prompt_id}.prompt # Individual prompt files