Psi exposes a self-describing EQL graph at session root. This graph surface is intended to help humans and future ψ discover what is queryable before guessing attribute names or internal paths.
The graph surface provides:
This is a capability graph.
:attribute values annotate those edges with operation IO attrs.This is not a full dependency graph.
When exploring a running psi instance, prefer this sequence:
:psi.graph/root-queryable-attrs.:psi.graph/capabilities and :psi.graph/domain-coverage.Examples:
[:psi.graph/root-seeds]
[:psi.graph/root-queryable-attrs]
[:psi.graph/capabilities]
[:psi.graph/domain-coverage]
Then query discovered attrs directly, for example:
[:psi.agent-session/phase :psi.agent-session/model]
[:git.repo/status :git.worktree/count]
[:psi.memory/status]
Prompt lifecycle introspection example:
[:psi.agent-session/last-prepared-turn-id
:psi.agent-session/last-prepared-message-count
:psi.agent-session/last-execution-turn-id
:psi.agent-session/last-execution-turn-outcome
:psi.agent-session/last-execution-stop-reason]
:psi.graph/root-seedsThe root context attrs injected for session-root querying.
Current seeds are:
:psi/agent-session-ctx:psi/memory-ctx:psi/recursion-ctx:psi/engine-ctxThese seeds are diagnostic/discovery information. They are not included in
:psi.graph/root-queryable-attrs.
:psi.graph/root-queryable-attrsA sorted vector of keyword attrs reachable from the root seeds via resolvers.
Contract:
:psi.graph/resolver-countCount of registered resolver operations in the introspected graph.
:psi.graph/mutation-countCount of registered mutation operations in the introspected graph.
:psi.graph/resolver-symsSet of qualified resolver symbols.
:psi.graph/mutation-symsSet of qualified mutation symbols.
:psi.graph/env-builtBoolean indicating that a non-empty introspection graph/env is available.
This should be read as a practical readiness signal for graph discovery, not as proof of a stronger internal compiler lifecycle state.
:psi.graph/nodesVector of graph nodes.
Node types are restricted to:
:resolver:mutation:capabilityTypical node fields include:
:id:type:domain:symbol for operation nodes:operation-count for capability nodes:psi.graph/edgesVector of graph edges.
Each edge includes:
:from:to:attributeEdge semantics:
:from is an operation node id:to is a capability node id:attribute annotates the edge with one IO attr from that operation:attribute may be:
nil when an operation has no IO attrs:psi.graph/capabilitiesRich per-domain summaries for domains present in the graph.
Typical fields include:
:id:domain:operation-count:resolver-count:mutation-count:operation-symbols:attributesThis surface is useful when you want a richer picture of what a domain exposes.
:psi.graph/domain-coverageNormalized per-domain operation counts.
Fields:
:domain:operation-count:resolver-count:mutation-countThis surface differs from :psi.graph/capabilities:
capabilities reports only domains present in the graphdomain-coverage includes required zero-count domainsCurrent required domains are:
:ai:history:agent-session:introspection[:psi.graph/resolver-count
:psi.graph/mutation-count
:psi.graph/resolver-syms
:psi.graph/mutation-syms
:psi.graph/env-built
:psi.graph/nodes
:psi.graph/edges
:psi.graph/capabilities
:psi.graph/domain-coverage]
[:psi.graph/root-seeds
:psi.graph/root-queryable-attrs]
[:psi.graph/capabilities
:psi.graph/domain-coverage]
[:git.worktree/list
:git.worktree/current
:git.worktree/count
:git.worktree/inside-repo?]
Implementation:
components/agent-session/src/psi/agent_session/resolvers.cljcomponents/introspection/src/psi/introspection/graph.cljTests:
components/agent-session/test/psi/agent_session/graph_surface_test.cljcomponents/introspection/test/psi/introspection/graph_test.cljCan you improve this documentation?Edit on GitHub
cljdoc builds & hosts documentation for Clojure/Script libraries
| Ctrl+k | Jump to recent docs |
| ← | Move to previous article |
| → | Move to next article |
| Ctrl+/ | Jump to the search field |