ontology-core

Manage knowledge networks, data sources, data views, and Vega observability via the ontology CLI.

2.5k|134|Updated Jun 6, 2025
One-click install
npx skills add https://github.com/UnicomAI/wanwu --skill ontology-core
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: ontology-core
Source: https://github.com/UnicomAI/wanwu/tree/main/configs/microservice/bff-service/configs/agent-skills/ontology/ontology-core
Command: npx skills add https://github.com/UnicomAI/wanwu --skill ontology-core

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve?

Operating a knowledge network platform (BKN), data sources, data views, and the Vega observability stack normally requires calling many different REST APIs by hand. This Skill wraps all of them behind the built-in ontology CLI so an AI agent can build knowledge networks, query schemas and instances, run semantic searches, execute actions, and inspect platform health from natural-language instructions.

Core Features & Use Cases

  • Knowledge Network (BKN) Operations: Create, validate, push, pull, build, and query knowledge networks, object types, relation types, and action types, including building a KN directly from a database or CSV files.
  • Data Source & Data View Management: Connect MySQL/PostgreSQL and other databases, list tables, import CSVs, browse atomic/custom data views, and run SQL queries against views.
  • Vega Observability & Generic API Calls: Run health checks, catalog/resource inspection, connector-type listing, and arbitrary authenticated REST calls via ontology call.
  • Use Case: Ask the agent to "build a knowledge network from the ERP MySQL database and list the top 5 products by quantity" — it connects the data source, creates and builds the KN, then queries object-type instances with proper pagination and filters.

Quick Start

Ask the agent to list all knowledge networks and check Vega platform health using the ontology CLI.

Frequently Asked Questions about ontology-core

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I build a knowledge network from a MySQL database?

Connect the database with `ontology ds connect mysql <host> <port> <db> --account <user> --password <pass>`, then run `ontology bkn create-from-ds <ds_id> --name <name> --build`. Verify with `ontology bkn object-type list` and an instance query.

How do I query object-type instances with filters?

Use `ontology bkn object-type query <kn-id> <ot-id>` with a JSON body containing a flat condition like {"field":"quantity","operation":">","value":4000}. Combine conditions with operation "and"/"or" and sub_conditions, and keep limit at 30 or below.

Why does my object-type query return a 400 InvalidParameter error?

Operators like eq, gt, lt, gte, and lte are not valid and return 400. Use ==, !=, >, >=, <, <=, in, not_in, like, or not_like instead; match and contain only work on OpenSearch indexes, not SQL views.

How do I avoid truncated JSON output from ontology commands?

Keep query limits at 10-30, page with the returned search_after cursor, and project large list outputs through jq (for example `.entries[] | {id, name}`). First run `| jq 'keys'` or `| jq 'type'` to confirm the response structure before applying a template.

Does the ontology CLI require login or environment variables?

No login, tokens, or environment variables are needed; the CLI has built-in service addresses and auth is disabled in this deployment. You must pass --user-id <accountId> before the subcommand, and the business domain defaults to bd_public unless overridden with -bd.

Can I use the ontology CLI for agent, skill, toolbox, or dataflow operations?

No. Those command groups have been removed from the CLI and the corresponding services are not deployed in this environment. Requests for agent, skill, toolbox, dataflow, or context-loader features should be declined rather than attempted.