meetstream-sdk 1.0.0__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- meetstream_sdk-1.0.0/.gitignore +11 -0
- meetstream_sdk-1.0.0/AGENTS.md +164 -0
- meetstream_sdk-1.0.0/CLAUDE.md +26 -0
- meetstream_sdk-1.0.0/LICENSE +21 -0
- meetstream_sdk-1.0.0/PKG-INFO +293 -0
- meetstream_sdk-1.0.0/README.md +260 -0
- meetstream_sdk-1.0.0/pyproject.toml +47 -0
- meetstream_sdk-1.0.0/src/meetstream/__init__.py +154 -0
- meetstream_sdk-1.0.0/src/meetstream/_client.py +284 -0
- meetstream_sdk-1.0.0/src/meetstream/_errors.py +118 -0
- meetstream_sdk-1.0.0/src/meetstream/py.typed +0 -0
- meetstream_sdk-1.0.0/src/meetstream/resources/__init__.py +11 -0
- meetstream_sdk-1.0.0/src/meetstream/resources/bots.py +209 -0
- meetstream_sdk-1.0.0/src/meetstream/resources/calendar.py +113 -0
- meetstream_sdk-1.0.0/src/meetstream/resources/integrations.py +161 -0
- meetstream_sdk-1.0.0/src/meetstream/resources/mia.py +52 -0
- meetstream_sdk-1.0.0/src/meetstream/resources/transcripts.py +90 -0
- meetstream_sdk-1.0.0/src/meetstream/webhooks.py +64 -0
- meetstream_sdk-1.0.0/tests/test_sdk.py +264 -0
|
@@ -0,0 +1,164 @@
|
|
|
1
|
+
# AGENTS.md
|
|
2
|
+
|
|
3
|
+
Guidance for AI coding agents working in this repository. This repo is the **official MeetStream SDK for Python** (`meetstream-sdk` on PyPI, imported as `meetstream`).
|
|
4
|
+
|
|
5
|
+
## Always use the MeetStream MCP
|
|
6
|
+
|
|
7
|
+
When building anything against the MeetStream API, install and use the MeetStream MCP. It is the current source of truth for endpoints, request and response fields, webhook events, provider names and bot behaviour.
|
|
8
|
+
|
|
9
|
+
Do not treat the files in this repository as authoritative for MeetStream API behaviour. They can lag the API. If local code and the MCP disagree, the MCP wins unless the user says otherwise.
|
|
10
|
+
|
|
11
|
+
Server name: `meetstream`. Hosted URL: `https://mcp.meetstream.ai/mcp`.
|
|
12
|
+
|
|
13
|
+
### Claude Code
|
|
14
|
+
|
|
15
|
+
```sh
|
|
16
|
+
claude mcp add --transport http meetstream https://mcp.meetstream.ai/mcp \
|
|
17
|
+
--header "Authorization: Bearer $MEETSTREAM_API_KEY"
|
|
18
|
+
```
|
|
19
|
+
|
|
20
|
+
The [MeetStream Claude plugin](https://github.com/meetstream-ai/claude-plugin) is a separate, complementary install. It ships **skills only** and does not include the MCP server, so install both:
|
|
21
|
+
|
|
22
|
+
```sh
|
|
23
|
+
/plugin marketplace add meetstream-ai/claude-plugin
|
|
24
|
+
```
|
|
25
|
+
|
|
26
|
+
### Cursor
|
|
27
|
+
|
|
28
|
+
Add to `~/.cursor/mcp.json`, or install the [MeetStream Cursor plugin](https://github.com/meetstream-ai/meetstream-cursor-plugin):
|
|
29
|
+
|
|
30
|
+
```json
|
|
31
|
+
{
|
|
32
|
+
"mcpServers": {
|
|
33
|
+
"meetstream": {
|
|
34
|
+
"url": "https://mcp.meetstream.ai/mcp",
|
|
35
|
+
"headers": { "Authorization": "Bearer YOUR_MEETSTREAM_API_KEY" }
|
|
36
|
+
}
|
|
37
|
+
}
|
|
38
|
+
}
|
|
39
|
+
```
|
|
40
|
+
|
|
41
|
+
### Windsurf
|
|
42
|
+
|
|
43
|
+
Add to `~/.codeium/windsurf/mcp_config.json`:
|
|
44
|
+
|
|
45
|
+
```json
|
|
46
|
+
{
|
|
47
|
+
"mcpServers": {
|
|
48
|
+
"meetstream": {
|
|
49
|
+
"serverUrl": "https://mcp.meetstream.ai/mcp",
|
|
50
|
+
"headers": { "Authorization": "Bearer YOUR_MEETSTREAM_API_KEY" }
|
|
51
|
+
}
|
|
52
|
+
}
|
|
53
|
+
}
|
|
54
|
+
```
|
|
55
|
+
|
|
56
|
+
### Claude Desktop
|
|
57
|
+
|
|
58
|
+
Settings -> Connectors -> Add custom connector. Name it `meetstream`, URL `https://mcp.meetstream.ai/mcp`.
|
|
59
|
+
|
|
60
|
+
### Codex
|
|
61
|
+
|
|
62
|
+
```sh
|
|
63
|
+
codex mcp add meetstream --url https://mcp.meetstream.ai/mcp \
|
|
64
|
+
--header "Authorization: Bearer $MEETSTREAM_API_KEY"
|
|
65
|
+
```
|
|
66
|
+
|
|
67
|
+
### Run it locally instead
|
|
68
|
+
|
|
69
|
+
```sh
|
|
70
|
+
MEETSTREAM_API_KEY=ms_... npx -y @meetstream/mcp
|
|
71
|
+
```
|
|
72
|
+
|
|
73
|
+
### Use the MCP before
|
|
74
|
+
|
|
75
|
+
- calling any MeetStream endpoint
|
|
76
|
+
- changing webhook handling or event names
|
|
77
|
+
- adding or changing bot, transcription, calendar or MIA behaviour
|
|
78
|
+
- relying on any request field, response field, provider name or status code
|
|
79
|
+
|
|
80
|
+
## Working in this repo
|
|
81
|
+
|
|
82
|
+
Python **3.8+**, sync and async, `httpx` as the only runtime dependency. Built with hatchling.
|
|
83
|
+
|
|
84
|
+
```sh
|
|
85
|
+
uv venv && source .venv/bin/activate
|
|
86
|
+
uv pip install -e ".[dev]"
|
|
87
|
+
|
|
88
|
+
pytest # full suite
|
|
89
|
+
python -m build # sdist + wheel into dist/
|
|
90
|
+
python -m twine check dist/*
|
|
91
|
+
```
|
|
92
|
+
|
|
93
|
+
Tests need **no API key and no network**: every request is served by an `httpx.MockTransport`. Run them before every commit.
|
|
94
|
+
|
|
95
|
+
### Layout
|
|
96
|
+
|
|
97
|
+
| Path | Purpose |
|
|
98
|
+
|---|---|
|
|
99
|
+
| `src/meetstream/__init__.py` | `MeetStream` and `AsyncMeetStream`, public re-exports |
|
|
100
|
+
| `src/meetstream/_client.py` | sync and async transports: auth, retries, status handling |
|
|
101
|
+
| `src/meetstream/_errors.py` | error hierarchy and the status -> class mapping |
|
|
102
|
+
| `src/meetstream/webhooks.py` | signature verification and lifecycle helpers |
|
|
103
|
+
| `src/meetstream/resources/*.py` | one namespace per API area, sync class + `Async` subclass |
|
|
104
|
+
| `src/meetstream/py.typed` | marks the package as typed |
|
|
105
|
+
|
|
106
|
+
### Rules
|
|
107
|
+
|
|
108
|
+
- **Every sync method needs its async twin.** The `Async*` classes subclass the sync ones and override each method; a method added to only one half is a bug.
|
|
109
|
+
- `httpx` is the only runtime dependency. Do not add more.
|
|
110
|
+
- Keep 3.8 compatibility: `from __future__ import annotations`, and `Optional[X]` rather than `X | None` at runtime.
|
|
111
|
+
- Field names mirror the wire format. Never rename for aesthetics.
|
|
112
|
+
- Every new method needs a test. The suite is the spec.
|
|
113
|
+
- Keep `py.typed` shipped - it is what makes the annotations visible to mypy and pyright.
|
|
114
|
+
|
|
115
|
+
### The status-code handling is deliberate
|
|
116
|
+
|
|
117
|
+
`202` sits **inside** the success range, so `_handle` checks it *before* `response.is_success`. Without that, "not ready yet" silently looks like success. `507` is the mirror case: outside 2xx, but an idempotent replay and therefore a success. Both are covered by tests - do not "simplify" that branch.
|
|
118
|
+
|
|
119
|
+
### Releasing
|
|
120
|
+
|
|
121
|
+
Bump `version` in `pyproject.toml` **and** `__version__` in `src/meetstream/__init__.py`, run `pytest`, then:
|
|
122
|
+
|
|
123
|
+
```sh
|
|
124
|
+
python -m build && python -m twine upload dist/*
|
|
125
|
+
```
|
|
126
|
+
|
|
127
|
+
## API rules that are easy to get wrong
|
|
128
|
+
|
|
129
|
+
These are live-verified. Do not "fix" code that follows them.
|
|
130
|
+
|
|
131
|
+
- **Auth differs by surface.** The REST API at `api.meetstream.ai` uses `Authorization: Token <key>`. The MCP server at `mcp.meetstream.ai` uses `Authorization: Bearer <key>`. Mixing them up returns 401.
|
|
132
|
+
- The webhook envelope key is **`event`**, not `bot_event`.
|
|
133
|
+
- **`bot.stopped` is the single terminal event** and always carries `status_code: 200`. The reason lives in `bot_status`: `Stopped`, `NotAllowed` (waiting-room timeout), `Denied` (host refused), `Error`.
|
|
134
|
+
- `bot.error` is **non-terminal** - the bot keeps running.
|
|
135
|
+
- **Streaming-only providers never emit `bot.done`.** They end at `audio.processed`, and a post-call transcript fetch returns `202` forever, so any polling loop needs a cap.
|
|
136
|
+
- Transcripts are fetched by **`transcript_id`**, not `bot_id`, and segments use **`transcript`**, not `text`.
|
|
137
|
+
- **`202` and `507` are not errors.** 202 means poll again; 507 means an idempotent retry replayed and is a success.
|
|
138
|
+
- The bot field is **`meeting_link`**, not `meeting_url`.
|
|
139
|
+
- `in_call_recording_timeout` has a hard floor of **600 seconds**; below it the API returns 400.
|
|
140
|
+
- MIA bots take **only `agent_config_id`**. Adding `socket_connection_url` or `live_audio_required` alongside it is the usual cause of a silent agent.
|
|
141
|
+
\n## Security
|
|
142
|
+
|
|
143
|
+
- Never hard-code or commit a key. `ms_...` values belong in the environment.
|
|
144
|
+
- Never log a key, a transcript, or participant data.
|
|
145
|
+
- Do not expose a server-side key to client code.
|
|
146
|
+
- Verify webhook signatures before acting on a payload.
|
|
147
|
+
- Do not persist meeting, transcript, participant or recording data unless asked.
|
|
148
|
+
|
|
149
|
+
## Before you finish
|
|
150
|
+
|
|
151
|
+
- `pytest` passes.
|
|
152
|
+
- `python -m build` succeeds and `twine check dist/*` passes.
|
|
153
|
+
- Every new sync method has a matching async method.
|
|
154
|
+
- Version bumped in both places when releasing.
|
|
155
|
+
- State which MCP tools or docs you relied on, what changed, and what you did not verify.
|
|
156
|
+
|
|
157
|
+
## Related
|
|
158
|
+
|
|
159
|
+
- Docs: https://docs.meetstream.ai
|
|
160
|
+
- MCP server: [`@meetstream/mcp`](https://github.com/meetstream-ai/meetstream-mcp)
|
|
161
|
+
- CLI: [`@meetstream/cli`](https://github.com/meetstream-ai/meetstream-cli)
|
|
162
|
+
- Claude Code plugin: https://github.com/meetstream-ai/claude-plugin
|
|
163
|
+
- Cursor plugin: https://github.com/meetstream-ai/meetstream-cursor-plugin
|
|
164
|
+
- Runnable examples: https://github.com/meetstream-ai/labs
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
# CLAUDE.md
|
|
2
|
+
|
|
3
|
+
Claude Code does not read `AGENTS.md` natively, so this file imports it. Everything in it applies here.
|
|
4
|
+
|
|
5
|
+
@AGENTS.md
|
|
6
|
+
|
|
7
|
+
## Claude Code specifics
|
|
8
|
+
|
|
9
|
+
Install the MeetStream MCP server so you are working against current API truth rather than this repo's files:
|
|
10
|
+
|
|
11
|
+
```sh
|
|
12
|
+
claude mcp add --transport http meetstream https://mcp.meetstream.ai/mcp \
|
|
13
|
+
--header "Authorization: Bearer $MEETSTREAM_API_KEY"
|
|
14
|
+
```
|
|
15
|
+
|
|
16
|
+
Separately, the [MeetStream Claude plugin](https://github.com/meetstream-ai/claude-plugin) adds skills for notetakers, sales coaching, calendar automation and scaffolding. It ships **skills only** and does not include the MCP server, so the two are complementary rather than alternatives:
|
|
17
|
+
|
|
18
|
+
```sh
|
|
19
|
+
/plugin marketplace add meetstream-ai/claude-plugin
|
|
20
|
+
```
|
|
21
|
+
|
|
22
|
+
Confirm it is live with `/mcp`, then ask for `list_bots` - a clean response means the key and transport are both good.
|
|
23
|
+
|
|
24
|
+
## Keep these two files in sync
|
|
25
|
+
|
|
26
|
+
`CLAUDE.md` imports `AGENTS.md` rather than duplicating it, so edit **`AGENTS.md`** and the change lands in both. Only Claude-Code-specific instructions belong in this file.
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2026 MeetStream.ai
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|
|
@@ -0,0 +1,293 @@
|
|
|
1
|
+
Metadata-Version: 2.5
|
|
2
|
+
Name: meetstream-sdk
|
|
3
|
+
Version: 1.0.0
|
|
4
|
+
Summary: Official MeetStream SDK for Python - send AI meeting bots into Zoom, Google Meet and Microsoft Teams. Record, transcribe, summarize and stream meetings, and run MIA voice agents.
|
|
5
|
+
Project-URL: Homepage, https://meetstream.ai
|
|
6
|
+
Project-URL: Documentation, https://docs.meetstream.ai
|
|
7
|
+
Project-URL: Repository, https://github.com/meetstream-ai/meetstream-python
|
|
8
|
+
Project-URL: Issues, https://github.com/meetstream-ai/meetstream-python/issues
|
|
9
|
+
Author-email: "MeetStream.ai" <hello@meetstream.ai>
|
|
10
|
+
License: MIT
|
|
11
|
+
License-File: LICENSE
|
|
12
|
+
Keywords: ai-notetaker,google-meet,live-transcription,meeting-bot,meeting-bot-api,meeting-recording,meetstream,mia,microsoft-teams,sdk,transcription,voice-agent,webhooks,zoom
|
|
13
|
+
Classifier: Development Status :: 5 - Production/Stable
|
|
14
|
+
Classifier: Intended Audience :: Developers
|
|
15
|
+
Classifier: License :: OSI Approved :: MIT License
|
|
16
|
+
Classifier: Programming Language :: Python :: 3
|
|
17
|
+
Classifier: Programming Language :: Python :: 3.8
|
|
18
|
+
Classifier: Programming Language :: Python :: 3.9
|
|
19
|
+
Classifier: Programming Language :: Python :: 3.10
|
|
20
|
+
Classifier: Programming Language :: Python :: 3.11
|
|
21
|
+
Classifier: Programming Language :: Python :: 3.12
|
|
22
|
+
Classifier: Programming Language :: Python :: 3.13
|
|
23
|
+
Classifier: Topic :: Communications :: Conferencing
|
|
24
|
+
Classifier: Topic :: Software Development :: Libraries :: Python Modules
|
|
25
|
+
Classifier: Typing :: Typed
|
|
26
|
+
Requires-Python: >=3.8
|
|
27
|
+
Requires-Dist: httpx<1,>=0.23
|
|
28
|
+
Provides-Extra: dev
|
|
29
|
+
Requires-Dist: pytest-asyncio>=0.21; extra == 'dev'
|
|
30
|
+
Requires-Dist: pytest>=7; extra == 'dev'
|
|
31
|
+
Requires-Dist: respx>=0.20; extra == 'dev'
|
|
32
|
+
Description-Content-Type: text/markdown
|
|
33
|
+
|
|
34
|
+
<div align="center">
|
|
35
|
+
|
|
36
|
+
# MeetStream SDK for Python
|
|
37
|
+
|
|
38
|
+
**Send AI bots into Zoom, Google Meet and Microsoft Teams.** Record, transcribe, summarize and stream meetings, and run [MIA voice agents](#mia-voice-agents) that talk back.
|
|
39
|
+
|
|
40
|
+
[](https://pypi.org/project/meetstream-sdk/)
|
|
41
|
+
[](https://pypi.org/project/meetstream-sdk/)
|
|
42
|
+
[](https://docs.meetstream.ai)
|
|
43
|
+
[](#typed)
|
|
44
|
+
[](LICENSE)
|
|
45
|
+
|
|
46
|
+
</div>
|
|
47
|
+
|
|
48
|
+
```bash
|
|
49
|
+
pip install meetstream-sdk
|
|
50
|
+
```
|
|
51
|
+
|
|
52
|
+
Python 3.8+. Sync and async. Ships type information.
|
|
53
|
+
|
|
54
|
+
## Quickstart
|
|
55
|
+
|
|
56
|
+
```python
|
|
57
|
+
from meetstream import MeetStream
|
|
58
|
+
|
|
59
|
+
meetstream = MeetStream() # reads MEETSTREAM_API_KEY
|
|
60
|
+
|
|
61
|
+
bot = meetstream.bots.create({
|
|
62
|
+
"meeting_link": "https://meet.google.com/abc-defg-hij",
|
|
63
|
+
"bot_name": "Notetaker",
|
|
64
|
+
"recording_config": {
|
|
65
|
+
"transcript": {"provider": {"deepgram": {"model": "nova-3", "language": "en"}}}
|
|
66
|
+
},
|
|
67
|
+
})
|
|
68
|
+
|
|
69
|
+
# Bounded wait - never spins forever, even on a streaming-only bot.
|
|
70
|
+
transcript = meetstream.transcripts.wait_for(bot["transcript_id"])
|
|
71
|
+
```
|
|
72
|
+
|
|
73
|
+
Get a key at [app.meetstream.ai/api-key](https://app.meetstream.ai/api-key).
|
|
74
|
+
|
|
75
|
+
### Async
|
|
76
|
+
|
|
77
|
+
```python
|
|
78
|
+
from meetstream import AsyncMeetStream
|
|
79
|
+
|
|
80
|
+
async with AsyncMeetStream() as meetstream:
|
|
81
|
+
bot = await meetstream.bots.create({"meeting_link": "https://zoom.us/j/123"})
|
|
82
|
+
status = await meetstream.bots.status(bot["bot_id"])
|
|
83
|
+
```
|
|
84
|
+
|
|
85
|
+
## Why this SDK
|
|
86
|
+
|
|
87
|
+
The MeetStream API has a handful of behaviours that look like bugs until you know them. This SDK encodes all of them so you do not rediscover them in production.
|
|
88
|
+
|
|
89
|
+
| The trap | What the SDK does |
|
|
90
|
+
|---|---|
|
|
91
|
+
| **`202` sits inside the 2xx range** and means "not ready yet", not success | Raises `NotReadyError` instead of handing you an empty body |
|
|
92
|
+
| **`507` looks like a failure** but is an idempotent replay | Returns the original resource as success |
|
|
93
|
+
| **Streaming-only providers return `202` forever** - no post-call transcript ever exists | `wait_for()` is always bounded and tells you exactly why it gave up |
|
|
94
|
+
| **Transcripts are keyed by `transcript_id`**, not `bot_id` | `transcripts.get()` takes the right id |
|
|
95
|
+
| **Segments use `transcript`, not `text`** | Documented at every call site |
|
|
96
|
+
| **`remove_bot` is a `GET`** | `bots.remove()` handles it |
|
|
97
|
+
| **REST uses `Token`, the MCP server uses `Bearer`** | Correct scheme sent automatically |
|
|
98
|
+
| **MIA takes only `agent_config_id`** | Extra bridge fields are the usual cause of a silent agent |
|
|
99
|
+
|
|
100
|
+
## What you can do
|
|
101
|
+
|
|
102
|
+
<details open>
|
|
103
|
+
<summary><b>Bots</b> - lifecycle, media, live interaction</summary>
|
|
104
|
+
|
|
105
|
+
```python
|
|
106
|
+
meetstream.bots.create(params, idempotency_key=uuid)
|
|
107
|
+
meetstream.bots.list()
|
|
108
|
+
meetstream.bots.status(bot_id)
|
|
109
|
+
meetstream.bots.detail(bot_id) # includes transcript_id
|
|
110
|
+
meetstream.bots.summary(bot_id) # AI summary
|
|
111
|
+
meetstream.bots.remove(bot_id) # leave, keep the data
|
|
112
|
+
meetstream.bots.delete_data(bot_id) # irreversible
|
|
113
|
+
|
|
114
|
+
meetstream.bots.audio(bot_id)
|
|
115
|
+
meetstream.bots.video(bot_id)
|
|
116
|
+
meetstream.bots.audio_streams(bot_id) # per-participant audio
|
|
117
|
+
meetstream.bots.recording_streams(bot_id) # per-participant video
|
|
118
|
+
meetstream.bots.screenshots(bot_id)
|
|
119
|
+
meetstream.bots.wait_for_audio(bot_id) # bounded
|
|
120
|
+
|
|
121
|
+
meetstream.bots.participants(bot_id)
|
|
122
|
+
meetstream.bots.chats(bot_id)
|
|
123
|
+
meetstream.bots.speaker_timeline(bot_id)
|
|
124
|
+
|
|
125
|
+
meetstream.bots.send_message(bot_id, "Recording has started.")
|
|
126
|
+
meetstream.bots.send_image(bot_id, "https://…/slide.png", display_duration=5)
|
|
127
|
+
meetstream.bots.pause_recording(bot_id) # privacy window
|
|
128
|
+
meetstream.bots.resume_recording(bot_id)
|
|
129
|
+
```
|
|
130
|
+
|
|
131
|
+
</details>
|
|
132
|
+
|
|
133
|
+
<details open>
|
|
134
|
+
<summary><b>Transcripts</b></summary>
|
|
135
|
+
|
|
136
|
+
```python
|
|
137
|
+
meetstream.transcripts.get(transcript_id)
|
|
138
|
+
meetstream.transcripts.wait_for(transcript_id, timeout=900)
|
|
139
|
+
meetstream.transcripts.list_for_bot(bot_id)
|
|
140
|
+
meetstream.transcripts.transcribe_bot_audio(bot_id) # rescue a streaming-only bot
|
|
141
|
+
```
|
|
142
|
+
|
|
143
|
+
</details>
|
|
144
|
+
|
|
145
|
+
<details open>
|
|
146
|
+
<summary><b>Calendar</b> - auto-join and scheduling</summary>
|
|
147
|
+
|
|
148
|
+
```python
|
|
149
|
+
meetstream.calendar.connect_google({
|
|
150
|
+
"google_client_id": ..., "google_client_secret": ..., "google_refresh_token": ...,
|
|
151
|
+
})
|
|
152
|
+
meetstream.calendar.connect_outlook({...})
|
|
153
|
+
meetstream.calendar.events()
|
|
154
|
+
meetstream.calendar.schedule_event(event_id)
|
|
155
|
+
meetstream.calendar.list_scheduled_bots()
|
|
156
|
+
meetstream.calendar.reschedule_bot(bot_id, "2026-09-01T10:00:00Z")
|
|
157
|
+
meetstream.calendar.enable_auto_schedule()
|
|
158
|
+
```
|
|
159
|
+
|
|
160
|
+
</details>
|
|
161
|
+
|
|
162
|
+
<details open>
|
|
163
|
+
<summary><b>MIA voice agents</b></summary>
|
|
164
|
+
|
|
165
|
+
```python
|
|
166
|
+
agent = meetstream.mia.create({
|
|
167
|
+
"agent_name": "Meeting Assistant",
|
|
168
|
+
"mode": "pipeline", # or "realtime" for speech-to-speech
|
|
169
|
+
"model": {"provider": "openai", "model": "gpt-4.1",
|
|
170
|
+
"first_message": "Hi, I'm an AI assistant on this call."},
|
|
171
|
+
"voice": {"provider": "openai", "voice_id": "nova"},
|
|
172
|
+
"transcriber": {"provider": "deepgram", "model": "nova-3",
|
|
173
|
+
"boostwords": ["Acme", "MeetStream"]},
|
|
174
|
+
"agent": {"tools": [], "mcp_servers": [], "enable_interruptions": True},
|
|
175
|
+
"wake_word": {"enabled": True, "words": ["hey acme"], "timeout": 30},
|
|
176
|
+
})
|
|
177
|
+
|
|
178
|
+
# Attach it with ONE field. Adding socket_connection_url or
|
|
179
|
+
# live_audio_required alongside is the usual cause of a silent agent.
|
|
180
|
+
meetstream.bots.create({
|
|
181
|
+
"meeting_link": meeting_link,
|
|
182
|
+
"agent_config_id": agent["agent_config_id"],
|
|
183
|
+
})
|
|
184
|
+
```
|
|
185
|
+
|
|
186
|
+
`boostwords` fixes most "it mishears our company name" complaints, and `mcp_servers` is what turns a talking bot into one that can do work mid-call.
|
|
187
|
+
|
|
188
|
+
</details>
|
|
189
|
+
|
|
190
|
+
<details>
|
|
191
|
+
<summary><b>Integrations</b> - Google signed-in bots, Zoom OAuth, your own S3</summary>
|
|
192
|
+
|
|
193
|
+
```python
|
|
194
|
+
meetstream.google_logins.create_domain({...})
|
|
195
|
+
meetstream.google_logins.create({...})
|
|
196
|
+
|
|
197
|
+
meetstream.zoom.authorize_url()
|
|
198
|
+
meetstream.zoom.list_connections()
|
|
199
|
+
|
|
200
|
+
meetstream.storage.set({"provider": "aws", "bucket_name": ..., "region": ...})
|
|
201
|
+
```
|
|
202
|
+
|
|
203
|
+
</details>
|
|
204
|
+
|
|
205
|
+
## Webhooks
|
|
206
|
+
|
|
207
|
+
Verify before you trust. Pass the **raw** body - re-serializing a parsed dict changes key order and the signature will never match.
|
|
208
|
+
|
|
209
|
+
```python
|
|
210
|
+
from flask import Flask, request
|
|
211
|
+
from meetstream import parse_webhook, is_terminal, describe_stop
|
|
212
|
+
|
|
213
|
+
app = Flask(__name__)
|
|
214
|
+
|
|
215
|
+
@app.post("/webhook")
|
|
216
|
+
def webhook():
|
|
217
|
+
try:
|
|
218
|
+
event = parse_webhook(
|
|
219
|
+
request.get_data(), # raw bytes, not request.json
|
|
220
|
+
request.headers.get("X-MeetStream-Signature", ""),
|
|
221
|
+
os.environ["WEBHOOK_SECRET"],
|
|
222
|
+
)
|
|
223
|
+
except ValueError:
|
|
224
|
+
return "", 401
|
|
225
|
+
|
|
226
|
+
if is_terminal(event):
|
|
227
|
+
print(describe_stop(event))
|
|
228
|
+
return "", 200 # ack fast, process async
|
|
229
|
+
```
|
|
230
|
+
|
|
231
|
+
**`bot.stopped` is the single terminal event** and always carries `status_code: 200` - the reason lives in `bot_status` (`Stopped`, `NotAllowed`, `Denied`, `Error`). `bot.error` is *not* terminal; the bot keeps running. Streaming-only providers stop at `audio.processed` and never emit `bot.done`.
|
|
232
|
+
|
|
233
|
+
## Errors
|
|
234
|
+
|
|
235
|
+
```python
|
|
236
|
+
from meetstream import NotReadyError, RateLimitError, BadRequestError, MeetStreamError
|
|
237
|
+
|
|
238
|
+
try:
|
|
239
|
+
meetstream.transcripts.get(transcript_id)
|
|
240
|
+
except NotReadyError:
|
|
241
|
+
... # 202 - poll again
|
|
242
|
+
except RateLimitError as e:
|
|
243
|
+
time.sleep(e.retry_after or 5)
|
|
244
|
+
except BadRequestError as e:
|
|
245
|
+
print(e.message) # the API's own message
|
|
246
|
+
except MeetStreamError as e:
|
|
247
|
+
print(e.status, e.request_id)
|
|
248
|
+
```
|
|
249
|
+
|
|
250
|
+
`AuthenticationError` (401) means the header never arrived. `PermissionError` (403) means the key itself was rejected. That distinction saves a lot of debugging.
|
|
251
|
+
|
|
252
|
+
## Configuration
|
|
253
|
+
|
|
254
|
+
```python
|
|
255
|
+
meetstream = MeetStream(
|
|
256
|
+
api_key=os.environ["MEETSTREAM_API_KEY"],
|
|
257
|
+
base_url="https://api.meetstream.ai/api/v1",
|
|
258
|
+
timeout=60.0,
|
|
259
|
+
max_retries=2, # 429 and 5xx, exponential backoff, honours Retry-After
|
|
260
|
+
default_headers={},
|
|
261
|
+
http_client=my_httpx_client,
|
|
262
|
+
)
|
|
263
|
+
```
|
|
264
|
+
|
|
265
|
+
| Variable | Purpose |
|
|
266
|
+
|---|---|
|
|
267
|
+
| `MEETSTREAM_API_KEY` | Your key. Required unless passed explicitly |
|
|
268
|
+
| `MEETSTREAM_API_URL` | Override the API base |
|
|
269
|
+
|
|
270
|
+
Anything not yet wrapped is reachable through the raw transport:
|
|
271
|
+
|
|
272
|
+
```python
|
|
273
|
+
meetstream.http.get("/some/new/endpoint")
|
|
274
|
+
```
|
|
275
|
+
|
|
276
|
+
## Typed
|
|
277
|
+
|
|
278
|
+
The package ships `py.typed`, so mypy and pyright pick up its annotations with no stub package.
|
|
279
|
+
|
|
280
|
+
## Also available
|
|
281
|
+
|
|
282
|
+
| | What | Where |
|
|
283
|
+
|:--:|---|---|
|
|
284
|
+
| 🔌 | **MCP server** - 19 tools for any MCP client | [`@meetstream/mcp`](https://www.npmjs.com/package/@meetstream/mcp) |
|
|
285
|
+
| 📦 | **TypeScript SDK** | [`@meetstream/sdk`](https://www.npmjs.com/package/@meetstream/sdk) |
|
|
286
|
+
| ⌨️ | **CLI** | [`@meetstream/cli`](https://www.npmjs.com/package/@meetstream/cli) |
|
|
287
|
+
| 🧪 | **Labs** - runnable templates | [labs](https://github.com/meetstream-ai/labs) |
|
|
288
|
+
|
|
289
|
+
## Links
|
|
290
|
+
|
|
291
|
+
[Documentation](https://docs.meetstream.ai) · [API reference](https://docs.meetstream.ai/api-reference/introduction) · [Errors](https://docs.meetstream.ai/errors) · [Webhooks](https://docs.meetstream.ai/guides/webhooks/webhooks-and-events) · [MIA](https://docs.meetstream.ai/guides/mia/create-mia) · [support@meetstream.ai](mailto:support@meetstream.ai)
|
|
292
|
+
|
|
293
|
+
MIT licensed.
|