# Knowledge Sources

## Introduction

Stakpak does not treat all knowledge equally.

When you ask a question or give a task, the agent follows a clear knowledge hierarchy to decide where to look first and why.

This ensures answers are aligned with your environment, your standards, and real world DevOps practices, not generic advice.

This page explains the different knowledge sources Stakpak uses, how they are prioritized, and when each one is applied.

## Knowledge Source Hierarchy

Stakpak evaluates knowledge sources in the following order:

1. [rulebooks](https://stakpak.gitbook.io/docs/how-it-works/rulebooks "mention")\
   Rulebooks teach Stakpak your organization’s way of doing things. They’re Markdown based SOPs (standard operating procedures) &#x20;
2. [Paks](https://github.com/stakpak/paks)\
   Reusable [Agent skill](https://platform.claude.com/docs/en/agents-and-tools/agent-skills/overview) packages contributed by the community.
3. Documentation Search\
   It retrieves official external documentation for precise, version-specific information.
4. [memory](https://stakpak.gitbook.io/docs/how-it-works/memory "mention")\
   Memory Blocks are reusable pieces of knowledge that your agent learns during sessions.

This hierarchy exists to ensure responses are:

* Aligned with your standards
* Safe to execute

| Knowledge Source                                                              | Trust Level | Ownership                |
| ----------------------------------------------------------------------------- | ----------- | ------------------------ |
| [rulebooks](https://stakpak.gitbook.io/docs/how-it-works/rulebooks "mention") | Very High   | Organization             |
| [Paks](https://github.com/stakpak/paks)                                       | Medium      | Community                |
| Documentation Search                                                          | Medium      | External (official docs) |
| [memory](https://stakpak.gitbook.io/docs/how-it-works/memory "mention")       | High        | Sessions                 |

**Ready to turn your team’s operational knowledge into something reusable?**

Check [how-to-write-a-rulebook](https://stakpak.gitbook.io/docs/how-it-works/rulebooks/how-to-write-a-rulebook "mention") to create rulebooks that encode how your team operates, or explore community contributed [Paks](https://paks.stakpak.dev/) for battle tested, reusable infrastructure patterns.
