> ## Documentation Index
> Fetch the complete documentation index at: https://docs.khanhng.com/llms.txt
> Use this file to discover all available pages before exploring further.

# 4.1 Welcome to the Plugin SDK

> Overview of the Kcode plugin SDK, kernel API, and bundled plugin reference.

Kcode Robot Suite has no HTTP API. Its integration surface is the TypeScript plugin SDK, `@kcode/plugin-sdk`, and the kernel, `@kcode/kernel`. This section replaces an endpoint reference with the contracts you code against.

## 4.1.1 Reference map

| Page | Covers |
| - | - |
| [4.2 Plugin contract](https://docs.khanhng.com/kcode-robot-suite/sdk-reference/plugin-contract.md) | `KcodePlugin`, metadata, routes, navigation, permissions, settings, commands, and lifecycle hooks |
| [4.3 Plugin context](https://docs.khanhng.com/kcode-robot-suite/sdk-reference/plugin-context.md) | `PluginContext` and the services a plugin receives |
| [4.4 Kernel API](https://docs.khanhng.com/kcode-robot-suite/sdk-reference/kernel-api.md) | Registry, lifecycle manager, permissions, events, and configuration |
| [4.5 Platform services](https://docs.khanhng.com/kcode-robot-suite/sdk-reference/platform-services.md) | `DemoAuthService`, `ConsoleLogger`, and `InMemoryNotificationService` |
| 4.6 Bundled plugins | Permissions, settings, and services of the four demos |

## 4.1.2 Packages

| Package | Purpose |
| - | - |
| `@kcode/plugin-sdk` | Types and interfaces only. Plugins import from here. |
| `@kcode/kernel` | Runtime implementation of the platform core. |
| `@kcode/services` | Replaceable platform services. |
| `@kcode/design-system` | UI primitives, patterns, and charts. |
| `@kcode/shared` | `isNonEmptyString`, `immutableCopy`, and `PLATFORM_NAME`. |

## 4.1.3 Add a plugin

**1. Create the package**

Create `plugins/my-new-plugin` with a `package.json` and a `src/index.ts` that exports a `KcodePlugin`.

**2. Describe the plugin**

Add metadata, routes, permissions, settings, and an entry component through `@kcode/plugin-sdk`.

**3. Register it once**

Add the plugin to `config/plugins.ts` and list its package in `transpilePackages` in `apps/web/next.config.ts`.

**4. Verify**

Run `pnpm build`.

No kernel, launcher, or existing-plugin change should be needed for a standard plugin.


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.