Use Sensei from your agent / Integrate Kosuke

Integrate Kosuke.

Connect your coding agent to Kosuke, and Sensei runs the execution while you keep the decisions. One URL adds the MCP server, the CLI and an API key cover agents with no browser, and one prompt tells your agent the rest.

Connect the MCP server

Sensei hosts the MCP server, so there is nothing to install or keep running. Add this URL to your client. The first time your client calls Sensei, it opens your browser so you can sign in and allow the app.

https://app.kosuke.ai/api/mcp

Run this once:

claude mcp add --transport http kosuke https://app.kosuke.ai/api/mcp

Start Claude Code and type /mcp to sign in. The list then shows kosuke as connected.

Connect your coding agent covers the consent screen, the toolsets and the options you can add to the URL.

Install the CLI

You need Node.js 22.18 or later.

npm install -g @kosuke-ai/kosuke
kosuke auth login

kosuke auth login asks for an API key, created as below, and keeps what you type hidden. Sensei checks the key and saves it. In CI or any script that runs without a person, skip the login and set the KOSUKE_API_KEY environment variable instead. See Sensei CLI.

Create an API key

The CLI, a script and an MCP client with no browser sign in with an API key.

  1. In the web app, open Settings > You > API keys.
  2. Type a name for the key, such as laptop-cli.
  3. Under Access, tick Tasks and sessions.
  4. Pick an end date: 30 days, 90 days or 1 year.
  5. Press Create API key.
  6. Press Copy. Sensei shows the key only once.

Export it:

export KOSUKE_API_KEY=kosuke_...

The CLI reads the same variable. An MCP client with no browser sends the key as a bearer token:

Authorization: Bearer kosuke_...

Each tool call is checked against the key's access, so a tool outside it is refused with 403 API_KEY_SCOPE. Without a browser shows the key on the Claude Messages API and the OpenAI Responses API, and Authentication says what a key can reach.

Paste this into your agent

Agent prompt
Read https://kosuke.ai/llms.txt, then connect to Kosuke for me.
1. Add the MCP server https://app.kosuke.ai/api/mcp and sign me in when the browser opens.
2. If you cannot open a browser, send the API key in KOSUKE_API_KEY as a bearer token, or install the CLI with npm install -g @kosuke-ai/kosuke, which reads the same variable.
3. Follow the rules in https://kosuke.ai/docs/api/build-an-agent.md: follow every turn to its end, answer the agent's questions, and stop when I or the credit limit stop you.

What your agent should know

  • Follow each turn to its end, answer the agent's Clarifications, and stop when a person or the credit limit stops you. See Build an agent on Sensei.
  • The API is described by an OpenAPI 3.1 document at https://app.kosuke.ai/api/openapi.json, which needs no API key.
  • Every docs page has a Markdown copy, and https://kosuke.ai/llms.txt lists them all.

Next steps