# K-Agent documentation

> Configure one AI agent, then use it anywhere — one-shot answers, chat sessions with your own IDs, an OpenAI-compatible endpoint and a web widget, in Arabic and English.

## Get started

- [Introduction](/docs/en/get-started/introduction/): What K-Agent is, its building blocks, and what happens in one turn.
- [Quickstart](/docs/en/get-started/quickstart/): Create an agent and a key, ask a question, then chat in a session with your own ID.

## Understand the concepts

- [Sessions and session IDs](/docs/en/concepts/sessions/): Our sess_ IDs or your external_id: the published contract, get-or-create and history.
- [Runs and streaming](/docs/en/concepts/runs-and-streaming/): The run lifecycle, the event catalog and resuming with Last-Event-ID.
- [Handoff and safety](/docs/en/concepts/handoff-and-safety/): The never-handle list, the verbatim escalation reply and truthful handoffs.
- [Settings reference](/docs/en/concepts/settings/): Every configuration field with its type, default and limits.

## Build

- [Embed the web widget](/docs/en/guides/widget/): One script tag, plus verified users with client tokens.
- [Use the OpenAI SDK](/docs/en/guides/openai-sdk/): Keep your OpenAI code: the agent slug is the model.
- [HTTP tools](/docs/en/guides/http-tools/): Let the agent call your API, safely.
- [Webhooks](/docs/en/guides/webhooks/): Signed events for handoffs, replies and tickets.

## Look things up

- [Errors](/docs/en/reference/errors/): Every error code, what it means and what to do.
- [API reference](/docs/en/api/): Every endpoint, generated from the OpenAPI contract.

Building with an AI assistant? Point it at [`/docs/llms.txt`](/docs/llms.txt), or at [`/docs/en/llms-full.txt`](/docs/en/llms-full.txt) for every English page in one file. Each page also has a **Copy page** button and a Markdown version.
