Skip to content

Keys for helper agents and CI

After this guide you can give a helper agent, a scheduled job, or a CI pipeline access to one product with exactly the permission it needs, and take it away again.

A connection made by sign-in acts as you, in every organization you belong to. That is right for the agent you work with. It is too much for a job that runs unattended.

A product key is a secret that starts with eik_. It reaches one product, with one scope, and nobody has to sign in. A key does not expire. It works until you revoke it.

Give a key the lowest scope that does its job.

Scope It can
read Read the whole product: overview, capabilities, records, and search
channels Everything in read, plus report runs
propose Everything in channels, plus stage proposals and raise questions
write Everything in propose, plus commit records directly, decide proposals, and answer and close questions

read, channels, propose, and write each include the one before.

The Agent keys form describes each scope in plain words.

Scope MCP tools
read list_products, get_product_overview, get_product_capability, get_product_records, search_product_records, get_product, open_product, show_intent, show_change, show_question
channels adds report_process_run
propose adds propose_product_change, escalate_question
write adds update_product

A client that connects with a key is offered only the tools its scope allows. create_product and create_product_agent_key are never available to a key. They need a person’s connection.

  1. Open the product and choose Connections, then Agent keys.
  2. Give the key a label that says what uses it, such as “Release pipeline”.
  3. Choose what the key can do, then Generate product key.
  4. Copy the secret now. It is shown once. Emergent Instruments stores a hash of it and the first characters, so that you can recognise it in the list.

An agent connected by sign-in can call create_product_agent_key with a name and a scope. The secret comes back once in the result. A key cannot create another key.

Any member of the organization can create read, channels, and propose keys. Only an organization admin can create a write key.

A key connects directly over HTTP: the agent, script or pipeline sends it as a Bearer token, with nothing to install. An empty product’s quickstart calls this Direct CLI. The API’s base address is:

https://emergentinstruments.com/api/orgs/<org id>/product

The organization’s id and the product’s id are shown in Connections under Advanced & developer settings.

Read the product’s records, for example to archive them with a release. This needs the read scope:

Terminal window
curl -sS "https://emergentinstruments.com/api/orgs/$EI_ORG_ID/product" \
-H "Authorization: Bearer $EI_PRODUCT_KEY" \
-o product.json

The response is one JSON object with the product’s revision, a digest, its records, and its proposals, questions, and runs.

Report a run from a pipeline step. This needs channels or higher:

Terminal window
curl -sS -X POST "https://emergentinstruments.com/api/orgs/$EI_ORG_ID/product/runs" \
-H "Authorization: Bearer $EI_PRODUCT_KEY" \
-H "Content-Type: application/json" \
-d '{
"processId": "release.ship",
"processTitle": "Release pipeline",
"status": "completed",
"summary": "Build 412 passed the release checks."
}'

processId is the id of the flow or capability the run belongs to. status is running, completed, blocked, or escalated. The run appears in the product’s Runs & audit tab.

Status error Meaning
401 invalid_token The key is unknown or revoked
402 payment_required The key’s organization is not on a paid plan
403 access_denied The address names another organization or product
403 insufficient_scope The key’s scope is too low. The body names both

Only for an MCP client that cannot sign in. Most apps should add the Connector instead and sign in, with no key (see the Quickstart). The agent address also takes the same Bearer token. In a client that reads an mcpServers JSON file:

{
"mcpServers": {
"emergent-instruments-jot": {
"type": "http",
"url": "https://mcp.emergentinstruments.com/mcp",
"headers": {
"Authorization": "Bearer eik_..."
}
}
}
}

The key already names its product, so tools need no product_id. Passing another product’s id is refused.

Store the key as a secret in your CI system, never in the repository. Use one key for each pipeline, so that revoking one does not stop the others.

What a pipeline can do with a key is read the product, report a run, and, with propose, stage a proposal for a person to review.

Open Connections, then Agent keys. Each key shows its label, its first characters, when it was created, and when it was last used. Choose Revoke. The key stops working at once.

A member can revoke the keys they created. An organization admin can revoke any key in the product.

  • Treat a key like a password. Anyone who has it can do what its scope allows in that product.
  • Do not give a write key to anything you would not let change the product without review.
  • A key moves with its product when an admin moves the product to another organization.