# Connecting Agents

The Wayfound Manager SDK provides a simple interface for connecting agents to Wayfound. It allows developers to seamlessly integrate Wayfound's AI agent supervision capabilities with their third-party agents using Python, JavaScript or simple REST API endpoints directly.

The **Connection** page provides instructions and information for connecting your third-party agent to Wayfound. It includes the agent's unique ID, which is required for use of the Wayfound SDK.

<figure><img src="/files/CDouAkWgec8qE8Dh3qTp" alt=""><figcaption></figcaption></figure>

### Getting started

{% hint style="info" %}
First, you should have at least one third-party agent connected to the Wayfound platform. If you have not yet connected an agent, visit [The Agents Page](/agents/the-agents-page.md) and connect an agent.
{% endhint %}

#### Connecting Agents with Python

You can install the Wayfound SDK using pip:

```python
pip install wayfound
```

To use the Wayfound Manager SDK, you'll need a Wayfound API key and an agent ID. The Agent ID is available on the agent's Connection page. API keys can be obtained by users with admin permissions from the [API page](/api.md).

The SDK provides methods to record new messages, update existing recordings, and add details like user ratings and handoffs. For example:

```python
from wayfound import Session

wayfound_api_key = "<API KEY>"
wayfound_agent_id = "<AGENT_ID>"

wayfound_session = Session(wayfound_api_key=wayfound_api_key, agent_id=wayfound_agent_id)

messages = []

messages.append({
    "timestamp": "2025-05-07T10:00:00Z",
    "event_type": "assistant_message",
    "attributes": {
      "content": "Hello, how can I help you today?",
    }
  })

messages.append({
    "timestamp": "2025-05-07T10:00:04Z",
    "event_type": "user_message",
    "attributes": {
      "content": "What's the current status of Project Alpha?"
    }
  })

result = wayfound_session.create(messages=messages)
```

#### Connecting Agents with JavaScript:

You can install the Wayfound SDK using npm:

```
npm install wayfound
```

To use the Wayfound Manager SDK, you'll need a Wayfound API key and an agent ID. The Agent ID is available on the agent's Connection page. API keys can be obtained by users with admin permissions from the [API page](/api.md).

The SDK provides methods to record new messages, update existing recordings, and add details like user ratings and handoffs. For example:

```javascript
import { Session } from "wayfound";

const wayfoundApiKey = "<API KEY>";
const agentId = "<AGENT_ID>";

const session = new Session({ wayfoundApiKey, agentId });

const messages = [
  {
    timestamp: "2025-05-07T10:00:00Z",
    event_type: "assistant_message",
    attributes: {
      content: "Hello, how can I help you today?",
    },
  },
  {
    timestamp: "2025-05-07T10:00:10Z",
    event_type: "user_message",
    attributes: {
      content: "What's the current status of Project Alpha?",
    },
  },
];

const response = await session.create({ messages });
```

### Resources

* PyPI Project: <https://pypi.org/project/wayfound/>
* npm Package: <https://www.npmjs.com/package/wayfound>
* Python Source Code: <https://github.com/Wayfound-AI/wayfound-sdk-python>
* Javascript Source Code: <https://github.com/Wayfound-AI/wayfound-sdk-javascript>


---

# 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.wayfound.ai/agents/connecting-agents.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.
