Skip to main content

Cube

Lets agents read Cube's semantic layer: list cubes, measures and dimensions, and load data through the REST API.

Connect it with: API key. Cube's own documentation: https://docs.cube.dev/reference/core-data-apis/rest-api.

What agents can do​

Connect Cube so the agents working your tasks can reach it. With it connected, they can:

  • List the cubes and views in the data model with their measures, dimensions and segments.
  • Load data with a REST query (measures, dimensions, filters, time ranges) and read the result.
  • Translate a query to the SQL Cube would run, to check or explain a number.

Before you start​

  • A Cube Cloud deployment (or self-hosted Cube) whose REST API is reachable over https.
  • An API token for the deployment. The one Cube Cloud shows carries no security context; sign your own JWT with the API secret if your model uses one.
  • A Jaah account. Anyone can add a personal secret; an organization secret needs an Org Owner or Admin.

Connect with Cube​

Jaah connects to Cube with an API key, not with a sign-in button.

Connect with an API key​

Find each value first:

  • Instance URL: Cube Cloud > your deployment > Overview > API credentials > REST (JSON) API: the address before /cubejs-api/v1 (for self-hosted Cube, your server's https address).
  • API token: A JWT signed with the deployment's API secret (CUBEJS_API_SECRET): in Cube Cloud, Overview > API credentials > REST (JSON) API shows a ready-made token; for self-hosted Cube, sign one with your server's secret.

Then add it to Jaah:

  1. In Jaah, open Secrets, select New, and pick the Cube card.
  2. Name the secret and choose who can use it.
  3. Fill in Instance URL, API token.
  4. Select Save. Jaah tests the secret straight away (see Test the connection).

Jaah encrypts what you type and never shows it again — not to you, and not to an admin.

Use your own OAuth app​

Not used: Jaah connects to Cube with an API key, not through an OAuth app.

Test the connection​

Select Test on the secret. Jaah calls Cube's API once (GET <Instance URL>/cubejs-api/v1/meta) with the stored values, and shows whether Cube accepted it, or which value Cube refused and the status it answered. Jaah also tests automatically when you save or reconnect.

The last result and its time stay on the secret's page, so you can see whether it still works without testing again.

Who can use it​

Every secret has an owner, and the owner decides who can use it:

  • Personal — only your own tasks can use it. This is the default.
  • Organization — every task in the organization can use it. Only Org Owners and Admins can choose this.
  • Attached to a project — every task on that project can use it, whoever started the task. See Attach a secret to a project.

More on owners and access: How secrets work.

Use it in an agent session​

An agent asks for the secret with its credential_get tool, by the secret's path, when it needs it, and gets the values for that one call. The path is the owner's prefix and the secret's name:

  • org/<name> for an organization secret,
  • projects/<project>/<name> for one attached to a project,
  • me/<name> for your personal one.

A key connection hands the agent its fields: base_url, api_token.

Tell the agent in your task description which secret to use, for example “use the Cube secret org/cube”.

Manage, rotate or disconnect​

Everything is on the secret's page under Secrets:

  • Rotate a key: create a new key at the vendor first, then select Replace on the secret and paste it. Revoke the old key at Cube once the test passes. Steps: Replace or delete a secret.
  • Disconnect: select Delete. The stored values are destroyed and agents lose access on their next call. To end access at Cube's side too, revoke or delete the key at Cube.

Limitations​

  • Tokens are JWTs: one with an exp claim stops working when it expires, and one signed with a rotated API secret stops working at once.
  • The REST API reads data only; changing the data model is done in the deployment's Git repository.
  • A Cube server reachable only on a private network cannot be tested or used from Jaah.
  • Agents can do only what the connected Cube account allows.

Troubleshooting​

Test says Cube rejected the API token (403)

Cube answers a token it cannot verify with 403. Copy the token again from Overview > API credentials, or sign a new JWT with the deployment's current API secret, then select Replace on the secret.

Test says Cube returned HTTP 404

The Instance URL includes a path. Enter only the part before /cubejs-api/v1, such as https://example.gcp-us-central1.cubecloudapp.dev.

Test says Cube returned HTTP 500 or the meta call times out

The deployment is asleep, still building or its data model has an error. Open the deployment in Cube Cloud, fix the build, and test again.

Still stuck? Select Test and read the result: it names the value Cube refused and the status it answered.

FAQ​

Can agents change the data model?

Not through this connection. The model lives in the deployment's Git repository: connect that repository's forge to let agents propose model changes as pull requests.

Can Jaah or an admin see the key or token?

No. Jaah stores it encrypted and never shows it again. Only the tasks allowed to use the secret receive it, at the moment they ask for it.

Can I connect more than one Cube account?

Yes. Add one secret per account, each with its own name, and tell the agent which one to use.