agentleFS
AWSKnown publisheraws/context-ontology-accelerator/coa-skills/control-plane/SKILL.md

control-plane

Skill1.1k starsChanged 16 days agoApache-2.0View on GitHub

Drive a deployed COA (SemanticContextLayer) through its control-plane REST API from an agent - sign in with PKCE, scan and review sources, approve them, start induction, and review, accept, cancel or delete ontologies. Use when loading data into COA, building or rebuilding a namespace's ontology, getting a token for the REST API or MCP server without copying it from the browser, or debugging a source or proposal that is stuck. For sending questions to the serve runtime, read external-docs/content/serve.md.

Trending

More talk lately.thin dataabout the whole repository

Dec 2025: 0 mentionsJan 2026: 0 mentionsFeb 2026: 0 mentionsMar 2026: 0 mentionsApr 2026: 0 mentionsMay 2026: 0 mentionsJun 2026: 0 mentionsJul 2026: 0 mentionsAug 2026: 1 mentionSep 2026: 0 mentionsOct 2026: 2 mentionsNov 2026: 0 mentions
Dec 2025Jun 2026Nov 2026
Mentions a month of the aws/context-ontology-accelerator repository that our weekly crawl found: only 3 in all, so this is a hint, not a trend. There is no adoption data for this file yet.

The file

We split this skill into the rules it gives an agent

10 rules. About 0 are common, 4 are distinctive, and 6 are very specific to this project.

  • ≈0

    Common · estimate

    Many files like this have a rule of this kind.

  • ≈4

    Distinctive · estimate

    This author's own choices. Worth a look.

  • 6

    Very specific

    Tied to their project's names, files or tools. Probably skip.

  • Common
  • Distinctive
  • Very specific
  1. Distinctive:

    Use this skill when:

    line 14
  2. Very specific:

    Docs first: Read the page for the task in external-docs/content/ before you act: sources.md, ontologies.md, agent-access.md, …

    line 24
  3. Distinctive:

    Document formats: Document sources read PDF, TXT, DOCX, MD and HTML.

    line 29
  4. Very specific:

    Namespace tag: Every Glue database, document bucket and JDBC secret needs the tag <prefix>:namespace = <namespace ID>.

    line 32
  5. Very specific:

    Run these from the repository root.

    line 48
  6. Distinctive:

    Call the API with a fresh ID token.

    line 63
  7. Very specific:

    Before deleting an ontology, save it with GET /ontologies/{ontologyId}/download.

    line 85
  8. Very specific:

    Put each CSV in its own S3 folder, such as curated/<table>/data.csv.

    line 90
  9. Very specific:

    Create one Glue table per folder with OpenCSVSerde and skip.header.line.count = 1.

    line 91
  10. Distinctive:

    Check each table's row count in Athena before connecting it to COA.

    line 93

≈ “Common” is an estimate: at least 1 in 5 of the 350,495 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
SKILL.md

COA Control Plane

Overview

The control plane is COA's REST API for everything before a question is asked: sources, steward review, induction, proposals, ontologies and grants. This skill explains the lifecycle and its traps, and ships scripts/coa_login.py, a sign-in helper that gets and refreshes tokens with PKCE so nobody copies a token out of browser DevTools.

Usage

Use this skill when:

  • Signing an agent in to the control-plane REST API or the MCP server.
  • Connecting a Glue database or document source, then scanning, reviewing and approving it.
  • Starting induction, then reviewing, accepting, cancelling or deleting the result.
  • A source or proposal is stuck, or the live ontology still shows a class you removed.

For query requests and the SSE protocol, read external-docs/content/serve.md.

Core Concepts

  • Docs first. Read the page for the task in external-docs/content/ before you act: sources.md, ontologies.md, agent-access.md, role-permission-management.md. API shapes are in models/src/main/smithy/*.smithy. Check the deployed version against VERSION and read the release notes for anything newer.
  • Lifecycle. Scan a source, review its column notes and keys, approve it, then induce. Induction makes a proposal: a draft ontology plus R2RML mappings. Validate and accept it to make it live.
  • One open proposal per namespace. A new induction returns 409 until the open one is accepted, rejected or cancelled.
  • Accept only adds. Accepting merges into the live ontology. To rename or remove a class, delete the ontology and induce again.
  • Tables build the ontology. "Table to Ontology" induction turns tables into classes. Documents build a separate document graph used for search answers.
  • Document formats. Document sources read PDF, TXT, DOCX, MD and HTML. Load spreadsheets as Glue tables instead (see below).
  • Deleting files is not enough. A re-scan of a document source never removes a file deleted from S3. Delete the source and create it again.
  • Busy sources. COA refuses to delete a source while it is scanning (409). Wait for the scan to end.
  • Namespace tag. Every Glue database, document bucket and JDBC secret needs the tag <prefix>:namespace = <namespace ID>. The prefix is the deployment's resource_prefix, coa by default.
  • Models. Model IDs live in the SSM deploy config /{prefix}/config, not in the repo.
  • MCP is read-only. The MCP server's 6 tools (list_metrics, describe_schema, query, translate_sparql, rag_retrieval, graph_traversal) cannot edit sources or ontologies. Edits go through this API.
  • Permissions. manageOntology covers induce, edit, accept and delete. data-steward has it and data-analyst does not.

Quick Start

COA has two public app clients. Use the one that matches the call:

--clientUse forRedirect
webControl-plane REST APIhttp://localhost:5173/authenticate/
mcpMCP server, or direct calls to the serve AgentCore runtime (not the REST API)http://localhost:9876/oauth/callback

Every REST endpoint, including the serve runtime's POST /namespaces/{ns}/query, takes web tokens only and rejects mcp tokens with 403 "explicit deny". Use mcp tokens with the MCP server, or when invoking the serve AgentCore runtime directly. The web redirect is registered only on dev deployments. On other environments, add it to the web client first.

Run these from the repository root. The script is at coa-skills/control-plane/scripts/coa_login.py.

  1. Set three values. COA_DOMAIN is the OAuth base URL that serves /oauth2/authorize and /oauth2/token: the Cognito hosted-UI domain by default, or a custom domain in front of it. On a Cognito deployment, read all three from SSM (<prefix> is the deployment's resource_prefix):
    P=<prefix>; R=<region>
    export COA_DOMAIN=https://$(aws ssm get-parameter --name /$P/cognito-domain-prefix --query Parameter.Value --output text).auth.$R.amazoncognito.com
    export COA_WEB_CLIENT_ID=$(aws ssm get-parameter --name /$P/userpool-client-id --query Parameter.Value --output text)
    export COA_MCP_CLIENT_ID=$(aws ssm get-parameter --name /$P/mcp-client-id --query Parameter.Value --output text)
  2. Sign in once. The browser must run on the same machine as the script:
    python3 coa-skills/control-plane/scripts/coa_login.py login --client web
    python3 coa-skills/control-plane/scripts/coa_login.py status --client web   # expiry only, never tokens
    Tokens are cached in ~/.coa/tokens-web.json and ~/.coa/tokens.json (mode 600). Pass --file to put either somewhere else. COA_TOKEN_FILE changes the mcp cache only.
  3. Call the API with a fresh ID token. The helper refreshes it on its own, and tells you to sign in again when the refresh token has expired:
    TOKEN=$(python3 coa-skills/control-plane/scripts/coa_login.py token --client web)
    curl -s -H "Authorization: Bearer $TOKEN" "$API/namespaces/$NS/sources" | jq '.items[]'
    In Python, with the scripts folder on sys.path: from coa_login import get_token; get_token("id", client="web").

Common calls (prefix each path with $API/namespaces/$NS):

StepCallList key
List sourcesGET /sourcesitems, paged with nextToken
Delete a sourceDELETE /sources/{sourceId}
Start inductionPOST /induce with {"datasource_ids": [...], "ontology_uri_prefix": "...", "strategy": "table_to_ontology"}
Check inductionGET /induce/jobs/{jobId}
List or read proposalsGET /proposals, GET /proposals/{proposalId}proposals, paged with nextToken
Accept or cancelPOST /proposals/{proposalId}/accept, POST /proposals/{proposalId}/cancel
List ontologiesGET /ontologiesontologies, paged with nextToken
Delete an ontologyDELETE /ontologies?ontology_id=<URL-encoded IRI> (202; poll GET /ontologies until it is gone)

Response shapes are in models/src/main/smithy/. A page can be short or empty while nextToken is set, so keep paging until it is absent. The induction, proposal and ontology endpoints take snake_case request keys, as shown above.

Before deleting an ontology, save it with GET /ontologies/{ontologyId}/download.

Load spreadsheets as tables

  1. Save each sheet as a CSV: one header row, unique column names, no merged cells, no line breaks in cells.
  2. Put each CSV in its own S3 folder, such as curated/<table>/data.csv.
  3. Create one Glue table per folder with OpenCSVSerde and skip.header.line.count = 1. A Glue crawler picks a CSV format that splits values containing commas.
  4. Tag the Glue database with the namespace tag.
  5. Check each table's row count in Athena before connecting it to COA.

Common errors

SymptomCauseFix
403 "explicit deny" on the REST APIToken from the mcp clientSign in with --client web
"sign-in expired" from tokenRefresh token expired (12 hours for web, 30 days for mcp)Run login again
Empty list from GET /sourcesReading .sourcesThe list is under items
409 on POST /induceA proposal is still openAccept, reject or cancel it
409 on source deleteSource is scanningWait for the scan to end
A removed class still showsAccept only addsDelete the ontology and induce again
A deleted document still answersRe-scans don't remove filesDelete and re-create the document source
400 on source createMissing namespace tagTag the database, bucket or secret
Answers cover the whole datasetThe question names no entityName a specific customer, product or order

Files

  • scripts/coa_login.py — PKCE sign-in helper for both app clients, with token caching (mode 600) and automatic refresh. Standard library only.

Download now (ZIP)

Does it work?

Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.

No reviews yet

People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.

  • It worked
  • Partly
  • It didn't
What did you use it for? e.g. Reviewing pull requests in a Rails app

Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.

Your trail

Files you open will collect here, so you can find them again.

Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.

Now do this for your own.

Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.