Skip to main content

Tutorial: Creating Your First Skill

Overview

In this tutorial, we’ll create a Memory Query Skill that allows Souls to search and retrieve information from their memory graph. This is a practical skill that will be immediately useful for the Soul Kernel v0.1 demo.

Prerequisites

  • Completed the Setup Guide
  • Soul CLI installed (soul --version)
  • Basic Rust knowledge
  • Understanding of the Memory Graph

What We’ll Build

A Memory Query Skill that:
  • Searches the Soul’s memory graph
  • Filters memories by type, time, or content
  • Returns relevant memories with context
  • Demonstrates async operations
  • Shows proper error handling
This skill will enable conversations like:
  • “What do you remember about our last conversation?”
  • “When did we talk about robotics?”
  • “Show me all memories tagged with ‘important‘“

Step 1: Create the Project

This creates a project structure optimized for cognitive skills:

Step 2: Update Dependencies

Edit Cargo.toml to add memory graph dependencies:

Step 3: Define Query Types

Create src/query_parser.rs:
Create src/memory_search.rs:

Step 5: Implement the Skill

Update src/lib.rs:

Step 6: Write Tests

Create comprehensive tests in tests/integration_test.rs:

Step 7: Create a Demo

Create examples/demo.rs:
Run the demo:

Step 8: Build and Test

In the REPL:

Step 9: Package and Deploy

Next Steps

Now that you have a working Memory Query Skill:
  1. Enhance the Parser: Add support for more natural language patterns
  2. Implement Vector Search: Use embeddings for semantic similarity
  3. Add Memory Graph Integration: Connect to the actual Soul memory storage
  4. Create Companion Skills: Build skills that write memories, not just read them
  5. Add Async Support: Make database queries non-blocking

Advanced Features to Explore

  • Conversation Context: Track conversation flow in memories
  • Memory Importance: Auto-calculate importance based on usage
  • Privacy Filters: Respect user privacy preferences
  • Export Formats: Support different output formats (Markdown, JSON, etc.)
  • Memory Visualization: Create visual representations of memory connections

Conclusion

You’ve created a practical skill that demonstrates:
  • ✅ Natural language query parsing
  • ✅ Multiple search strategies
  • ✅ Structured data handling
  • ✅ Error handling
  • ✅ Performance considerations
  • ✅ Real-world utility
This Memory Query Skill can be immediately integrated into any Soul to provide memory search capabilities, making it a perfect addition to the Soul Kernel v0.1 demo!

Change Log

  • 2025-06-12: Created complete Memory Query Skill tutorial
    • Practical example for v0.1 demo
    • Full implementation with query parsing
    • Comprehensive testing approach
    • Integration with Soul CLI