Build Learn Prompt • AI Agent SDK

build_learn_prompt: Build a grounded skill-authoring directive from a user request.

build_learn_prompt

Function

</div>

This function is defined in the learn module.

Build a grounded skill-authoring directive from a user request.

This is the skill authoring path: distil a reusable `SKILL.md from real sources. It is complementary to — and distinct from — the memory learn= recall path (conversation→memory extraction) and the automatic self_improve` loop.

Signature

python
def build_learn_prompt(request: str) -> str

Parameters

ParamField str

A natural-language description of the sources to learn from and the skill to produce, e.g. `"Read ./my-repo and the docs in ./docs/*.pdf and make a 'deploy-flow' skill"`.

Returns

ResponseField str

A prompt string that instructs an agent to gather the named sources with its existing tools and author one grounded `SKILL.md via skill_manage`.

Source

View on GitHub

praisonaiagents/skills/learn.py at line 54


Related Documentation