# Kosuke > Sensei is each member's own agent across every workspace. It builds code changes as tasks on branches with a live Preview and opens the pull request, watches messages and drafts replies, runs scheduled jobs, and asks the member on a card when a decision is needed. Instructions for agents: - To connect to Kosuke, start with https://kosuke.ai/docs/integrate.md: the MCP URL, the CLI, an API key and one prompt to paste. - To act on Sensei for your user, connect the Sensei MCP server (https://kosuke.ai/docs/interfaces/mcp.md) or use the Sensei CLI (https://kosuke.ai/docs/interfaces/cli.md). The MCP server signs your user in through the browser; the CLI, and an MCP client with no browser, need an API key your user creates in Settings > You > API keys (https://kosuke.ai/docs/api/authentication.md). - 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 a person or the usage limit stops you. - The API is described by an OpenAPI 3.1 document at https://app.kosuke.ai/api/openapi.json, which needs no token. - Every page below links its own Markdown copy. All the docs are one file at https://kosuke.ai/llms-full.txt. - When you talk to your user, use the product's words: workspace (the API says organization), chat session, Preview, Target Branch. ## API › Use Sensei from your agent - [Integrate Kosuke](https://kosuke.ai/docs/integrate.md): Connect your coding agent to Kosuke: the MCP server URL, the commands for Claude Code, Codex, Claude and Cursor, the CLI, an API key and one prompt to paste. - [MCP server](https://kosuke.ai/docs/interfaces/mcp.md): Connect Claude, ChatGPT, Claude Code, Codex or Cursor to the hosted Sensei MCP server so your agent can start sessions, follow turns and open pull requests. - [Sensei CLI](https://kosuke.ai/docs/interfaces/cli.md): Install the kosuke command with npm, sign in with an API key, and start and follow chat sessions from your terminal or a script, with JSON you can pipe to jq. ## Get started - [Overview](https://kosuke.ai/docs.md): Sensei is your own agent in every workspace. It ships code changes as pull requests, watches your messages, drafts replies and puts each decision on a card. - [Quickstart](https://kosuke.ai/docs/get-started/quickstart.md): Sign up, answer the first card in your Welcome thread, then follow one path: import a repository and ship a change, build a new app, or get help with your day. - [How Sensei works](https://kosuke.ai/docs/get-started/how-kosuke-works.md): Sensei, its threads and cards, the tasks it runs and the agents behind them, then how a code change goes from a project and a session to a merged pull request. - [Glossary](https://kosuke.ai/docs/get-started/glossary.md): Look up the words Sensei uses in the app, the CLI and the API, from chat session and Up next to Target Branch, each with a short definition and its page. ## Sensei - [Ask Sensei](https://kosuke.ai/docs/sensei.md): Ask Sensei across every project and workspace you belong to, mention tasks and files, have it act for you, pick its model and see what each turn costs. - [Threads](https://kosuke.ai/docs/sensei/threads.md): Sensei keeps each subject in a thread of its own. Filter, pin, rename, archive and search your threads, and choose how new messages find the right one. - [Cards and the Deck](https://kosuke.ai/docs/sensei/cards.md): Anything that needs you arrives as a card with one verb on it. Approve, Reply, Skip or park it for Later, in your Threads or one card at a time in the Deck. - [Notifications](https://kosuke.ai/docs/sensei/notifications.md): Sensei sends a push when a card needs you and never for an FYI. Answer a card from its notification on your iPhone lock screen, your Mac or in the browser. - [Talk to Sensei](https://kosuke.ai/docs/sensei/voice.md): Talk to Sensei on any device: dictate in a browser, hold fn on a Mac, hold to talk on iPhone, and answer out loud on glasses. See where your voice goes. ## Your day - [Watching](https://kosuke.ai/docs/your-day/watching.md): Let Sensei watch Gmail, Slack, Telegram, WhatsApp, LinkedIn and X for new incoming messages, draft the replies you owe, and send nothing until you tap Send. - [Triage and FYIs](https://kosuke.ai/docs/your-day/triage.md): Each watched message gets one question: do you have something to do? Yes drafts a reply card. No waits for one silent FYI digest you clear with one tap. - [Replies in your voice](https://kosuke.ai/docs/your-day/replies.md): How Sensei drafts replies as you: reply cards you edit and send, a writing style learned each week from what you sent, and the signature each one ends with. - [Your own integrations](https://kosuke.ai/docs/your-day/tools.md): Connect your own tools, such as Gmail, Slack, Linear, Figma or Notion, so your Sensei and your chat sessions can use them privately in every workspace you join. - [Memory](https://kosuke.ai/docs/your-day/memory.md): Read and edit what Sensei remembers about you, in private files it reads at the start of every turn, in every thread, that follow you across your workspaces. ## Code - [Tasks](https://kosuke.ai/docs/code/tasks.md): File work as a Todo task, start it with its own branch and sandbox, message the task while it runs, then approve and merge its pull request when it is ready. - [Import a repository](https://kosuke.ai/docs/code/projects.md): Install the Kosuke App on GitHub, connect your account and import a repository as a Sensei project from the workspace row in the sidebar to start its deploy. - [Chat sessions and tasks](https://kosuke.ai/docs/code/chat-sessions.md): Start tasks, open the chat session that carries each one out, with its branch, sandbox, conversation and pull request, and organize the work on the Tasks page. - [Messages and steering](https://kosuke.ai/docs/code/messages.md): Send messages and files to the agent, steer a message into the running turn, stop the turn, answer a Clarification, and see a steer sent as the next turn. - [Models](https://kosuke.ai/docs/code/models.md): Pick the model and reasoning effort a chat session runs on, such as Opus 5.5 at xHigh, set your Default Model for new sessions, and switch models mid-session. - [Files of a session](https://kosuke.ai/docs/code/session-files.md): Read what a session's agent wrote on its Files tab, such as an investigation, a mockup or a recording, find it again in Files, and see who changed it and when. - [Preview and sandboxes](https://kosuke.ai/docs/code/preview.md): Use the Preview tab to try a session's changes, keep its sandbox awake or let it pause, share it with people outside Sensei, and free sandboxes at your limit. - [Review the changes](https://kosuke.ai/docs/code/review.md): Read what the agent changed on the Changes tab, comment on lines and send them to the agent, edit files by hand on the Files tab and open a pull request. - [Open a pull request](https://kosuke.ai/docs/code/pull-requests.md): Turn a session's work into a pull request against the Target Branch, move the session between Active and Under Review, and follow it on GitHub until it merges. - [Sync with the Target Branch](https://kosuke.ai/docs/code/sync.md): Bring a session's branch up to date with the Target Branch when it falls behind or its pull request has conflicts, with one press of Sync in the chat header. - [Preview and publish](https://kosuke.ai/docs/code/preview-and-publish.md): Start a repository from kosuke-starter, watch its live preview of the default branch, and publish a Version at its own address, roll it back or take it down. - [Deploy your project](https://kosuke.ai/docs/code/deploy.md): Follow the first deploy an import starts, answer the deploy agent while it works out how to run your app, redeploy when setup changes, and fix a failed deploy. - [Project settings](https://kosuke.ai/docs/code/project-settings.md): Change a project's sandbox tier, services, environment variables, branches and scripts, read its Change history, and export, rename or delete the project. - [Skills](https://kosuke.ai/docs/skills.md): Run a skill in a chat session from the message box, see where skills come from, from Sensei's own ten to those you add, and choose which ones sessions carry. - [Manage Workspace Skills](https://kosuke.ai/docs/skills/manage-workspace-skills.md): Add, upload and edit the Custom Skills every chat session in your workspace carries, each a folder of text files with a SKILL.md, as a workspace owner or admin. - [/kosuke:automated-qa](https://kosuke.ai/docs/skills/automated-qa.md): Test your branch's Testing Checklist in a browser and by running the code, watch section videos and code checks in one QA Report, and record the passing commit. - [/kosuke:open-pr](https://kosuke.ai/docs/skills/open-pr.md): Commit and push the session's work and open its pull request with a title and a description, or bring the open one up to date, with reviewers and evidence. - [/kosuke:plan](https://kosuke.ai/docs/skills/plan.md): Plan a big or unclear change before it is built: questions until the intent is clear, a spec a model from another family attacks, then a phased plan to build. - [/kosuke:review](https://kosuke.ai/docs/skills/review.md): Have one AI model from another family try to break your change, report only its MAJOR and CRITICAL problems with how each fails, and have the agent fix them. - [/kosuke:sync-branch](https://kosuke.ai/docs/skills/sync-branch.md): Bring your branch up to date with its Target Branch, with conflicts resolved by what each side meant and the merge proved by a check that covers it, and pushed. - [/kosuke:web-pentest](https://kosuke.ai/docs/skills/web-pentest.md): Check your project's own app for security holes, with each finding proved against the running Preview where possible, a severity, the file and line, and a fix. - [Plugins](https://kosuke.ai/docs/plugins.md): Turn on plugins from Anthropic's and OpenAI's official marketplaces for your workspace or for yourself, and declare other plugins in your own repository. ## Automations - [Crons](https://kosuke.ai/docs/automations/crons.md): Run a saved prompt on a schedule, in the projects you pick or in none, each run in a sandbox of its own, then read what it did and the messages it sent members. - [Automatic runs](https://kosuke.ai/docs/automations/automatic-runs.md): Every run Sensei schedules for you, from the Work check to the Daily report and your writing style: when each runs, what it does, and how to switch it off. ## Devices - [Mac app](https://kosuke.ai/docs/devices/mac.md): Install the Sensei app for macOS, use its menu-bar menu and Spotlight, record your calls, give it the permissions it asks for and keep the app up to date. - [Mac tools](https://kosuke.ai/docs/devices/mac-tools.md): Use Sensei Spotlight on your Mac to search, ask and calculate, set up its quicklinks, snippets and clipboard history, and record your calls in the desktop app. - [iPhone and the web app](https://kosuke.ai/docs/devices/iphone.md): Get the Sensei iOS app for iPhone and iPad on TestFlight, find your way around its tabs, share your location, and install Sensei in its own browser window. - [Apple Watch](https://kosuke.ai/docs/devices/watch.md): Sign in to Sensei on Apple Watch with a code, decide cards in Deck, start a thread by voice, scrub QA videos with the crown and act from a notification. - [Meta Glasses setup](https://kosuke.ai/docs/devices/glasses.md): Set up Sensei on Meta Ray-Ban Display glasses: pair them with the Meta AI app, turn on Developer Mode, then add Sensei as a web app with its own app URL. ## Workspaces - [Overview, Needs you and Activity](https://kosuke.ai/docs/workspace/overview-and-activity.md): See what a workspace's tasks got done and where they ran on its Overview, find what waits on you in Needs you, and read what changed lately in Activity. - [Members and roles](https://kosuke.ai/docs/workspace/members-and-roles.md): Invite people to your workspace, give each one the role of Owner, Admin or Member, transfer ownership, and leave or delete a workspace you no longer need. - [Integrations](https://kosuke.ai/docs/workspace/integrations.md): Connect your Sensei workspace to a tool such as Sentry, Stripe or Supabase so its agents can use it, add more than one connection, check it and disconnect it. - [AI providers](https://kosuke.ai/docs/workspace/ai-providers.md): Connect the Claude, Codex, Gemini, Muse, Grok, GLM, Kimi or DeepSeek account your agents run on, as workspace Credentials or as a Subscription of your own. - [Files](https://kosuke.ai/docs/workspace/files.md): Keep folders and files that every member and agent of a workspace shares, upload and move them, open the prototypes Sensei draws, and keep personal Files too. - [Plans and billing](https://kosuke.ai/docs/workspace/plans-and-billing.md): Personal Free and its one-time allowance of actual sandbox hours, how to book a demo for more capacity or a new workspace, and how workspace billing works. - [Your account and preferences](https://kosuke.ai/docs/workspace/account-and-preferences.md): Change your name, picture, theme, language and time zone, choose what Sensei watches and runs for you, manage your devices, or delete your account in Settings. ## Help - [Get help](https://kosuke.ai/docs/help/get-help.md): Ask support a question or report a bug at support@kosuke.ai, with the session link, the project, what you expected and what happened, so they can act on it. - [Troubleshooting](https://kosuke.ai/docs/help/troubleshooting.md): Match what you see in Sensei to its cause and its fix, from sign-in and deploys to previews, pull requests and billing, with a link to each feature's page. - [Keyboard shortcuts](https://kosuke.ai/docs/help/keyboard-shortcuts.md): The keyboard shortcuts for Sensei on a Mac and on Windows and Linux, and how to open the Shortcuts dialog with its own keys or from the Settings menu. ## API › Get started - [Overview](https://kosuke.ai/docs/api.md): Drive Sensei from your own scripts and agents: start chat sessions, send messages, read the diff, open pull requests, and choose between the API, CLI and MCP. - [Quickstart](https://kosuke.ai/docs/api/quickstart.md): Create an API key, export it as KOSUKE_API_KEY, start a chat session with curl from your terminal, follow its first turn to the end and read the agent's reply. - [Authentication](https://kosuke.ai/docs/api/authentication.md): Create an API key with the access it needs, send it as a bearer token on every request, see which workspaces and areas it reaches, and revoke it when done. - [Build an agent on Sensei](https://kosuke.ai/docs/api/build-an-agent.md): Pick the MCP server, the CLI or the API for your agent, then follow the rules that keep it in step with people: finish each turn, answer, and stop when told. ## API › Concepts - [Follow a turn](https://kosuke.ai/docs/api/turns.md): Send a message, read how it was delivered, follow the job to its end, read the agent's reply, answer its Clarifications, and steer or stop a running turn. - [Sandboxes and previews](https://kosuke.ai/docs/api/sandboxes.md): Wake a session's sandbox before you read its files, diff or git state, read the preview flags, wait for its services to come up, and free a sandbox slot again. - [Responses and errors](https://kosuke.ai/docs/api/errors.md): How successful responses and paginated lists are shaped, what each error code means, when a request is worth retrying, and the limits the Sensei API enforces. ## API › Recipes - [Ship a change end to end](https://kosuke.ai/docs/recipes/ship-a-change-end-to-end.md): Take one change from prompt to pull request with curl and jq: start a session, follow its turns, read the diff, ask for more, and open the pull request. - [File now, start later](https://kosuke.ai/docs/recipes/backlog-now-start-later.md): Ask Sensei to file a task as Todo on the workspace Tasks page, or file it with the kosuke CLI, then pick the repository it runs in and start it when ready. - [Send review comments to the agent](https://kosuke.ai/docs/recipes/send-review-comments-to-the-agent.md): Comment on lines of the agent's diff, send the comments back as the next message so the agent addresses them in one turn, and resolve them once it has done so. - [Schedule recurring work](https://kosuke.ai/docs/recipes/schedule-recurring-work.md): Create a cron that sends a saved prompt to the projects you pick, or to none, on a schedule, then read its runs, run it once now, and pause or resume it. ## API › Endpoint reference - [Overview](https://kosuke.ai/docs/endpoint-reference.md): Find the endpoint you need by resource, and the conventions every Sensei endpoint follows: JSON answers, API keys, the data envelope and the OpenAPI document. - [Workspaces](https://kosuke.ai/docs/endpoint-reference/workspaces.md): Find your workspace ids, then read provider access, credits, usage, sandboxes and members, and manage the Workspace Plugins and Workspace Skills sessions carry. - [Provider credentials](https://kosuke.ai/docs/endpoint-reference/provider-credentials.md): Store, switch and remove the AI provider Credentials a workspace runs on, with several auth methods for each provider, including Claude Code and Codex logins. - [GitHub](https://kosuke.ai/docs/endpoint-reference/github.md): Check that your GitHub Connection works, then list the repositories it reaches through the Kosuke App, with the ones it is installed on marked for import. - [Account](https://kosuke.ai/docs/endpoint-reference/account.md): Read your profile, connect a Subscription, set your Default Model, and manage your Personal Skills and Personal Plugins, which follow you into every workspace. - [Activity](https://kosuke.ai/docs/endpoint-reference/activity.md): Read what changed across your workspaces in the last 30 days, from merged pull requests to started sessions, and mark what is new to you as seen in one call. - [Models](https://kosuke.ai/docs/endpoint-reference/models.md): List the model values a chat session, a Default Model, a Cron or the deploy agent can take, one entry per reasoning effort and speed, and the CLI command. - [Projects](https://kosuke.ai/docs/endpoint-reference/projects.md): Import a GitHub repository into a workspace as a project, then list, rename or delete projects, read their branches and skills, and set the Merge agent's mode. - [Project settings](https://kosuke.ai/docs/endpoint-reference/project-settings.md): Read and change a project's setup commands, branches, sandbox size, services and environment variables, one field at a time or all at once from a config. - [Deploys](https://kosuke.ai/docs/endpoint-reference/deploys.md): Start a Deploy, answer the deploy agent or steer its running turn while it writes the project settings, stop it, pick its model and read past Deploys. - [Chat sessions](https://kosuke.ai/docs/endpoint-reference/chat-sessions.md): Create, start, list, change, search and delete chat sessions, each with its own branch, sandbox and conversation that a message steers while a turn runs. - [Tasks](https://kosuke.ai/docs/endpoint-reference/tasks.md): File, find, edit, start and move workspace tasks in one workspace or across all of yours, with the matching kosuke tasks commands and who may file one. - [Personal tasks](https://kosuke.ai/docs/endpoint-reference/personal-tasks.md): File, find, edit and move the personal tasks in your hidden Personal space, which only your own API key reaches, and move one into a workspace for the team. - [Messages and turns](https://kosuke.ai/docs/endpoint-reference/messages-and-turns.md): Send a message to a chat session, follow the turn it starts or steer the running one, stop a turn, answer the agent's questions and retry a failed turn. - [Pull requests and sync](https://kosuke.ai/docs/endpoint-reference/pull-requests-and-sync.md): Open or update a chat session's pull request by sending /kosuke:open-pr, and sync its branch with the Target Branch through GitHub or the sync-branch skill. - [Previews](https://kosuke.ai/docs/endpoint-reference/previews.md): Get a preview's URLs and wake its sandbox, check the health of its services, restart the sandbox, and share the running app with people through a public link. - [Files and commits](https://kosuke.ai/docs/endpoint-reference/files-and-commits.md): Read and edit files in a chat session's sandbox and read its git state while the sandbox is awake, then ask the agent to review your edits in its next turn. - [Diff](https://kosuke.ai/docs/endpoint-reference/diff.md): Read what a chat session's branch changes, list the changed files, page through their patches, and leave review comments on specific lines of the diff by API. - [Session files](https://kosuke.ai/docs/endpoint-reference/session-files.md): List the Documents, Mockups, Images and Videos the agent wrote in a chat session, read one as text or as a download URL, and point a ticket at one of them. - [Crons](https://kosuke.ai/docs/endpoint-reference/crons.md): Create, change, pause, fire and delete a workspace's crons under its workspace id, read what each Cron Run did and its transcript, and stop a working run. - [Sensei](https://kosuke.ai/docs/endpoint-reference/sensei.md): Read your own open needs across every workspace you belong to, the merge and the Merge rule, and the steps Sensei takes for you, on routes with no workspace id. - [Your Mac](https://kosuke.ai/docs/endpoint-reference/mac.md): What Sensei does on your Mac while the Sensei desktop app is open and signed in, from screenshots and clicks to shell commands and Chrome, and the routes used. - [What only the web app can do](https://kosuke.ai/docs/api/what-an-api-key-cannot-do.md): The actions an API key cannot take, such as API keys, members and billing, the 403 each one answers, and where to do it instead, or what a key can use.