Context Loader for Openclaw

An advanced context loading skill that retrieves business knowledge networks, object instances, and subgraph relationships for AI agents.

yannan
v1.0.0
Mar 24, 2026
0
748
0

Install & Download

1. ClawHub CLI

The fastest way to install a skill directly from the registry.

npx clawhub@latest install contextloader

2. Manual Installation

Copy the skill folder to one of these locations

Global
~/.openclaw/skills/
Workspace
<project>/skills/

Priority: Workspace > Local > Bundled

3. Prompt Installation

Copy this prompt to OpenClaw to install it automatically.

Help me install contextloader using Clawhub. If Clawhub is not installed, install it first (npm i -g clawhub).

Prefer to download?

Get the raw skill files in a ZIP archive.

What is Context Loader?

Context Loader is a specialized tool within the Openclaw Skills ecosystem designed to bridge the gap between AI agents and structured business knowledge. It enables agents to perform deep conceptual searches, identify object or action classes, and query specific instances within a knowledge graph. By leveraging the Context Loader API, agents can dynamically expand their understanding of a business domain through subgraph exploration and logical property analysis.

This skill is particularly powerful for complex enterprise environments where data isn't just text, but a web of interconnected entities. It allows for high-precision retrieval of business logic, metrics, and actionable object metadata, ensuring that the AI operates with the most relevant and technically accurate business context available.

Context Loader Use Cases

  • Retrieving specific concepts, object classes, or relationship types related to a user query.
  • Querying instances under a known object category within a business network.
  • Expanding the graph context around a specific object instance to understand its relationships.
  • Calculating logical properties or key performance indicators (KPIs) for specific data instances.
  • Recalling executable actions based on real-world object identities.
  • Monitoring or triggering the reconstruction of knowledge network build tasks.

How Context Loader Works

  1. The agent identifies the required knowledge network ID (kn_id), typically by parsing the SOUL.md file in the workspace.
  2. Concept recognition is performed using kn_schema_search if object or action IDs are unknown.
  3. For vague queries, a hybrid search is executed via kn_search to locate relevant nodes.
  4. Once IDs are confirmed, the agent calls query_object_instance to fetch specific data.
  5. If further context is needed, query_instance_subgraph is used to map out surrounding entity relationships.
  6. Logical properties or actions are retrieved only after a verified _instance_identity is obtained.

Context Loader Setup

To enable Context Loader in your Openclaw Skills environment, configure the following environment variables:

# The base URL for the Context Loader (agent-retrieval) service
export CONTEXT_LOADER_BASE_URL="http://agent-retrieval:30779"

# The unique account ID for authentication mapping
export APP_USER_ID="your_user_id_here"

Ensure that a SOUL.md file exists in your agent's workspace with a ## Business Knowledge Network section containing a table with Name and Address columns for automatic ID discovery.

Context Loader Data Schema & Taxonomy

The skill interacts with a structured knowledge graph schema and expects data to be organized as follows:

Identifier Description
kn_id Knowledge Network ID, extracted from BKN URLs or workspace config.
ot_id / at_id Object Type or Action Type identifiers.
_instance_identity A unique, verified identifier for a specific graph instance.
BKN Address URLs containing patterns like /knowledge-networks/ or /bkns/.

All API interactions prioritize response_format=json and require specific headers: x-account-id (from APP_USER_ID) and x-account-type: app.

Context Loader Advanced Features

  • Automated kn_id extraction from SOUL.md using regex patterns and semantic matching.
  • Multi-step subgraph expansion for deep relational context mapping.
  • Execution of dynamic action tools based on real-time instance state.
  • Strict validation logic to prevent the hallucination of object identities or schema types.
  • Support for complex filtering using value_from: const constraints in queries.

SKILL.md


Loading

Related Openclaw Skills

METADATA

Github Stars: 0
forks: 0

Featured*