mcpbeat Sign in

Deepgram Python Text Intelligence Agent Skill

Use when writing or reviewing Python code in this repo that calls Deepgram Text Intelligence / Read (`/v1/read`) for sentiment, summarization, topic detection, and intent recognition on text input. Covers `client.read.v1.text.analyze(...)` with body `text` or `url`. Use `deepgram-python-audio-intelligence` when the source is audio instead of text. Triggers include "read API", "text intelligence", "analyze text", "sentiment", "summarize text", "topics", "intents", "read.v1".

1k tokens
context cost
the whole folder, loaded on every use
1
files
instructions only
0
copies elsewhere
how many repositories repackaged it
454
stars on the repo
on the repository, not the skill itself

Install

one command, takes just this skill from the repository
npx skills add https://github.com/deepgram/deepgram-python-sdk --skill deepgram-python-text-intelligence

The instruction itself

11 sections, as written by the author

Using Deepgram Text Intelligence (Python SDK)

Analyze plain text (or a hosted text URL) for sentiment, summarization, topics, and intents via /v1/read.

When to use this product

  • You have text already (a transcript, document, chat log, email) and want analytics.
  • You want a quick one-shot analysis — REST only, no streaming.

Use a different skill when:

  • The source is audio and you want analytics overlays → deepgram-python-audio-intelligence (same analytics, applied at transcription time).

Authentication

from dotenv import load_dotenv
load_dotenv()

from deepgram import DeepgramClient
client = DeepgramClient()

Header: Authorization: Token <api_key>.

Quick start

response = client.read.v1.text.analyze(
    request={"text": "Hello, world! This is a sample text for analysis."},
    language="en",
    sentiment=True,
    summarize=True,   # /v1/read is boolean-only (see gotchas)
    topics=True,
    intents=True,
)

if response.results.sentiments:
    print("sentiment avg:", response.results.sentiments.average)
if response.results.summary:
    print("summary:", response.results.summary.text)
if response.results.topics:
    print("topics:", response.results.topics.segments)
if response.results.intents:
    print("intents:", response.results.intents.segments)

Pass request={"text": "..."} for raw text OR request={"url": "https://..."} for a hosted plain-text document.

Async equivalent

from deepgram import AsyncDeepgramClient
client = AsyncDeepgramClient()
response = await client.read.v1.text.analyze(request={"text": "..."}, language="en", sentiment=True)

Key parameters

| Param | Type | Notes |

|---|---|---|

| request | {"text": str} or {"url": str} | One of these is required |

| language | str | Required for most analytics. English only today. |

| sentiment | bool | Per-segment + average sentiment |

| summarize | bool | /v1/read accepts boolean only. The SDK type alias TextAnalyzeRequestSummarize = typing.Union[typing.Literal["v2"], typing.Any] is shared with Listen and is broader than what Read actually supports — the analyze method docstring states: "For Read API, accepts boolean only." (Listen's summarize="v2" is a different product — see deepgram-python-audio-intelligence.) |

| topics | bool | Topic detection per segment |

| intents | bool | Intent recognition per segment |

| custom_topic / custom_topic_mode | list[str] / str | User-defined topics |

| custom_intent / custom_intent_mode | list[str] / str | User-defined intents |

| callback, callback_method, tag | | Async callback + metadata |

Response shape (abridged)

response.results.summary.text
response.results.sentiments.segments[]
response.results.sentiments.average
response.results.topics.segments[]
response.results.intents.segments[]
response.metadata

See reference.md → "Read V1 Text" for full shape. Request body model: ReadV1RequestParams.

API reference (layered)

  • In-repo reference: reference.md — "Read V1 Text".
  • OpenAPI (REST): https://developers.deepgram.com/openapi.yaml
  • Context7: library ID /llmstxt/developers_deepgram_llms_txt.
  • Product docs:
  • https://developers.deepgram.com/reference/text-intelligence/analyze-text
  • https://developers.deepgram.com/docs/text-intelligence
  • https://developers.deepgram.com/docs/text-sentiment-analysis

Gotchas

  • Token auth, not Bearer.
  • English-only for sentiment / summarize / topics / intents today.
  • summarize on /v1/read is boolean only. Pass True or False. Do not pass "v2" on /v1/read — that's a Listen-only option (see deepgram-python-audio-intelligence). The SDK type Union[Literal["v2"], Any] is shared with Listen and wider than Read actually accepts; the analyze docstring clarifies: "For Read API, accepts boolean only." The generated wire test passing summarize="v2" against a mock server is a Fern artifact and does not indicate real /v1/read support.
  • language is required for the gated analytics features above.
  • Body is JSON request=, not query parameters. Don't confuse with /v1/listen which takes audio as the body.
  • Custom topics/intents need a mode (custom_topic_mode="extended", "strict") or they are ignored.

Example files in this repo

  • examples/40-text-intelligence.py
  • tests/wire/test_read_v1_text.py

Central product skills

For cross-language Deepgram product knowledge — the consolidated API reference, documentation finder, focused runnable recipes, third-party integration examples, and MCP setup — install the central skills:

npx skills add deepgram/skills

This SDK ships language-idiomatic code skills; deepgram/skills ships cross-language product knowledge (see api, docs, recipes, examples, starters, setup-mcp).

Other skills for the same job

different authors, same section of the catalogue
MCP Builder
by anthropics
vendor ×13

Guide for creating high-quality MCP (Model Context Protocol) servers that enable LLMs to interact with external services through well-designed tools. Use when building MCP servers to integrate external APIs or services, whether in Python (FastMCP) or Node/TypeScript (MCP SDK).

30k tokens scripts
Changelog Generator
by frostant
×9

Automatically creates user-facing changelogs from git commits by analyzing commit history, categorizing changes, and transforming technical commits into clear, customer-friendly release notes. Turns hours of manual changelog writing into minutes of automated generation.

774 tokens
Finishing A Development Branch
by ZhanlinCui
×7

Use when implementation is complete, all tests pass, and you need to decide how to integrate the work - guides completion of development work by presenting structured options for merge, PR, or cleanup

1k tokens
MCP Builder
by JayZeeDesign
×7

Guide for creating high-quality MCP (Model Context Protocol) servers that enable LLMs to interact with external services through well-designed tools. Use when building MCP servers to integrate external APIs or services, whether in Python (FastMCP) or Node/TypeScript (MCP SDK).

37k tokens scripts
Vercel React Native Skills
by vercel-labs
vendor ×6

React Native and Expo best practices for building performant mobile apps. Use when building React Native components, optimizing list performance, implementing animations, or working with native modules. Triggers on tasks involving React Native, Expo, mobile performance, or native platform APIs.

39k tokens
Vercel React Best Practices
by ratacat
×5

React and Next.js performance optimization guidelines from Vercel Engineering. This skill should be used when writing, reviewing, or refactoring React/Next.js code to ensure optimal performance patterns. Triggers on tasks involving React components, Next.js pages, data fetching, bundle optimization, or performance improvements.

34k tokens
Next Best Practices
by vercel-labs
vendor ×4

Next.js best practices - file conventions, RSC boundaries, data patterns, async APIs, metadata, error handling, route handlers, image/font optimization, bundling

20k tokens
Using Git Worktrees
by ZhanlinCui
×4

Use when starting feature work that needs isolation from current workspace or before executing implementation plans - creates isolated git worktrees with smart directory selection and safety verification

1k tokens

How to use it

Copy the folder

Take deepgram/deepgram-python-text-intelligence from the repository into ~/.claude/skills for personal use, or into .claude/skills inside a project.

Check the name does not clash

The agent identifies a skill by the name field in its header. Two skills with the same name cannot sit side by side — one of them will be ignored.

Install what it needs

The instructions reference npx. Without those the skill loads but fails at the first command.