Buffaly Logo
Core Concept

Memory and skills

Standard agents forget who you are every time you clear the chat. Buffaly is built to compound intelligence over time. It does this through two distinct systems: Ontology Memory (remembering facts) and Skills (learning behaviors).

The Difference: Facts vs. Behaviors

To use Buffaly effectively, you must understand the difference between saving a piece of context and teaching the runtime a new capability.

Memory (Ontology)

Memory is for state and facts. Use it to store preferences, environment URLs, repository paths, contact names, and architectural rules. Memory is static knowledge Buffaly references when making decisions.

Skills (Code)

Skills are for behaviors and execution. Use skills to teach Buffaly how to perform a specific workflow. Skills convert repeated text-based reasoning into permanent, deterministic code.

Structured Ontology Memory

When you ask a standard agent to "remember" something, it appends a string of text to a hidden system prompt. This eventually leads to context collapse. Buffaly uses a semantic graph called an Ontology.

How it works

When Buffaly learns a fact, it maps it as a typed object. For example, if you tell it about a "Remote Care Program," it doesn't just save the text; it creates a structured semantic entity that your entire runtime can query natively.

// How Buffaly stores a memory entity internally
[SemanticEntity("remote care program")]
prototype RemoteCareProgram : CareProgram {
    String ProgramCategory = "Remote Care";
}

What goes in Memory?

  • Default file paths and repos.
  • Project coding conventions.
  • Testing requirements.
  • Names of staging environments.

How to ask

"Remember that our primary front-end repository is located at C:\dev\Buffaly.Web and we always use Tailwind for styling. Save this as a durable fact."

Skills & Self-Evolution

If you find yourself explaining the same multi-step workflow to Buffaly over and over, you are doing it wrong. You should tell Buffaly to write a Skill.

Skills promote unreliable, prompt-driven behavior into deterministic software execution. There are two types of skills:

Level 1 Prompt Skills

A saved, repeatable set of instructions. When invoked, Buffaly loads these instructions exactly as written. This is perfect for text-heavy operations like formatting release notes or writing standard PR descriptions.

"Create a new Prompt Skill called 'Format Release Notes' that takes a git diff and outputs our standard markdown format."

Level 2 ProtoScript Skills (Self-Evolution)

This is where Buffaly shines. A ProtoScript Skill is actual, typed code written in Buffaly's native engine language. When you ask Buffaly to convert a workflow into a ProtoScript skill, it writes a permanent tool that executes natively, bypassing the LLM's reasoning engine entirely for that specific task.

"We just successfully staged that patient data file. Write a ProtoScript Action to do this automatically next time, taking the source directory and target database as typed arguments."

The Escalation Path: When to use which

Follow this rule of thumb to keep your Buffaly environment clean, fast, and cheap:

  • 1
    Is it a static fact? Save it to Ontology Memory.
  • 2
    Is it a text-generation workflow? Save it as a Prompt Skill.
  • 3
    Is it an operational workflow with steps and data? Tell Buffaly to write a ProtoScript Skill. (Token costs drop to near-zero for future executions).
  • 4
    Does it require complex external auth or massive native processing? Build a custom C# Service or MCP server.

Do not put secrets in Memory

Ontology memory and Skills are stored in plaintext databases or files that can be queried, compacted, or sent back into prompt contexts. Never ask Buffaly to "remember" a password, API key, bearer token, or database credential.

If a workflow requires credentials, configure them in your secure environment variables, user secrets manager, or an authorized Service connection. Ask Buffaly to reference the secret store, not to memorize the value.

Where to go next