# Agent SDK

Our Agent SDK can be used to build 100% customized agent-side integrations into your own products and services. You can use to both to access our API and to control embedded Cobrowse IFrames.

### Quick start demo

Navigate to our [Agent SDK Demo Page](https://cobrowseio.github.io/cobrowse-agent-sdk-examples/react-example/) and open up our [Cobrowse.io Online Demo](https://cobrowse.io/demo) in another browser tab to generate your Demo ID.

This Demo Page uses our [Agent UI component library](https://github.com/cobrowseio/cobrowse-agent-ui), our [Agent SDK](https://www.npmjs.com/package/cobrowse-agent-sdk), and ties it together into an [Agent SDK Examples project](https://github.com/cobrowseio/cobrowse-agent-sdk-examples).

### Authentication

If you are using the Agent SDK just to communicate to an embedded IFrame, a JWT is not required.

Device and Session listing via the Agent SDK requires a JSON Web Token (JWT) for authentication. Learn how to generate a JWT for your account at [Authentication (JWTs)](https://docs.cobrowse.io/agent-side-integrations/json-web-tokens-jwts).

### Features

The Agent SDK can be used to:

* List Devices and/or Sessions matching your filter criteria
  * Build your own 100% customized dashboard or device list
  * Show only a single user's devices in the context of a support ticket or chat
* Subscribe to events on Devices and Sessions, for example to create a smart connect button that indicates when the devices goes online/offline
* Interact with embedded Cobrowse iFrames
  * Get notified in the parent page when a session begins and ends
  * Attach a button in the parent page to end the session, or select the agent's tool
  * Programmatically end the session before the parent page closes

We have put together a list of commonly ask questions and useful code snippets to get you started:

{% content-ref url="agent-sdk/sample-code-snippets" %}
[sample-code-snippets](https://docs.cobrowse.io/agent-side-integrations/agent-sdk/sample-code-snippets)
{% endcontent-ref %}

You can find the full developer documentation for the agent SDK API here:

{% content-ref url="agent-sdk/api-reference" %}
[api-reference](https://docs.cobrowse.io/agent-side-integrations/agent-sdk/api-reference)
{% endcontent-ref %}


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.cobrowse.io/agent-side-integrations/agent-sdk.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
