Agent Self-Knowledge
Self-knowledge lets an agent locate and read the documentation shipped withcognesy/agents. It is an opt-in profile capability: it adds documentation paths
and topic routing, but it does not add a file-reading tool or contact an LLM.
Enabling Self-Knowledge
Install a readable tool,UseSelfKnowledge, and UseSystemPrompt:
UseSelfKnowledge contributes data to the resolved AgentProfile.
UseSystemPrompt is the runtime wiring that renders profile sections into the
state’s system prompt before inference. Calling SystemPromptComposer manually
only renders text for inspection and does not install that lifecycle behavior.
What It Contributes
When enabled,profile()->metadata->get('selfKnowledge') contains:
docsPath: absolute path to the curated package documentationreadmePath: absolute path to the package READMEexamplesPath: monorepo examples path when available, otherwisenulltopics: targeted topic-to-file routes
AgentLoop::describe().
Read-Tool Gate
The defaultrequireReadTool: true contributes nothing unless the resolved
profile contains read, read_file, or a tool tagged with both file and
read. A generic read tag on an introspection or definition tool does not
qualify. This prevents a prompt from advertising files the agent cannot access.
Applications that provide an equivalent read mechanism outside the tool list can
disable the gate explicitly:
Installed Documentation
The agent-facing files are mirrored fromdocs/ to resources/docs/, which is
included in Composer distributions. PackageDocs::installed() resolves paths for
monorepo development, split-package checkouts, and vendor installs.
After changing a routed source document, synchronize and verify the mirror:
Inspecting the Result
No inference is needed to inspect the resolved metadata:tell describe --prompt command follows that same lifecycle path.