Skip to main content

List the learned rules and skills this session loads

GET 

/session/learned

Lists the learned rules and skills the session loads, so you can review what an auto-evolving agent saved. Learned files live in two learned directories: .agents/learned/ in the session's workspace (scope workspace), and the deployment's global learned directory that every session reads (scope global). Each holds rules under rules/ and skills under skills/<name>/SKILL.md.

Workspace files come first, then global ones, each group sorted by kind (rule before skill) and then by name. Each rule says whether it loads on every turn and its estimated token count.

  • Select the session with the X-Session-ID header.
  • Only regular files count. Symbolic links are left out, rule files must end in .md, and rule directories nested deeper than 8 levels are not read, matching what the harness loads.
  • A learned directory that does not exist lists nothing. The list is not paged.
  • Returns 404 with code SESSION_NOT_FOUND when the session does not exist.

Request​

Responses​

Every learned rule and skill the session loads, workspace files first.

Response Headers
    X-Session-ID

    The session this response belongs to. For session-scoped requests it echoes the X-Session-ID request header; for POST /sessions/open and POST /sessions/system it is the session that was opened or created.

    X-Request-ID

    The request's correlation ID. When the request carried an X-Request-ID header holding a UUID, Peen echoes it; otherwise Peen generates a new UUID. The controller log records the same value for this request.