Tools Skills Memory

Last updated: May 9, 2026

Tools, Skills & Memory

The dLANDiscord assistant doesn't just process text; it interacts with the world via Tools, expands its capabilities via Skills, and remembers what it learns via Memory.

The Tool System

Agents define their available tools in markdown files (assistant/prompts/tools/{agent}/*.md). Each tool definition includes:

  • Description: What the tool does and when to use it.
  • Parameters: The inputs the tool accepts (JSON schema).
  • Access: The RBAC roles permitted to use the tool (optional; if omitted, available to all).
  • Implementation: How the tool is executed (Go function, shell script, or internal API).

Tool definition format:

# tool_name
## Description
What the tool does and when to use it. Include best practices and usage tips.
## Parameters
{"type": "object", "properties": {...}, "required": [...]}
## Access
MasterAdmin, Partner, Friend (comma-separated roles that can use this tool)

Example with full sections:

# manage_notes
## Description
Manage your user's personal notes, todo lists, and reminders.
**Board Selection Guide:**
- Agent Board (is_agent_note: true): YOUR workspace - full autonomy
- User Board (is_agent_note: false): GUEST - only add when explicitly asked
## Parameters
{
    "type": "object",
    "properties": {
        "action": {"type": "string", "enum": ["add", "list", "update"]},
        "title": {"type": "string"},
        "is_agent_note": {"type": "boolean"}
    },
    "required": ["action", "is_agent_note"]
}
## Access
Friend, Partner, Business, MasterAdmin

Progressive Disclosure

Tools use progressive disclosure to reduce context bloat:

  • Initial load: Only tool name + one-liner (first 120 chars of description)
  • Full details: Use get_capabilities to see complete definitions including parameters
  • This keeps initial context lean while still providing full info on demand

Tool Execution Types

  • Native Go: High-performance internal calls (e.g., websearch, csf_management, hosting_upsell_advisor).
  • Bash/Shell: External scripts for infrastructure management (e.g., shell_execution, proxmox, cpanel_whm).
  • Internal APIs: Interaction with other Go modules (e.g., wow_character_check, discord_msg_send).

Tool Directories

Directory Purpose
prompts/tools/shared/ Available to all agents
prompts/tools/{agent-name}/ Agent-specific tools (e.g., nikki/, sasha/, sysafe/)
prompts/tools/subagents/ AntFarm/Business tools (queen, ant workers)
prompts/tools/planner/ Planner-only tools (plan, call_agent, recovery)
prompts/tools/mrtool/ MrTool system tools (create, test, validate)
prompts/tools/readytools/ Staging area for new tools awaiting approval

Hard-Coded Tool Handlers

These tools are intercepted in ExecutePendingTools() before generic routing:

  • finish_task — Ends ReAct loop with final answer
  • plan — Initiates planner workflow (requires AdaptivePlannerSession)
  • call_agent — Delegates to another agent
  • ask_user_for_clarification — Requests user input
  • schedule_task — Schedules future execution
  • get_capabilities — System introspection
  • get_calendar — Google Calendar integration (internal function)
  • MCP tools — Fallback to GlobalMCPClient execution

Skills: Modular Competencies

Skills are reusable sets of tools and prompts that define a specific capability (e.g., jira-management, network-auditing).

  • Dynamic Loading: Agents can "activate" a skill during a session to gain access to its specialized tools.
  • Skill Storage: Skills are stored as JSON manifests in assistant/skills/.
  • Creation: Skills can be created and updated by the MrTool autonomous tool system.
  • 92+ Skills defined covering web development, security auditing, infrastructure, and more.

Skills Import Capability

As a private system (not open-source), there is no community marketplace. However, skills can be imported from external sources and converted:

Source Format Import Method
OpenClaw/ClawHub SKILL.md Convert to internal tool definition format
Hermes Agent JSON skills Parse and convert to tool definitions
GitHub .md skill files Clone repo, map to system format
Google Gemini Function schemas Convert to tool definitions

External skills are converted to the internal format with proper RBAC gating and live-loaded without restart.

Skill Structure:

{
  "skill_id": "webdev",
  "name": "Web Development",
  "required_tools": ["pm_write_file", "pm_shell"],
  "swarm_config": {
    "default_ants": 3,
    "max_parallel": 5
  }
}

Memory & Persistence

The assistant uses several layers of memory to provide a consistent and helpful experience.

1. Short-Term Memory (Session Context)

  • ChatSession: Stores the conversation history for the current interaction.
  • Context Injection: The system automatically injects relevant facts, user roles, and system state into the agent's prompt for every message.

2. Working Memory (KnownFacts)

  • Discovery: During a session, agents can discover new facts (e.g., "Server A's IP is 192.168.1.10") and save them to KnownFacts.
  • Cross-Task Sharing: KnownFacts are shared between parent and child agents during a single session, ensuring consistent information across delegations.

3. Long-Term Memory (3-Tier System)

File: assistant/conversation_intelligence.go

The memory system uses three tiers, each with a character budget:

Tier File Path Budget Content
Shared assistant/memory/shared_long_term.md 4,000 chars Cross-agent knowledge
Agent assistant/memory/{agent}_long_term.md 8,000 chars Agent-specific expertise
User assistant/memory/{user}/{agent}_memory.md 4,000 chars Per-user personalization

RBAC Gating: Guest users only see their own user-level memory. Shared and agent memories are restricted to Friend+ roles.

Significance Priority: When truncation is needed, entries with significance 4-5 (Foundational) are preserved first, then 3 (Utility), then 1-2 (Recent).

Excluded Agents: 20 agent types (workers, hive employees, utility agents) are excluded from memory saving via memorySkipAgents.

4. Conversation Intelligence (3-Phase System)

The conversation intelligence system processes chat sessions through three phases:

  1. End-of-Session Summaries — Structured JSONL output with WIS/WIH/WID model, significance scoring (1-5), and 15+ extracted fields
  2. Memory Distillation — Routes insights to the 3 memory tiers, user-isolated processing, max 50 conversations per pass
  3. Playbook Discovery — Identifies repeatable workflow patterns (4+ tools, 3+ occurrences) and generates playbook candidates

See Conversation Intelligence for full details.

5. RAG (Retrieval-Augmented Generation)

  • assistant/rag.go: Search through documentation and logs using Ollama embeddings for complex queries.

The Memory Loop

  1. Ingress: A message is received.
  2. Hydration: BuildMemoryContext() loads the 3 memory tiers (shared, agent, user) with significance-based prioritization.
  3. Discovery: The agent uses tools to discover new information.
  4. Retention: The agent saves new facts to the session's KnownFacts.
  5. Summary: On session end, generateConversationSummary() creates a structured JSONL summary.
  6. Distillation: RunMemoryDistillation() processes summaries and routes insights to memory tiers.
  7. Reflection: RunMemoryReflection() retroactively assigns significance and deduplicates.

See Security & RBAC for how tool access is controlled, Conversation Intelligence for the 3-phase memory system.