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
Who's talking about aws/context-ontology-accelerator
- skaiy/wild_agentos“arch(identity): Agent 主体、委托上下文与 Cedar 策略设计稿——act 声明、RFC 8693、自签兜底、角色层级(docs/33)/ Agent identity & policy …”GitHub · Oct 8, 2026
- Amitro123/knowledgeBase-Agent“Clean up the Google Sheet so the graph gets real topics (Category values, duplicates, empty tabs)”GitHub · Oct 4, 2026
- @rewse.jp“AWS Summit Japan でコードネームOrionとして紹介した Context Ontology Accelerator を Apache 2.0 ライセンスで公開しました!…”Bluesky · Aug 1, 2026
The biggest 3 of 3 mentions linking to the repository that our crawl found. Each line is their own headline.
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
- Distinctive: line 14
Use this skill when:
- Very specific: line 24
Docs first: Read the page for the task in external-docs/content/ before you act: sources.md, ontologies.md, agent-access.md, …
- Distinctive: line 29
Document formats: Document sources read PDF, TXT, DOCX, MD and HTML.
- Very specific: line 32
Namespace tag: Every Glue database, document bucket and JDBC secret needs the tag <prefix>:namespace = <namespace ID>.
- Very specific: line 48
Run these from the repository root.
- Distinctive: line 63
Call the API with a fresh ID token.
- Very specific: line 85
Before deleting an ontology, save it with GET /ontologies/{ontologyId}/download.
- Very specific: line 90
Put each CSV in its own S3 folder, such as curated/<table>/data.csv.
- Very specific: line 91
Create one Glue table per folder with OpenCSVSerde and skip.header.line.count = 1.
- Distinctive: line 93
Check each table's row count in Athena before connecting it to COA.
≈ “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.
Files
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 inmodels/src/main/smithy/*.smithy. Check the deployed version againstVERSIONand 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'sresource_prefix,coaby 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.
manageOntologycovers induce, edit, accept and delete.data-stewardhas it anddata-analystdoes not.
Quick Start
COA has two public app clients. Use the one that matches the call:
--client | Use for | Redirect |
web | Control-plane REST API | http://localhost:5173/authenticate/ |
mcp | MCP 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.
- Set three values.
COA_DOMAINis the OAuth base URL that serves/oauth2/authorizeand/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'sresource_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) - Sign in once. The browser must run on the same machine as the script:
Tokens are cached inpython3 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~/.coa/tokens-web.jsonand~/.coa/tokens.json(mode 600). Pass--fileto put either somewhere else.COA_TOKEN_FILEchanges themcpcache only. - 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:
In Python, with the scripts folder onTOKEN=$(python3 coa-skills/control-plane/scripts/coa_login.py token --client web) curl -s -H "Authorization: Bearer $TOKEN" "$API/namespaces/$NS/sources" | jq '.items[]'sys.path:from coa_login import get_token; get_token("id", client="web").
Common calls (prefix each path with $API/namespaces/$NS):
| Step | Call | List key |
| List sources | GET /sources | items, paged with nextToken |
| Delete a source | DELETE /sources/{sourceId} | |
| Start induction | POST /induce with {"datasource_ids": [...], "ontology_uri_prefix": "...", "strategy": "table_to_ontology"} | |
| Check induction | GET /induce/jobs/{jobId} | |
| List or read proposals | GET /proposals, GET /proposals/{proposalId} | proposals, paged with nextToken |
| Accept or cancel | POST /proposals/{proposalId}/accept, POST /proposals/{proposalId}/cancel | |
| List ontologies | GET /ontologies | ontologies, paged with nextToken |
| Delete an ontology | DELETE /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
- Save each sheet as a CSV: one header row, unique column names, no merged cells, no line breaks in cells.
- Put each CSV in its own S3 folder, such as
curated/<table>/data.csv. - 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. - Tag the Glue database with the namespace tag.
- Check each table's row count in Athena before connecting it to COA.
Common errors
| Symptom | Cause | Fix |
| 403 "explicit deny" on the REST API | Token from the mcp client | Sign in with --client web |
"sign-in expired" from token | Refresh token expired (12 hours for web, 30 days for mcp) | Run login again |
Empty list from GET /sources | Reading .sources | The list is under items |
409 on POST /induce | A proposal is still open | Accept, reject or cancel it |
| 409 on source delete | Source is scanning | Wait for the scan to end |
| A removed class still shows | Accept only adds | Delete the ontology and induce again |
| A deleted document still answers | Re-scans don't remove files | Delete and re-create the document source |
| 400 on source create | Missing namespace tag | Tag the database, bucket or secret |
| Answers cover the whole dataset | The question names no entity | Name 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.
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
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.

