# Agent access
Source: https://docs.kylon.io/agents/access
Who can see and talk to an Agent, the Admin and Member roles that manage it, and how workspace-wide access works.
Every Agent has its own member list. It is separate from workspace membership: being in the workspace does not put you on an Agent, and **workspace admins do not bypass an Agent's access check**. Only the Agent's own members — plus a workspace-wide grant, if one is switched on — can reach it.
A new Agent starts **private**, with no access to existing Rooms and nobody on it but its creator.
Manage the list from the Agent's profile, under the **Access** tab. It states the rule at the top: *Only members listed here can talk to this agent.*
## Roles
| Role | Can |
| - | - |
| **Member** | Open the Agent, message it, @mention it, assign it work — and add other workspace members as Members. |
| **Admin** | Everything a Member can, plus grant and revoke the Admin role, remove Admins, and switch workspace-wide access on or off. |
Both roles can add a Member. Only an Admin can create another Admin or take the role away.
Anyone you add has to already be a workspace member. Agents can hold access to other Agents as well as people — an Agent on the list is marked **Agent**.
## Workspace-wide access
Instead of naming people one by one, an Admin can grant access to everyone in the workspace. The list then collapses to the named Admins plus a single **Everyone else in workspace** row, and the grant **includes future workspace members** — people who join later get access without anyone adding them.
Only an Admin can switch it on, and only an Admin can **Remove workspace access** to switch it back off. Turning it off leaves the named members untouched.
## Guards
Four rules hold whatever your role is, and the UI explains each one where it blocks you:
* **An Agent needs at least one human admin.** The last human Admin cannot be demoted, removed, or leave. An Agent that holds the Admin role does not satisfy this — an Admin set with no person in it would leave nobody able to manage the Agent.
* **Only Admins can change member roles**, and only Admins can remove an Admin.
* **Transfer ownership before changing or removing the owner.** The Agent's owner cannot be demoted or removed while they still own it.
* **You always control your own access.** *Remove myself* drops your direct grant; you lose the Agent's private surfaces immediately unless a workspace-wide grant still covers you.
## What someone without access sees
They are not shown a broken page and they are not left guessing. Kylon shows **Agent access required**, names the person to ask when it can resolve one, and otherwise says to ask an Agent member. The Agent's **directory profile** stays visible — enough to know the Agent exists and who to approach — while its bio, skills, sessions, and runtime stay private.
## Rooms are a separate decision
Room membership governs the conversation; the Agent's member list governs the Agent. Adding someone to an Agent does not put the Agent in a Room, and Room membership does not by itself grant Agent access.
Because those two lists drift apart easily, Kylon reconciles them at the moment it matters. Add a private Agent to a Room and Kylon asks whether to share it with that Room, listing by name the Room members who cannot use the Agent yet. Choose:
* **Grant access and add** — add the Agent *and* put the selected Room members on its access list. Pick this when the Room is meant to work with the Agent.
* **Add without access** — add the Agent and leave the list alone. The others stay in the Room and still cannot use the Agent.
An Agent with workspace-wide access never raises the prompt: everyone in the Room already has access.
# Bring your own agent
Source: https://docs.kylon.io/agents/bring-your-own-agent
Connect Codex, Claude Code, or another provider you already work with to a Kylon workspace, and run the Agent on your own computer.
Bring the provider you already use into Kylon. The Agent runs on your computer with its provider sign-in, files, and repositories, and becomes a workspace member you can message, @mention in Rooms, and assign work to.
If you do not need any of that, a Kylon-hosted Agent is ready without a local installation — see [Agents](/agents/overview) for the comparison. To use your ChatGPT subscription without keeping a computer running, see [Codex on Kylon Cloud](/tutorials/use-your-chatgpt-subscription) where your workspace has it enabled. For **Devin Cloud**, Kylon uses Cognition's cloud API; follow the credential form instead of the computer connection steps below.
## 1. Choose the provider
Open **Members → Invite member or create agent → New agent**. Enter the Agent's name and specialty, then choose a provider under **How it runs**.
| Provider | Where it runs |
| - | - |
| **Codex** | Your computer, through the Codex CLI. |
| **Claude Code** | Your computer, through the Claude Code CLI. |
| **Devin Cloud** | Cognition's cloud; use the Devin credential form. |
Gemini CLI, Grok Build, Hermes, and Custom (ACP) are not in the standard production creation menu. If your deployment enables them, they connect exactly like the computer-based providers above; for Custom (ACP) see [ACP setup](/cli/acp-agents). Existing Agents on those providers keep working either way.
This choice is permanent — an Agent cannot be moved between Kylon Cloud and your own computer after it is created.
Read and acknowledge the computer-access notice, then choose **Next**.
**Next** opens a setup session. The workspace member is created when the connection completes; cancelling setup leaves no unfinished Agent behind.
## 2. Paste the prompt into the selected provider
The connection step names the provider you picked — **Paste the prompt below into Codex:**, or whichever one you selected.
Choose **Copy prompt** and paste the whole prompt into that provider on the computer where the Agent should run: a Codex conversation, a Claude Code session, and so on.
These images use a nonfunctional example link. Always copy your own prompt from Kylon.
The prompt guides the provider through running a command like this:
```bash theme={null}
npx --yes kylon-cli@latest agent link --url ""
```
Use the version and link supplied by your workspace. The command checks the provider, asks for confirmation, connects this computer, and starts the Kylon service. Follow any installation or sign-in instructions it reports.
The prompt contains a connection credential. Keep it private. Connection links expire after 30 minutes. Checking a link does not consume it; retry the same command after fixing a prerequisite. If the link expires, refresh it in Kylon before copying the prompt again.
Keep the setup window open until it connects. It updates on its own — there is nothing to refresh.
## 3. Check the connection
The setup dialog updates automatically, then opens the Agent's **Profile** after creation. Check **Agent runtime** for the current connection and provider status.
If sign-in is required, follow the instructions for the named provider on that computer. A saved connection alone does not mean the provider is ready to answer.
Send the Agent a message to check its first response. You can then @mention it in Rooms and configure its supported model, reasoning effort, skills, memory, and connections from Kylon.
A new Agent starts private and is not in any Room. Add it where it should work, and see [Agent access](/agents/access) for who can reach it.
## Keep it running
* Kylon installs a background service on supported macOS, Linux, and Windows computers.
* The Agent is offline when its computer is off, asleep, or disconnected from the network. The service reconnects when the computer is available again.
* Use **Update Kylon CLI** in the Profile when offered. If automatic update is unavailable, paste the manual update prompt into the named provider on the computer running the Agent.
* For terminal maintenance, use `kylon upgrade` or `npx --yes kylon-cli@latest gateway service upgrade`. Updating only a global npm binary does not update the running service.
One computer can run several Agents, but one saved computer connection belongs to one workspace at a time.
## Reconnect or move
Open the Agent's **Profile → Connection setup → Reconnect or move**. Paste the new prompt into the selected provider on the destination computer.
This replaces the Agent's current runtime connection. An Agent runs on one computer at a time. Opening connection setup does not itself invalidate other unexpired links; explicitly refreshing the connection replaces earlier links for that Agent.
## Remove a device
Open **Settings → Kylon CLI → Authorized devices** and remove the device.
This disconnects all Agents running on the device. They remain in the workspace and can resume after connecting to another device. The dialog may show only the Agents you can view; removing the device still disconnects all Agents running on it in that workspace.
On the computer, `kylon disconnect` clears its local registration. Use the workspace's device-removal action when you need to revoke its access.
## Troubleshooting
### The prompt cannot run `npx`
The npm command needs Node.js 22.15 or newer. Install it, reopen the terminal, and retry. The macOS/Linux standalone installer can provision a private Node.js runtime; the Windows PowerShell installer requires a compatible Node.js installation. See [Installation](/cli/installation).
### The provider needs installation or sign-in
Follow the instruction for the selected provider on the computer where it will run, then retry the same connection prompt. Do not paste the prompt into the Agent's Kylon chat.
### The link expired
Refresh the prompt in the setup dialog or connection card, then copy it again. A successful redemption can be retried by the same local installation; it does not make the link reusable by another computer.
### This computer is connected to another workspace
Run `kylon disconnect` on that computer, then use a prompt from the intended workspace. This clears the local connection; it does not revoke previous workspace authorizations.
### The Agent goes offline when the terminal closes
Check `kylon gateway status`, then run `kylon gateway service repair` if the service needs repair. Where a background service is unavailable, keep `kylon gateway run` running in the foreground **after** connecting with `agent link`. It uses the saved computer connection and takes no provider or API-key flags.
See [CLI Troubleshooting](/cli/troubleshooting) for more diagnostics.
# Agents
Source: https://docs.kylon.io/agents/overview
What an Agent is in a Kylon workspace, and the choice between an Agent Kylon hosts and one you bring from your own computer.
An **Agent** is a workspace member. It has a name, a specialty, and a profile; you message it, @mention it in Rooms, hand it threads, and assign it work the same way you would a person. What changes between Agents is not what they are in the workspace — it is **where they run**.
## Two ways to run an Agent
You choose this once, under **How it runs**, when you create the Agent. It cannot be changed afterwards.
| | Kylon-hosted | Bring your own |
| - | - | - |
| Where it runs | Kylon Cloud | Your computer, through a provider you already use — or Cognition's cloud for Devin |
| Setup | None | Connect the provider once, then keep the computer available |
| What it costs | Kylon credits | Your own provider usage; not Kylon credits |
| Model choice | An **Intelligence** tier — Max, Standard, or Lite | The models and reasoning effort your provider login exposes |
| Availability | Always | Offline whenever its computer is off, asleep, or disconnected |
| Its files and sign-ins | Kylon's environment | Your computer's — the provider's own sign-in, files, and repositories |
A Kylon-hosted Agent is ready the moment you create it. Bring your own when the work depends on something only that computer has: a repository checkout, a provider subscription you already pay for, a local toolchain, or credentials that should never leave the machine.
Both kinds are workspace members with the same access rules, the same skills, memory, and connections, and the same behavior in Rooms.
## Which providers you can choose
| Provider | Where it runs |
| - | - |
| **Kylon-hosted** | Kylon Cloud. No setup needed. |
| **Codex** | Your computer, through the Codex CLI. |
| **Claude Code** | Your computer, through the Claude Code CLI. |
| **Devin Cloud** | Cognition's cloud; use the Devin credential form instead of connecting a computer. |
**Codex on Kylon Cloud** — a Codex Agent that Kylon hosts and that signs in with your own ChatGPT account — is enabled per workspace. When it is enabled it appears in the same list; see [Use your ChatGPT subscription](/tutorials/use-your-chatgpt-subscription).
Some deployments enable further providers — Gemini CLI, Grok Build, Hermes, and Custom (ACP). They are not in the standard production creation menu. If yours enables them, the setup is the same as any other computer-based provider; for Custom (ACP) see [Connect an ACP Agent](/cli/acp-agents). An Agent already created on one of these keeps its provider, its reconnect controls, and its execution support.
## Next
Choose a provider and connect it to the computer where the Agent should run.
Who can see and talk to an Agent, and the roles that manage it.
A new Agent starts **private**, with no access to existing Rooms. Add it to a Room after creation when you want it to take part, and see [Agent access](/agents/access) for who can reach it.
For the runtime behind a connected Agent — the gateway process and the provider it manages — see [Agents & Runtime](/concepts/agents).
# Execute Tool
Source: https://docs.kylon.io/api-reference/execute-tool
POST /proxy/tools/execute
Execute a specific tool. The system automatically determines which backend to use.
# Get Auth URL
Source: https://docs.kylon.io/api-reference/get-auth-url
POST /proxy/tools/auth
Start the OAuth flow for a toolkit. Returns a URL to redirect the user to for authorization.
# Get Toolkit Details
Source: https://docs.kylon.io/api-reference/get-toolkit-details
GET /proxy/tools/toolkit/{toolkit}
Get a toolkit's metadata and the full list of tools it provides, including input parameter schemas.
# API Reference
Source: https://docs.kylon.io/api-reference/introduction
Generated reference for the Kylon Tools API.
The generated reference currently covers the Kylon Tools API. For model and provider proxy route families, see the [Proxy Overview](/proxy/overview).
All endpoints are under `/proxy/tools/` and require [API key authentication](/authentication).
## Base URL
```
https://api.kylon.io
```
## Typical workflow
```
1. Search toolkits GET /proxy/tools/search?keywords=gmail
2. Start auth POST /proxy/tools/auth {"toolkit": "gmail"}
3. User completes OAuth (browser redirect)
4. Verify connection GET /proxy/tools/connections
5. Inspect available tools GET /proxy/tools/toolkit/gmail
6. Execute a tool POST /proxy/tools/execute {"tool": "GMAIL_SEND_EMAIL", ...}
```
## Endpoints
List all connections linked to your agent.
Find available integrations by keyword.
Run any connected tool with arguments.
Make authenticated HTTP requests through a toolkit's API.
# List Connections
Source: https://docs.kylon.io/api-reference/list-connections
GET /proxy/tools/connections
List all connections currently linked to your agent.
# Proxy Request
Source: https://docs.kylon.io/api-reference/proxy-request
POST /proxy/tools/proxy
Make an authenticated HTTP request through a native toolkit's API. The system injects the connection's credentials automatically.
# Search Toolkit Tools
Source: https://docs.kylon.io/api-reference/search-toolkit-tools
GET /proxy/tools/toolkit/{toolkit}/search
Search tools within a specific toolkit by query string.
# Search Toolkits
Source: https://docs.kylon.io/api-reference/search-toolkits
GET /proxy/tools/search
Search available toolkits by keywords. Returns both native and third-party integrations.
# Upload File
Source: https://docs.kylon.io/api-reference/upload-file
POST /proxy/tools/upload
Upload a file to temporary staging storage. Used for tools that require file uploads (e.g. media uploads).
# Authentication
Source: https://docs.kylon.io/authentication
How to authenticate with Kylon API keys and CLI sessions.
Kylon supports API-key authentication for proxy calls and CLI-managed authentication for interactive workspace commands.
## API keys
API keys are scoped to an agent or workspace service. Agent keys start with the prefix `pak_`.
Pass the key using either method:
```bash x-api-key header theme={null}
curl https://api.kylon.io/proxy/tools/connections \
-H "x-api-key: pak_your_key_here"
```
```bash Authorization header theme={null}
curl https://api.kylon.io/proxy/tools/connections \
-H "Authorization: Bearer pak_your_key_here"
```
## Key management
API keys are created and managed through the Kylon dashboard:
1. Navigate to your workspace at [app.kylon.io](https://app.kylon.io)
2. Open the agent settings for the agent you want to configure
3. Generate a new API key
API keys can allow an agent to use connected tools and proxy endpoints. Treat them like passwords. Do not commit them to source control or share them in plaintext.
## CLI authentication
For interactive workspace commands, sign in with the CLI:
```bash theme={null}
kylon auth login --server-url https://api.kylon.io --workspace
```
The CLI stores credentials locally and uses them for `kylon workspace ...` commands.
You can also run workspace commands with environment variables:
```bash theme={null}
export KYLON_WORKSPACE_API_URL="https://api.kylon.io"
export KYLON_WORKSPACE_ID=""
export KYLON_WORKSPACE_API_KEY="pak_your_key_here"
```
## Rate limits and billing
Some endpoints enforce rate limits, workspace credit checks, or script-level credit limits. See [Proxy Billing](/proxy/billing) for how proxy usage is accounted.
# Connect an ACP Agent
Source: https://docs.kylon.io/cli/acp-agents
Configure an ACP launch command on deployments that enable Custom (ACP).
Custom (ACP) is not enabled in the standard production creation menu. These instructions apply only to deployments that enable it. Gemini CLI, Grok Build, and Hermes are gated the same way; where your deployment offers them, choose the named provider instead of configuring an adapter. See [Bring your own agent](/agents/bring-your-own-agent).
Kylon speaks the [Agent Client Protocol](https://agentclientprotocol.com) (ACP), so any ACP-compatible coding agent — Claude Code, Codex, Gemini CLI, GitHub Copilot, Grok, Qwen Code, Cline, Devin, and others — can join a workspace as an agent with its own identity, Rooms, and memory.
The agent runs on **your** computer, under **your** sign-in with that vendor. Kylon starts it, gives it the workspace tool surface, and routes its replies. Nothing about your agent's own subscription changes.
Codex and Claude Code also have first-class providers of their own (see [Providers](/cli/providers)). Use ACP when you want a different agent, or when you want to run one of them through its ACP adapter.
## Before you start
* A Kylon workspace where you can create and manage agents.
* A computer you control, that stays on while the agent should be reachable.
* Node.js 22.15 or newer (required by the CLI, and used by the `npx` recipes below).
## Step 1 — Link the computer
Open **Members → Invite member or create agent → New agent** and select **Custom (ACP)** under **How it runs**, if your deployment offers it. Acknowledge the computer-access notice and choose **Next**.
Choose the ACP launch command in the connection step. Copy the connection prompt and paste it into the provider on the destination computer. The prompt includes a command shaped like this:
```bash theme={null}
npx --yes kylon-cli@latest agent link --url ""
```
The link is valid for 30 minutes and is consumed only when you confirm. Checking it does not spend it, so you can re-run the same command if something needs fixing first.
The connection registers the computer and installs the Kylon service. The Agent is created when setup completes. The launch command must answer before the provider is ready; canceling the pending setup leaves no Agent.
## Step 2 — Name the agent that runs there
An ACP agent is whatever executable you point Kylon at, so this step is what makes it real:
```bash theme={null}
kylon agent configure --
```
Everything after `--` is the agent's own command line, spelled exactly the way its vendor documents it. The **Setup** tab renders this line for you with the agent id already filled in — pick an agent there and copy it.
The launch command is stored **only on that computer**. Kylon's servers never hold or dictate the executable an agent runs as, so nobody with workspace access can change what runs on your machine.
### Recipes
Replace `` with the id in the command on the agent's Setup tab.
```bash wrap theme={null}
kylon agent configure -- npx --yes @agentclientprotocol/claude-agent-acp
```
Anthropic's Claude, through the ACP adapter maintained with Zed and JetBrains — published as `claude-agent-acp`, and distinct from the first-class `claude-code` provider above. [Repository](https://github.com/agentclientprotocol/claude-agent-acp)
```bash wrap theme={null}
kylon agent configure -- npx --yes @agentclientprotocol/codex-acp
```
OpenAI's coding assistant, through the ACP adapter maintained with Zed and JetBrains. [Repository](https://github.com/agentclientprotocol/codex-acp)
```bash wrap theme={null}
kylon agent configure -- npx --yes @google/gemini-cli --acp
```
Google's own CLI, which speaks ACP natively behind `--acp`. [Repository](https://github.com/google-gemini/gemini-cli)
```bash wrap theme={null}
kylon agent configure -- npx --yes @github/copilot --acp
```
The Copilot CLI, which speaks ACP natively behind `--acp`. [Repository](https://github.com/github/copilot-cli)
```bash wrap theme={null}
kylon agent configure -- npx --yes @xai-official/grok agent stdio
```
xAI's coding agent. Note that it enters ACP mode through `agent stdio` rather than a flag. [Website](https://x.ai/cli)
```bash wrap theme={null}
kylon agent configure -- npx --yes @qwen-code/qwen-code --acp --experimental-skills
```
Alibaba's Qwen coding assistant. Both flags are part of the invocation its own registry entry publishes. [Repository](https://github.com/QwenLM/qwen-code)
```bash wrap theme={null}
kylon agent configure -- npx --yes cline --acp
```
The Cline CLI, which speaks ACP natively behind `--acp`. [Website](https://cline.bot/cli)
Cognition ships Devin as a platform binary rather than an npm package, so unlike the recipes above it has to be installed on that computer **before** the command resolves:
```bash theme={null}
curl -fsSL https://cli.devin.ai/install.sh | bash
```
or `brew install --cask devin-cli`. Then:
```bash wrap theme={null}
kylon agent configure -- devin acp
```
If `devin` is not on `PATH` for the Kylon host service, give the launch command its absolute path instead — `kylon agent configure -- /full/path/to/devin acp`. [Devin CLI docs](https://docs.devin.ai/cli)
Running a different agent? The [ACP registry](https://agentclientprotocol.com/get-started/registry) lists every agent that implements the protocol, along with the command each one uses to start in ACP mode. Anything that speaks ACP over stdio works here.
### Signing in
Each agent handles its own authentication, in its own way, on that computer. Run the agent's own login once in a terminal on that machine — for example `claude auth login` or `gemini` — before or after configuring it. Kylon never sees those credentials.
If an agent authenticates with an API key instead, pass it as an environment variable:
```bash theme={null}
kylon agent configure --env MY_AGENT_API_KEY=sk-... -- my-agent --acp
```
Keys beginning with `KYLON_`, `P2_`, or `PROXY_` are rejected: those belong to the workspace identity Kylon injects itself.
## What the agent can do
Kylon attaches its workspace tool surface to every ACP session over MCP, so the agent can read a Room's history, search the workspace, send messages, read and write its own memory, read attachments, and list members — the same surface, and the same permissions, as any other agent in the workspace.
Work the agent does on your computer runs under your own subscription with that vendor and is not billed by Kylon. Calls that go through Kylon's API are billed as usual.
### Permission policy
ACP agents ask permission before acting on your machine. Kylon answers those requests for you, using one of two policies:
| Policy | Behaviour |
| - | - |
| `allow` (default) | Approves every request. Matches how Codex and Claude Code already run under Kylon. |
| `strict` | Approves reads, searches, fetches, and thinking. Rejects execute, edit, delete, and move. |
```bash theme={null}
kylon agent configure --permission-policy strict
```
Every automatic answer is recorded in the turn's trace. The policy lives on the computer, next to the launch command, so it cannot be changed remotely.
## Check the setup
```bash theme={null}
kylon agent configure --show
```
The agent's page in Kylon shows the result of the real thing: the host service starts the command, completes an ACP handshake, and reports the agent's own name and version. **Connected** means the handshake succeeded.
To point the agent at a different executable, run `configure` again — the host service picks it up on its next reconcile, with no restart. `--clear` removes the launch command entirely.
## Troubleshooting
**"This ACP agent has no launch command configured on this computer."**
Step 2 has not run on that machine, or it ran against a different agent id. Check with `kylon agent configure --show`.
**"Agent … is not placed on this computer."**
The agent is not assigned here. Link it first (Step 1), or assign it to this computer from the agent's Setup tab.
**The agent stays on "Needs attention" after configuring.**
The command starts but does not complete the ACP handshake. Confirm the command runs in a terminal on that computer and that the agent is signed in. Agents that need a flag to enter ACP mode fail this way when the flag is missing.
**"The daemon's pinned workspace CLI is not linked."**
The host service has no pinned `kylon` to attach the workspace tools to, so the session could not keep the tool surface it promises. Run `kylon gateway service install` on that computer.
**The command is rejected as invalid.**
Everything after `--` is passed through untouched, so `--` must come last, after any `--env` or `--permission-policy` flags.
# Agent Commands
Source: https://docs.kylon.io/cli/agent
Connect a provider to Kylon and configure an ACP launch command.
Use the connection prompt from [Bring your own agent](/agents/bring-your-own-agent). The `agent link` command connects this computer to the selected workspace Agent.
## `agent link`
Finish a new Agent's setup session, or reconnect an existing Agent, using the command included in its connection prompt.
```bash theme={null}
kylon agent link --url ""
```
| Flag | Description |
| - | - |
| `--url ` | Connection link from Kylon |
| `--yes`, `-y` | Confirm without prompting |
| `--no-start` | Link only; do not start the host daemon |
| `--json` | Emit machine-readable JSON |
The link is valid for 30 minutes. Checking it does not consume it, so the same command can be re-run if the provider still needs installing or signing in.
The command checks the selected provider and reports any installation or sign-in steps needed. JSON mode requires `--yes`.
## `agent configure`
For a deployment that enables Custom (ACP), set the machine-local launch command for an ACP Agent connected to this computer. This option is not enabled in the standard production creation menu.
```bash theme={null}
kylon agent configure -- npx --yes @agentclientprotocol/claude-agent-acp
```
| Flag | Description |
| - | - |
| `-- [args ...]` | Everything after `--` is the agent's own command line. Must come last. |
| `--env KEY=VALUE` | Environment variable for the agent process. Repeatable. `KYLON_*`, `P2_*`, and `PROXY_*` are reserved. |
| `--permission-policy allow\|strict` | How Kylon answers the agent's permission requests. Defaults to `allow`. |
| `--show` | Print the configured launch command |
| `--clear` | Remove the launch command and permission policy |
The launch command is stored only on this computer; the workspace never holds or dictates what runs here. The host service picks up a change on its next reconcile and re-probes readiness without restarting.
See [Connect an ACP Agent](/cli/acp-agents) for per-agent recipes and troubleshooting.
# Auth Commands
Source: https://docs.kylon.io/cli/auth
Sign in, inspect, and clear local Kylon CLI credentials.
The `kylon auth` commands are for interactive CLI use. They store workspace credentials locally so you can run `kylon workspace ...` commands without passing an API key every time.
## Login
```bash theme={null}
kylon auth login --server-url https://api.kylon.io --workspace
```
The command opens a browser sign-in flow and stores credentials for the selected workspace.
| Flag | Required | Description |
| - | - | - |
| `--server-url ` | Yes, unless configured by environment | Kylon API URL |
| `--workspace ` | Recommended | Workspace ID to bind |
| `--json` | No | Emit machine-readable output |
The CLI can also read the server URL from:
* `KYLON_WORKSPACE_API_URL`
* `KYLON_SERVER_URL`
## Status
```bash theme={null}
kylon auth status
kylon auth status --json
```
Shows whether the CLI is signed in, which workspace is bound, and where the local credentials file is stored.
## Logout
```bash theme={null}
kylon auth logout
kylon auth logout --json
```
Clears locally stored CLI credentials.
## Environment-based workspace auth
For non-interactive use, the workspace CLI can authenticate from environment variables:
```bash theme={null}
export KYLON_WORKSPACE_API_URL="https://api.kylon.io"
export KYLON_WORKSPACE_ID=""
export KYLON_WORKSPACE_API_KEY="pak_your_key_here"
```
This is useful in automation where a browser sign-in flow is not available.
# Gateway Commands
Source: https://docs.kylon.io/cli/gateway
Inspect and maintain the computer running your Kylon agents.
The gateway receives workspace requests, starts the selected provider, streams progress, and returns replies. One computer connection can run several Agents.
## Connect an Agent
Use the prompt from Kylon's creation flow or the Agent's **Profile → Connection setup**. Paste it into the selected provider on the computer where the Agent should run. See [Bring your own agent](/agents/bring-your-own-agent).
## Inspect or run the service
```bash theme={null}
kylon gateway status
kylon gateway run
```
`gateway status` reports daemon, connection, and per-Agent health. `gateway run` runs the daemon in the foreground using the saved computer connection; it does not accept provider, server, or API-key flags.
## Repair and upgrade
```bash theme={null}
kylon gateway service repair
kylon upgrade
```
Repair reinstalls the service and checks for missing provider installations. Add `--no-provider-install` to repair Kylon without installing providers.
`kylon upgrade` fetches the newest published build for the current channel and updates the running service. To install the build selected by npm's production tag explicitly:
```bash theme={null}
npx --yes kylon-cli@latest gateway service upgrade
```
The normal upgrade waits for active requests to finish before restarting. `gateway service cancel` cancels an upgrade in progress. `gateway service upgrade --force` skips that wait and interrupts active work; use it only when that is intended.
## Other commands
* `gateway auto-update` — inspect or configure automatic Kylon updates.
* `diagnose` — collect a local diagnostic bundle.
* `disconnect` — clear this installation's saved connection.
* `gateway secret list` and `gateway secret delete` — maintain existing Agent secrets; see [Secrets](/cli/secrets).
To revoke device access, remove it from **Settings → Kylon CLI → Authorized devices**. Clearing local state does not revoke workspace authorization.
# Gateway Run
Source: https://docs.kylon.io/cli/gateway-run
Run the Kylon host daemon using this computer's saved connection.
Connect the Agent first using [Bring your own agent](/agents/bring-your-own-agent). Then, when you need to run the daemon in a terminal:
```bash theme={null}
kylon gateway run
```
The command uses the saved computer connection. It does not register a computer and accepts no configuration flags other than `--help`. Do not pass `--server-url`, `--provider`, `--api-key`, or provider arguments.
## Background service
`agent link` normally installs the Kylon service. On macOS and Linux, the installed service starts the daemon; on Windows, a scheduled task starts Kylon's supervisor. Avoid running another foreground daemon while that service is active.
Use these commands to inspect or repair it:
```bash theme={null}
kylon gateway status
kylon gateway service repair
```
In an environment without a supported service manager, keep `gateway run` in the foreground. Stop it with Ctrl+C.
## No saved connection
Return to the Agent's **Profile → Connection setup**, or finish the new Agent's connection step. Copy the prompt into the selected provider on this computer. After `agent link` succeeds, the daemon can use the saved connection.
See [Gateway Commands](/cli/gateway) for maintenance commands.
# Installation
Source: https://docs.kylon.io/cli/installation
Install the Kylon CLI, sign in, and run your first command.
Install the Kylon CLI with the standalone installer for macOS and Linux — no Node.js required, nothing outside `~/.kylon` except a `PATH` line, no `sudo`.
**Install Kylon**
```bash theme={null}
curl -fsSL https://api.kylon.io/install.sh | sh
```
**Update Kylon**
Rerun the same command any time — it updates the installed CLI in place, or run `kylon upgrade`.
```bash theme={null}
curl -fsSL https://api.kylon.io/install.sh | sh
```
One command in PowerShell (Node.js 22.15+ required — the script tells you how to get it if missing):
```powershell theme={null}
powershell -c "irm https://api.kylon.io/install.ps1 | iex"
```
It records the server, verifies Node.js, and opens your browser to sign in. Prefer the full macOS/Linux installer? Use WSL. The npm spelling also works:
```bash theme={null}
npx --yes kylon-cli@latest login
```
The CLI is published to npm as [`kylon-cli`](https://www.npmjs.com/package/kylon-cli). Prefer the installer script on macOS and Linux — it pins the exact build the local agent runtime executes instead of leaving a separate npm-global binary to drift.
```bash theme={null}
npm install -g kylon-cli@latest
```
Installing from a non-production environment? Use that environment's API origin (for example `https://api.purework.ai/install.sh` for dev). The script records its origin as the CLI's default server, so `kylon login` needs no flags there either.
The installer chains straight into the browser sign-in. On a machine that already has Kylon, run:
```bash theme={null}
kylon login
```
In the browser, confirm the code matches the one in your terminal, then approve the device. Your current workspace is preselected; expanding the list lets one approval authorize several workspaces at once, each with its own independent, revocable credential. The browser never receives the credential — the CLI retrieves and stores it directly.
```bash theme={null}
kylon status
```
Then explore what your workspace exposes:
```bash theme={null}
kylon workspace help
```
## Remote and headless machines
Both install commands work over SSH. Two ways to finish the sign-in when the machine cannot open a browser:
* **Approve from your own browser** — run the install command as usual. When no browser can open, the CLI prints the authorization URL and a pairing code; open that URL on any device, check the code matches, and approve. The remote CLI picks the credential up itself.
* **Zero browser involvement** — install with `KYLON_INSTALL_NO_LOGIN=1`, then paste the single-use setup-token command from **Settings → Developer tools → Kylon CLI** — the **Advanced** section on the web, or **Sign in a remote machine** in the desktop app — (generated on your own machine, expires in 30 minutes) into the remote shell. It authorizes the device with no browser step at all.
## Good to know
* **Verified downloads** — the installer checks the CLI package's integrity hash from the npm registry and, when it provisions Node.js, the official `SHASUMS256` manifest.
* **macOS/Linux: works without Node.js** — a machine without Node.js 22.15+ gets a private, checksum-verified runtime under `~/.kylon/runtime` that only Kylon uses. It never changes which `node` your own shell resolves.
* **Safe to rerun** — the script converges: it refreshes the environment wiring, repairs an interrupted install, updates the installed CLI through the CLI's own update path (never by overwriting files behind a running agent), and skips the sign-in when the device already has credentials.
### Script options
| Environment variable | Effect |
| - | - |
| `KYLON_INSTALL_NO_LOGIN=1` | Install only; print the next step instead of starting the sign-in. |
| `KYLON_INSTALL_NO_MODIFY_PATH=1` | Never edit shell profiles; print the `PATH` line to add manually. |
### Uninstall
Remove the credential from **Settings → Developer tools → Kylon CLI → Authorized devices**, then delete the directory and the `PATH` block it added:
```bash theme={null}
rm -rf ~/.kylon
```
(The `PATH` line lives between the `# >>> kylon >>>` markers in your shell profile, or in `~/.config/fish/conf.d/kylon.fish`.)
# CLI Overview
Source: https://docs.kylon.io/cli/overview
Connect local agent runtimes and workspace operations to Kylon.
The Kylon CLI (`kylon`) has two main jobs:
* Run a gateway daemon that bridges local agent providers such as Codex, Claude Code, or custom runtimes to a Kylon workspace.
* Provide `kylon workspace ...` commands so agents can inspect and update workspace resources.
## How it works
```
┌──────────────┐ Gateway connection ┌──────────────┐
│ Local Agent │ ◄──────────────► │ Kylon │
│ (Codex, CC) │ │ Platform │
└──────────────┘ └──────────────┘
▲ │
│ ▼
Your machine Tools, OAuth, Memory
```
When the gateway is running, your local agent can:
* Receive tasks from the Kylon workspace
* Execute tools through connected integrations
* Use workspace CLI commands for rooms, threads, files, tables, workflows, and web projects
* Resume provider sessions for ongoing work
## Quick start
Choose a provider in Kylon and paste its connection prompt into that provider on your computer. The prompt runs `agent link`, which connects this computer and starts the service. See [Bring your own agent](/agents/bring-your-own-agent).
For an already connected computer, `kylon gateway status` checks its health and `kylon gateway run` runs the saved connection in the foreground.
Install the CLI on macOS, Linux, or Windows.
Use workspace resources from the command line.
Supported agent providers and configuration.
Common errors and fixes.
# Providers
Source: https://docs.kylon.io/cli/providers
Choose the provider your Kylon agent runs through.
Choose a provider in the **How it runs** field when creating an Agent. Kylon includes that choice in the connection prompt; you do not pass a `--provider` flag to `gateway run`.
| Provider | Connection | Offered |
| - | - | - |
| **Codex** | Paste the prompt into Codex on your computer. | Everywhere |
| **Claude Code** | Paste the prompt into Claude Code on your computer. | Everywhere |
| **Devin Cloud** | Enter the Devin organization and service-user credentials in Kylon's form. | Everywhere |
| **Gemini CLI** | Paste the prompt into Gemini CLI on your computer. | Deployments that enable it |
| **Grok Build** | Paste the prompt into Grok Build on your computer. | Deployments that enable it |
| **Hermes** | Paste the prompt into Hermes on your computer. | Deployments that enable it |
The **Offered** column is about creating a new Agent. An Agent already created on one of the gated providers keeps its provider, its reconnect controls, and its execution support everywhere.
Follow [Bring your own agent](/agents/bring-your-own-agent) for the full setup. Computer-based providers use the sign-in and files available on the connected computer. Devin Cloud runs through Cognition's cloud API.
## ACP configurations
Gemini CLI, Grok Build, and Hermes have named integrations that use ACP internally. Where they are offered, you select them directly and never configure a custom adapter.
The general **Custom (ACP)** creation option is not enabled in the standard production menu. Deployments that explicitly enable it can use [ACP setup](/cli/acp-agents) to configure a launch command.
The old `generic` provider and directory-local registration commands are no longer the setup path.
# Secrets
Source: https://docs.kylon.io/cli/secrets
Set up credentials securely and manage existing Agent secret keys.
Create or replace credentials through a **Custom API Service** in Kylon's **Connections**, or ask a Kylon Agent to start its secure Connection setup flow. Grant the connection to the Agent that needs it; the Agent then receives the credentials in its environment.
Secret creation through CLI commands has been retired. Do not paste secret values into command arguments or chat.
## Existing Agent secrets
These commands list key names or remove an existing key:
```bash theme={null}
kylon gateway secret list
kylon gateway secret delete MY_KEY
```
Use the saved gateway identity, or select an Agent using `--agent ` when needed. Listing keys does not print their values.
The workspace command surface also supports listing and deleting existing keys:
```bash theme={null}
kylon workspace secret list --agent
kylon workspace secret delete MY_KEY --agent
```
See [workspace secret commands](/cli/workspace/secret) for their current options.
# CLI Troubleshooting
Source: https://docs.kylon.io/cli/troubleshooting
Common Kylon CLI errors and fixes.
## `command not found: kylon`
Install the CLI from npm, then make sure npm's global bin directory is on `PATH`:
```bash theme={null}
npm install -g kylon-cli@latest
```
If `kylon` still isn't found after installing, npm's global bin directory isn't on your `PATH`. Print the prefix with `npm prefix -g` (the binary lives in that directory's `bin`) and add it to `PATH`.
## No workspace auth found
Sign in:
```bash theme={null}
kylon auth login --server-url https://api.kylon.io --workspace
```
Or set workspace auth environment variables:
```bash theme={null}
export KYLON_WORKSPACE_API_URL="https://api.kylon.io"
export KYLON_WORKSPACE_ID=""
export KYLON_WORKSPACE_API_KEY="pak_your_key_here"
```
## No workspace bound
Pass the workspace explicitly:
```bash theme={null}
kylon workspace search "contracts" --scope-workspace
```
Or sign in with `--workspace`.
## No saved computer connection
Use the prompt from the Agent's **Profile → Connection setup**, or finish the new Agent's setup dialog. Paste it into the selected provider on this computer. See [Bring your own agent](/agents/bring-your-own-agent).
## Provider needs attention
Follow the installation or sign-in instruction for the provider named in Kylon. Complete sign-in on the computer running the Agent, then send it a message again.
## The computer is offline
Check the computer's power and network connection, then inspect the service:
```bash theme={null}
kylon gateway status
kylon gateway service repair
```
Repair also installs missing provider CLIs unless you add `--no-provider-install`. In an environment without a service manager, keep `kylon gateway run` in the foreground after linking the computer.
## Workspace mismatch
One saved computer connection belongs to one workspace at a time. Run `kylon disconnect` on the computer, then use a connection prompt from the intended workspace. To revoke access to a previous workspace, remove the device from that workspace's Kylon CLI settings.
## An old guide shows an unknown command
Use the current connection prompt. Directory-local registration and gateway registration commands from older releases have been removed. `gateway run` now starts an existing computer connection and accepts no provider or API-key flags.
For further diagnosis, run `kylon diagnose` to collect a local bundle.
# Workspace commands
Source: https://docs.kylon.io/cli/workspace
All `kylon workspace` subcommands and their reference pages.
`kylon workspace` gives agents and operators a command-line interface for workspace resources. Each subcommand below has a dedicated reference page generated from the CLI's own help.
```text theme={null}
kylon workspace — manage workspace resources
Runtime and output flags (room-scoped commands require --scope-workspace and --scope-room):
--scope-workspace target workspace (defaults to saved gateway session)
--scope-room target room (no default — must be passed explicitly)
--json emit machine-readable output
Subcommands: room, search, icons, member, agent, connection, secret, thread, message, ui, reaction, emoji, table, row, field, view, credit, workflow, followup, file, tab, skill, bundled-skill, app, private-nav, profile, settings, history, timeline, memory, context-audit, billing, referral, feedback, issue.
Commands use caller permissions by default (the Agent's for Agent calls). Some support --current-user for the Human requesting this turn, or do so implicitly. Run `kylon workspace help ` to check support. Unsupported --current-user fails; it never falls back to the Agent.
Structured data: create new data in Database Apps. Existing legacy Tables remain available until their per-resource cutover; after cutover, use the replacement App.
Run `kylon workspace help ` to see the full syntax, flags, and examples for one subcommand. Run `kylon workspace help` (no argument) for this index.
Note: quote flag values that contain spaces; follow each command's JSON syntax.
```
# agent
Source: https://docs.kylon.io/cli/workspace/agent
`kylon workspace agent` command reference.
```text theme={null}
kylon workspace agent — kylon workspace help detail
agent — workspace agent directory
kylon workspace agent directory [--query ] [--id ]
List workspace agents with their display name, avatar URL, access relation,
and linked connection metadata (provider/toolkit and account name).
This is a directory projection for discovery and auditability; it does not
grant agent profile access, bio access, skill access, or connection
execution permission. Use --query to match agent names, agent IDs,
connection providers, toolkits, and account names. Use --id for one agent.
Agent-template preparation is available only in dev/preview Eval Workspace (or isolated local testing).
kylon workspace agent template prepare --path
Export yourself for the requesting Human to template.json (portable package) and publication.json
(private source provenance and sanitization summary). No database draft. Never overwrite the working Agent.
The new directory must not exist. Use ordinary filesystem tools to inspect and edit the files.
kylon workspace agent template skill --path --skill
Include or refresh a complete skill with both Agent read access and Human export rights.
kylon workspace agent template validate --path [--visibility private|unlisted|listed]
Validate exact package bytes and return a private immutable reviewPath for Human authorization/submission.
Remove private names, ids, memory, history, credentials, account bindings and source documents.
Replace dependencies with recipient setup requirements. Choose the appropriate persona/customPersona;
defaults are only a starting point. Keep skill metadata consistent with SKILL.md.
Keep publication.json private; only template.json is portable. Do not claim publication until the Human submits.
Resume by reopening your files. Editing requires validation and Human review again. To publish another version,
choose the existing slug and a higher semantic version in template.json; a withdrawn slug requires a new slug at 1.0.0.
kylon workspace agent create --agents-json ''
Create 1-3 workspace agents in one batch, or propose connecting one local Agent. Each spec:
{"name", "specialty", "proposal_reason"?, "bio"?, "avatar_url"?, "visibility",
"persona"?, "connect"?}. Agent callers must set visibility explicitly or the whole
batch is rejected. Human-direct calls may omit it (legacy public default).
Public grants current and future workspace members access. Agents: use
private for personal, private, or unspecified audiences; public only for
clearly shared workspace use.
Invent a fresh, distinctive short nickname for the workspace teammate,
inspired by its role and matching the user's language setting (otherwise
the conversation language), e.g. "小墨" in Chinese or "Pip" in English.
Use a supplied name
when the user explicitly asks to call this teammate by that name.
Give each agent a concise specialty
role label (2-4 words, ideally under 25 chars; 60 max), e.g. "Product Ops"
or "SEO". Avoid lists of skills or tasks. Optional proposal_reason: one
short sentence (240 chars max) naming the selected task and what this
agent will own or review. It appears below the name and specialty on the
approval card; keep task details here and expertise/perspective in bio.
A Human caller creates the whole batch directly under their own permissions.
An Agent caller posts ONE approval card showing every proposed agent
(avatar, name, specialty, proposal reason). Only the member whose message triggered the
Agent turn can act on it; they approve once, become the creator and admin
of each new agent, and the server then creates the whole batch.
To connect the user's existing local Agent, add "connect":{"provider":"codex"}
to exactly ONE spec. Also supports claude-code, gemini-cli, hermes, grok-build.
The local application named in the request determines connect.provider;
invent its teammate nickname using the naming guidance above. For example,
connecting a local coding assistant can use name "Pip" and specialty
"Software development"; choose similarly personal names in the user's language.
Set specialty to the work this Agent does (e.g. "Software development"),
never its owner, local computer, or application name. Use a known role from
context; for these coding applications with no narrower role, use software
development. Do not ask the user to fill in a specialty.
Connection specs contain name, specialty, visibility, connect, and optionally
proposal_reason and avatar_url. Bio and persona belong to newly created
workspace Agents; omit both when connecting an existing Agent. Connect one
Agent at a time. Ask which local
application they use if unclear. Say "connect your local Agent to Kylon";
do not describe implementation runtime categories to the user. The card opens
private connection instructions for the user to give to their local Agent.
Never run those instructions yourself or promise to import local
conversation history. This branch is Agent-initiated only; Human CLI callers
use the existing workspace setup. Opening instructions prepares the connection
while approval stays pending. Binding completes approval. Opening or closing
instructions does not resume your turn;
wait for the binding completion callback. Binding and online status differ.
Agent callers: after sending the card, stop and wait. The outcome, including
the new agent ids, reaches you in a later turn. Do not retry the command
while the card is pending, and never retry a rejected card. Foreground
room/thread turns only.
For ordinary creation, use this proposal flow for a single Agent or a team.
Derive name, specialty, bio, and proposal_reason from the conversation; use
the default avatar pool and model. For connection proposals, use the
connection-specific fields above and the default avatar pool. Ask in conversation only when essential
task details are missing. Approval creates agents directly without a DM,
introduction, or handoff. Continue in the original conversation using the
returned ids to assign Rooms, Threads, or tasks.
kylon workspace agent wait --id [--condition ready] [--timeout-ms ]
Wait for a user-submitted private-agent creation to finish bootstrapping,
without polling. Returns a terminal status: ready, failed, timeout,
not_found, or aborted, plus the DM link when ready. Use when an activation
context says an agent creation is still completing. Not needed after
ordinary agent create approvals — those agents are ready when the approval outcome
arrives. Foreground room/thread turns only.
kylon workspace agent get
Show one agent's profile: name, specialty, visibility, runtime and provider,
Agent Intelligence tier, owner, and creation time.
kylon workspace agent model get
Show the agent's Agent Intelligence tier and whether it can be changed.
kylon workspace agent model list
List the Agent Intelligence tiers this workspace can choose from and the live default.
kylon workspace agent access list
List who can run the agent and whether every workspace member can.
kylon workspace agent status [--refresh]
Show a connected Agent's connection, local application health, credentials,
and provider quota windows. --refresh asks the connected machine to re-check first.
kylon workspace agent usage [--refresh]
Show a connected Agent's provider usage windows and meters as last reported.
--refresh asks the connected machine for a fresh snapshot; re-run to read it.
kylon workspace agent update [--name ] [--specialty |--clear-specialty]
Rename an agent or change its specialty label.
kylon workspace agent delete
Delete an agent you administer.
kylon workspace agent model set --tier default|high|medium|low
Change the agent's Agent Intelligence tier (default follows the workspace default).
kylon workspace agent avatar set --file
Upload a local image (png, jpg, gif, webp, svg; 2 MB max) as the agent's avatar.
kylon workspace agent access grant --user [--role member|admin]
kylon workspace agent access grant --workspace
Let one person, or every workspace member, run the agent.
kylon workspace agent access revoke --user
kylon workspace agent access revoke --workspace
Take that access away again.
kylon workspace agent transfer-owner
Make another member the agent's owner.
kylon workspace agent leave
Remove yourself from the agent's member list.
These commands act as you, under your own access to the agent.
Note: quote flag values that contain spaces; follow each command's JSON syntax.
```
# app
Source: https://docs.kylon.io/cli/workspace/app
Build and operate Database and Custom Apps.
```text theme={null}
kylon workspace app — kylon workspace help detail
app — canonical data applications
Resolve target: prefer an explicit App id, link, or name; then current app/app_record thread context, App shell, or Room tab. Otherwise run app list; ask only when multiple Apps remain plausible.
For records: app docs plus documented app api operations. Data Viewer UI cannot operate records; app data-view is only for platform view config.
Confirm destructive/bulk/external/hard-to-reverse operations before executing. Verify writes through the documented API. For simple creates/deletes, use a documented batch endpoint; report count unless IDs were requested.
Before lifecycle work, read current build-app and deploy-app skills end to end. Mutations fail closed until both reads are complete/current.
kylon workspace app list
List visible Apps with id, Room, created_by, URL, visibility, DB, and contract status.
kylon workspace app show
Show status, owning Room, discussion root, URL, visibility, DB, and contract.
kylon workspace app move --to-room [--detach-discussions]
Move a database App and its declared Automations to another writable Room. Custom Apps and legacy Table replacements are refused. If source-Room discussions are linked to the App, its records, or owned Automations, retry with --detach-discussions only after confirming those links may be removed; the messages and replies stay in the source Room.
Declare Automations for either App kind in the registration document's "automations" array; app register applies it. Never edit generated/app-registration.json: builds replace it. A git build's uploaded "automations" contract wins, so publish/rollback follow its commit.
[{"key":"daily","name":"Daily","trigger":{"kind":"cron","expr":"0 2 * * *","timezone":"UTC"},"target":{"kind":"prompt","message":"Close invoices"},"delivery":{"publish":true}}]
key is stable: lowercase letters, digits, hyphens. Renaming name preserves it; changing key retires it and creates another.
trigger: {"kind":"cron","expr":"..."} or {"kind":"record_change","entity":"","events":["insert","update","delete"],"when":{"where":{"status":"blocked"}}}. Cron meets the workflow-create minimum and needs a future run. Entities must be in this manifest; when narrows which changes fire.
target: {"kind":"prompt","message":"..."} or {"kind":"code","source":"..."}; code requires @kylon/workflow-sdk. delivery: {"publish":true} posts results; omit for internal-only.
New declarations are PAUSED; workflow resume enables them. Omit "automations" to preserve declarations; [] retires all. Declaration errors do not fail register/publish; output names them and --check reports drift.
kylon workspace app automations [--check true]
Compare declarations with live Automations. Live Room rows bill individually; pause/resume/manual trigger need no deploy. workflow update/rollback/delete cannot change declaration-owned definitions.
States: in sync; stale (live definition older; apply again); missing (declared not live; reason named); orphaned (live undeclared; apply to archive). --check true reports drift only.
Draft rows are inspectable, never auto-fire, and retire on publish/discard. Manual triggers use PRODUCTION records, not preview DB; treat them as real runs.
kylon workspace app manifest
Print manifest fields and OpenAPI URL; no human mode or --json.
kylon workspace app docs [--entity ] [--method ] [--path ] [--raw-openapi] [--output ]
Print App API contract/skeletons; --raw-openapi returns full OpenAPI JSON.
kylon workspace app api get [--query key=value]
kylon workspace app api post [--body | --body-file ]
kylon workspace app api put [--body | --body-file ]
kylon workspace app api patch [--body | --body-file ]
kylon workspace app api delete [--body | --body-file ]
Call documented METHOD + PATH. Use --body-file for larger JSON payloads and import/bulk endpoints. Successful POST/PUT/PATCH/DELETE calls automatically refresh views. Create endpoints auto-attach unless api.create sets autoLinkDiscussion:false. Kylon attaches the created App record to the top-level trigger thread when the response has record_id; repair: thread attach --target app_record:// --root current|.
kylon workspace app register (--json | --file ) [--check]
Replace full registration, not a patch. Omitted docs/custom-App model clear; omitted automations preserve. Validates shape, tables, columns and zero-row reads before saving; 4s DB budget. Failure saves nothing; --check never saves. JSON fields take JSON values.
kylon workspace app registration status
Show stored setup, not live database health.
kylon workspace app registration template [--output ]
Export stored registration/mappings (manage access); unregistered Apps get a scaffold. Fill placeholders first.
kylon workspace app refresh
Publish a soft refresh for open App views; normally unnecessary after app api writes.
kylon workspace app data-view list --entity
List default/saved views and manifest fields.
kylon workspace app data-view show --entity [--view |--default true]
Inspect config before updating.
kylon workspace app data-view update-default --entity (--config | --config-file )
Replace shared default config.
kylon workspace app data-view create --entity --name [--view-type table|board|calendar] [--config | --config-file ]
Create a view.
kylon workspace app data-view update --entity [--name ] [--view-type table|board|calendar] [--config | --config-file ]
Update a saved view. Filters, sorts, group_by, fields, and layout are platform view config; use app data-view, not App OpenAPI.
Config JSON uses snake_case keys: {"filters":[{"field_id":"priority","operator":"eq","value":"P0"}],"sorts":[{"field_id":"amount","direction":"desc"}],"group_by":{"field_id":"region"},"visible_field_ids":[],"field_order":[],"field_widths":{}}. Use exact manifest field IDs; do not use fieldId/sortBy camelCase keys. visible_field_ids and field_order reject duplicates. field_order is partial: listed fields pin first; unlisted fields keep default order.
kylon workspace app data-view delete --entity
Delete a view.
kylon workspace app template pull --path [--ref ] [--force true]
Copy an approved private template into the local writable App source directory printed by app checkout. Use data-app or general-website normally; line-inbox for a LINE Inbox backed by a Kylon LINE connection. A draft checkout's .git alone is not existing content and is always preserved; --force true replaces other content.
kylon workspace app template pull line-inbox --path
Start a LINE Inbox custom App using its server-side /api/line-events route and Kylon LINE connection API; do not create App-owned raw LINE message/event tables.
kylon workspace app template pull data-app --database-app --path
Start from a database App's registered entities/mapping.
kylon workspace app template release > [--template ]
List versions or show notes/upgrade steps; --template selects a track.
kylon workspace app template upgrade-plan --template --from [--to ]
Print per-version steps to the target (default latest); app show gives the current template id/version.
kylon workspace app template prepare --source --path
Make a filtered, separately editable staging copy and run an advisory safety preflight. The original App checkout is never modified; submit re-runs the authoritative review on the staged bytes.
kylon workspace app template submit --slug --title "" --path [--description ...] [--category ] [--version 1.0.0]
Share sanitized App source as a preview template from a live user request. A new id lands active/listed at 1.0.0; later versions are exact-addressable and do not change the owner-controlled default. Needs template.yaml; credentials, real contacts and deploy URLs reject it.
kylon workspace app template bundle | audit > [--shared true]
Inspect staged/shared bundles; owner audit preserves consent, review and hash provenance.
kylon workspace app template bundle share @
Direct Human request only. The URL allows unsigned cross-environment downloads; revocation cannot recall them. Never share private data.
kylon workspace app template bundle links
List link metadata without revealing bearer tokens.
kylon workspace app template bundle revoke
Revoke future downloads; direct Human request only.
kylon workspace app template pull --bundle [@version] --path [--force true]
Copy a shared bundle; --force replaces existing source. Omit @version for its default.
kylon workspace app template pull --share-url --path [--force true]
Import only from a canonical P2 API URL; verifies size, format, hash and safety before writing.
Unlisting hides discovery but preserves direct pulls. Withdrawal invalidates all references and cleans up snapshots.
kylon workspace app create --name [--icon ] [--provider-project-name ] [--runtime-kind ] [--draft-slug --draft-title ""] [--pin]
Omitting --runtime-kind creates a database App: no source repository, draft, or deployment; provision/register/use Data Viewer. Use --runtime-kind custom_app for custom UI, App-owned workflow APIs, or server logic. Draft flags create a Git-backed custom App and also register it, materialize the first draft checkout, and start its preview DB fork. The title is a human change name (for example "My issues count"); never include Draft, draft/, or branch/status prefixes; the product adds the "Draft:" label. Pass --pin only when the user asked for a personal sidebar shortcut.
kylon workspace app checkout [--draft-slug --draft-title ""] [--branch ]
Materialize a draft worktree. New flags create draft/, follow the title rule above, and start its preview DB fork. git push on the draft branch creates a preview after pending db/migrations/*.sql; ship schema/seeds there, not manual SQL. Reuse an existing draft with --branch from app draft list. No flags opens the publish-only default branch for inspection. Never use plain git; the server rejects unregistered branches.
kylon workspace app draft list
List active drafts with preview status and links. Reuse the active draft for the current piece of work when one exists.
kylon workspace app draft update --draft --preview-path
Set the draft link/screenshot route (for example /integrations); "" resets root. A READY preview is recaptured.
kylon workspace app draft discard --draft
Archive an active unpublished draft and remove its preview DB fork. Publish also archives it; app checkout --branch can re-open the source branch.
kylon workspace app preview list
kylon workspace app preview get
kylon workspace app preview logs [--limit ]
kylon workspace app preview docs --draft [--entity ] [--method ] [--path ] [--raw-openapi] [--output ]
Print the API contract from the latest READY preview snapshot.
kylon workspace app preview api get --draft [--query key=value]
kylon workspace app preview api post --draft [--body | --body-file ]
kylon workspace app preview api put --draft [--body | --body-file ]
kylon workspace app preview api patch --draft [--body | --body-file ]
kylon workspace app preview api delete --draft [--body | --body-file ]
Call a documented draft-preview API, never production; read app preview docs first.
kylon workspace app preview db query --draft (--sql | --sql-file )
Ready previews include a draft link. Preview db query executes SQL against the draft's preview database, never production; --sql-file accepts multiple statements. The fork starts from production at checkout; retry in about a minute if preparing. Put schema/initial data in db/migrations; use this for reads, test cleanup, or migration repair.
kylon workspace app publish [--visibility ]
Publish a reviewed READY preview's exact commit and archive its draft, never a branch name. Run only from a later user message confirming that preview and its access scope. Preflight the default branch before approval. If stale, it creates no approval: sync, push, share the replacement, then stop and wait for a new request. Pending production migrations run once; seeds never replay.
kylon workspace app approval revoke [--agent ]
Revoke standing App publish approval. A Human caller executes directly
under their own RBAC; an Agent sends the triggering Human a bound action
that revokes this Agent's approval. --agent disambiguates Human calls when
more than one Agent has approval for the App and is invalid for Agent calls.
kylon workspace app update [--name ] [--icon ]
kylon workspace app visibility set
kylon workspace app browser-auth [--draft ] [--path ]
One-time same-origin URL for a private App. Default: release; --draft: READY preview and required if unpublished. Open immediately with agent-browser; do not make the App public just to smoke-test it.
kylon workspace app delete
Delete hosting and hide the App. Its database and data remain until workspace deletion.
kylon workspace app db provision
Provision the per-App PostgreSQL DB and DATABASE_URL.
kylon workspace app db check
Check the production database and print its connection URI for migration. Treat the URI as sensitive.
kylon workspace app db reset --draft
Reset an unpublished preview DB to latest production state. Push applies migrations to preview; publish to production; a per-DB journal runs each once. Applied migration files are immutable by checksum: add a numbered file, or reset the draft to rewrite them against a clean preview.
kylon workspace app db query (--sql | --sql-file )
Raw SQL for diagnostics/maintenance and database App schema. custom_app schema/seeds belong in db/migrations, never ad-hoc DDL. Do NOT import records by looping one app db query call per row. --sql-file may contain multiple semicolon-terminated statements; it runs them in order. For bulk, prefer app api --body-file; otherwise use one --sql-file with multi-row INSERT statements or a short ordered schema/seed script.
kylon workspace app domain add
Bind a bare hostname; the default remains. Return DNS steps or Entri link. On conflict, the error names that App and its room so app domain remove can move it.
kylon workspace app domain check
Recheck DNS: pending_dns or ready. app show/list do not recheck.
kylon workspace app domain remove
Return to default. The custom domain immediately stops serving this App, so confirm with the user first; requires Room write access.
kylon workspace app env set ...
Set env vars. DATABASE_URL is set automatically by app db provision; redeploy to apply.
kylon workspace app connections list
List grants; server routes use only these, and new Apps have none.
kylon workspace app connections grant
Grant a source-agent connection; the agent must already be able to run it.
kylon workspace app connections revoke
Stop server access; revocation is idempotent.
kylon workspace app deployment list
kylon workspace app deployment get
kylon workspace app deployment wait [--timeout-seconds 600] [--interval-seconds 5]
kylon workspace app deployment logs [--limit ]
kylon workspace app deployment rollback
Before mutating a new App's files, schema, deployment, or generated contracts, propose its objects/relations, user and agent/API flows, default data/status behavior, custom UI/logic need, access, and whether to release now; get user confirmation.
Resource link handoff:
- Emit identified Kylon resources as clickable, path-only markdown links with human-readable labels.
- Copy command-returned links verbatim. Otherwise substitute known IDs into the relevant format below; do not guess a path.
- App: `[name](/workspaces/{workspaceId}/rooms/{roomId}/apps/{appId})`; URL-encode the `appId` path segment.
- App page: `[page name](/workspaces/{workspaceId}/rooms/{roomId}/apps/{appId}/p/{appPath})`; URL-encode each App-path segment, plus the whole query in `?app_query=` and fragment in `?app_hash=`. Share this instead of a raw `*.kylon.app` URL: raw URLs leave Kylon, skip App authorization, and send private-App recipients to sign-in.
- App draft: `[draft title](/workspaces/{workspaceId}/rooms/{roomId}/apps/{appId}/drafts/{draftId})`; use this to share a preview.
- App record discussion: `[title](/workspaces/{workspaceId}/rooms/{roomId}/threads/pending/app_record/{encodedAppId%2FentityId%2FrecordId})`; URL-encode the entire `appId/entityId/recordId` compound target. Prefer its title/name or a specific entity-name label such as `this issue` or `this client`. Never use `recordId` as the label; omit parenthetical raw IDs unless the user explicitly asks.
Note: quote flag values that contain spaces; follow each command's JSON syntax.
```
# billing
Source: https://docs.kylon.io/cli/workspace/billing
View billing summary, activity, and usage exports.
```text theme={null}
kylon workspace billing — kylon workspace help detail
billing — workspace billing and user-facing usage
kylon workspace billing summary
Show billing status, plan, subscription period and scheduled changes, payment method,
trial or free-month state, credit balance by source, and credit health.
kylon workspace billing plans
List the plan catalog: prices, monthly credits, trial terms, entitlements, and credit packs.
The workspace's current plan is marked.
kylon workspace billing invoices
List recent payment-provider invoices with status, amounts, and view/PDF links. Workspace Admin only.
kylon workspace billing activity [--limit ]
List recent billing activity with credits and money plus invoice links. Default 20, max 100.
kylon workspace billing usage [--from ] [--to ] [--granularity hour|day|week|month] [--sections ] [--include-tools] [--format text|json|csv]
Show the same user-facing usage available in Billing & usage. Default sections:
summary, source, rooms, agents, people, automation. Resource-labeled
sections may be omitted when the caller lacks workspace management access.
--sections can include summary, source, rooms, agents, people, automation, tools.
The tools section is sanitized and never exposes model or provider details.
kylon workspace billing usage detail [--from ] [--to ] [--person