Documentation Index
Fetch the complete documentation index at: https://docs.oktolabs.ai/llms.txt
Use this file to discover all available pages before exploring further.
Knowledge Graph queries
Pulse exposes 14 read-only KG tools:- 9 primary query tools — typed, opinionated answers to the questions agents ask most often.
- 5 power tools — escape hatches for arbitrary Cypher, natural-language search, schema introspection, grounding verification, and a reflective retrieve-critic stub.
okto-pulse-core/src/okto_pulse/core/infra/permissions.py:PERMISSION_REGISTRY):
- The 9 primary tools sit under
kg.query.*— granted as a wildcard or per-tool (kg.query.decision_history,kg.query.global, …). - The 5 power tools split across
kg.power.natural,kg.power.schema_info,kg.power.cypher.kg.power.cypheris the most restricted and is typically excluded from default presets. kg.power.cypherand the natural-language tool also write to the per-node hit counter that feedsrelevance_scoreover time — every read result you take from these tools is logged.
kg_query_reflective is the sole exception and is a V1 stub.)
For the schema (11 node types, 10 rel types + belongs_to, 5 HNSW indexes) and tool inventory, see overview.
Primary query tools (9)
Source:okto-pulse-core/src/okto_pulse/core/mcp/kg_query_tools.py:register_kg_query_tools. Citations below reference 80-pulse-feature-inventory.md:519–531.
okto_pulse_kg_get_decision_history
Trace decisions about a topic over time. Hybrid HNSW + title-CONTAINS search, results ordered chronologically with supersedence chain summaries.
okto_pulse_kg_get_related_context
2-hop neighborhood traversal around a single node. Supports edge type filter, direction filter, max depth (default 2, cap 4).
okto_pulse_kg_get_supersedence_chain
Walk the supersedes chain for a decision (max depth 10). Returns nodes in newest-to-oldest order.
okto_pulse_kg_find_contradictions
Find contradicts edges. With no node_id, returns all contradiction pairs on the board. With node_id, returns the pairs anchored at that node.
okto_pulse_kg_find_similar_decisions
Hybrid ranked similarity. The reranking formula is fixed in kg_service.py:244:
relevance_score on each node — do not conflate the two (80-pulse-feature-inventory.md:957).
okto_pulse_kg_explain_constraint
Returns the origin spec/decision for a Constraint node, related constraints, and any Bug nodes that record violations of it.
okto_pulse_kg_list_alternatives
For a Decision, return the Alternative nodes that were considered and discarded, with the recorded reason_discarded.
okto_pulse_kg_get_learning_from_bugs
Trace Learning nodes derived from bugs in an area, via Learning → Bug validates edges.
okto_pulse_kg_query_global
Cross-board semantic search via the global discovery layer (~/.okto-pulse/global/discovery.lbug). ACL-filtered: only returns nodes from boards the calling agent’s API key can read.
Power tools (5)
Source:okto-pulse-core/src/okto_pulse/core/mcp/kg_power_tools.py:register_kg_power_tools. Citations: 80-pulse-feature-inventory.md:535–543.
These are escape hatches. Reach for them when the typed primary tools don’t cover the question, when you need full schema introspection, or when you need to verify an answer is grounded in actual graph data.
okto_pulse_kg_query_cypher
Read-only Cypher against the board graph. Safety rails:
- Write keywords (
CREATE,DELETE,MERGE,SET,REMOVE) are rejected by whitelist. LIMITis auto-injected if the query lacks one.- Variable-length paths bounded to
*..20. - 30-second timeout.
- 30 requests / minute / agent rate limit.
okto_pulse_kg_query_natural
Plain-English question against the graph. Hybrid embedding + HNSW + 1-hop traversal expansion. No LLM — deterministic.
okto_pulse_kg_schema_info
Schema introspection. Use this to assert the live schema version before issuing version-specific Cypher, or to discover new node/edge types after an upgrade.
okto_pulse_kg_verify_grounding
Verify that an agent-generated answer is actually backed by retrieved KG nodes. V1: deterministic entity check + Jaccard fallback at 0.7 threshold.
okto_pulse_kg_query_reflective
V1 stub of the reflective retrieve-critic loop. Returns a single retrieve+critic pass. The full multi-step loop requires an LLM callable wired through the Python API — this MCP variant is intentionally a thin stub.
Choosing a tool
| You want… | Use |
|---|---|
| Decisions about a topic, ordered in time | kg_get_decision_history |
| Everything within 2 hops of a node | kg_get_related_context |
| The full supersedes chain back to the root | kg_get_supersedence_chain |
| Pairs of nodes that contradict each other | kg_find_contradictions |
| Top-N decisions by hybrid similarity score | kg_find_similar_decisions |
| The origin and downstream impact of a constraint | kg_explain_constraint |
| Why an alternative was rejected | kg_list_alternatives |
| Lessons from past bugs in an area | kg_get_learning_from_bugs |
| Cross-board semantic search | kg_query_global |
| An arbitrary read query | kg_query_cypher |
| Plain-English question against this board | kg_query_natural |
| The live schema | kg_schema_info |
| Verify an answer is grounded in graph data | kg_verify_grounding |
| One-shot reflective retrieve | kg_query_reflective |
Determinism note
Every primary query and every power tool exceptkg_query_reflective is deterministic over a fixed graph state. Same board_id + same input + same graph.lbug snapshot = same output. This is what makes the KG safe to depend on for long-horizon agent decisions.
Next steps
Consolidation
Write nodes and edges into the graph through transactional sessions.
Health & migration
Operate the consolidation pipeline: queue depth, dead-letter, decay tick, schema migration.