Agent frameworks

Building your own agent? Every example connects to Hyperdex over Streamable HTTP and reads your key from the HYPERDEX_API_KEY environment variable, so the key never sits in your code.

Endpointhttps://hyperdex.hypervect.com/mcp
TransportStreamable HTTP (MCP 2026-07-28; 2025-era clients also work)
AuthenticationHeader Authorization: Bearer hdx_…

Whatever you build with, give your agent the Hyperdex instructions as part of its system prompt so it logs, looks up and asks for approval the right way.

Vercel AI SDK

ai 7 with @ai-sdk/mcp (Node.js 22 or later).

import { createMCPClient } from "@ai-sdk/mcp";
import { generateText, isStepCount } from "ai";

const hyperdex = await createMCPClient({
  transport: {
    type: "http",
    url: "https://hyperdex.hypervect.com/mcp",
    headers: { Authorization: `Bearer ${process.env.HYPERDEX_API_KEY}` },
  },
});
try {
  const { text } = await generateText({
    model: "anthropic/claude-sonnet-5.5",
    tools: await hyperdex.tools(),
    stopWhen: isStepCount(10),
    prompt: "Which deals have gone quiet?",
  });
  console.log(text);
} finally {
  await hyperdex.close();
}

LangChain and LangGraph

Python langchain-mcp-adapters, or JavaScript @langchain/mcp-adapters version 2.

import os, asyncio
from langchain_mcp_adapters.client import MultiServerMCPClient
from langchain.agents import create_agent

async def main():
    client = MultiServerMCPClient({
        "hyperdex": {
            "transport": "streamable_http",
            "url": "https://hyperdex.hypervect.com/mcp",
            "headers": {"Authorization": f"Bearer {os.environ['HYPERDEX_API_KEY']}"},
        }
    })
    agent = create_agent("openai:gpt-4.1", await client.get_tools())  # your model
    print(await agent.ainvoke({"messages": "List my open tasks"}))

asyncio.run(main())

CrewAI

Give an agent Hyperdex through its built-in mcps field.

import os
from crewai import Agent
from crewai.mcp import MCPServerHTTP

crm_agent = Agent(
    role="CRM operator",
    goal="Keep our customer records accurate and up to date",
    backstory="Works the Hyperdex task queue for the sales team",
    mcps=[MCPServerHTTP(
        url="https://hyperdex.hypervect.com/mcp",
        headers={"Authorization": f"Bearer {os.environ['HYPERDEX_API_KEY']}"},
    )],
)

Mastra

@mastra/mcp with @mastra/core 1.76 or later. Tool names come back prefixed, such as hyperdex_search.

import { MCPClient } from "@mastra/mcp";
import { Agent } from "@mastra/core/agent";

const mcp = new MCPClient({
  servers: {
    hyperdex: {
      url: new URL("https://hyperdex.hypervect.com/mcp"),
      requestInit: { headers: { Authorization: `Bearer ${process.env.HYPERDEX_API_KEY}` } },
    },
  },
});

export const crmAgent = new Agent({
  id: "crm-agent",
  name: "CRM Agent",
  instructions: "Use Hyperdex as your memory of every customer.",
  model: "openai/gpt-5.6-sol",
  tools: await mcp.listTools(),
});

LlamaIndex

llama-index-tools-mcp.

import os, asyncio
from llama_index.tools.mcp import BasicMCPClient, McpToolSpec
from llama_index.core.agent.workflow import FunctionAgent
from llama_index.llms.openai import OpenAI

async def main():
    client = BasicMCPClient("https://hyperdex.hypervect.com/mcp", headers={"Authorization": f"Bearer {os.environ['HYPERDEX_API_KEY']}"})
    tools = await McpToolSpec(client=client).to_tool_list_async()
    agent = FunctionAgent(name="crm", description="CRM agent", tools=tools,
                          llm=OpenAI(model="gpt-4o"),  # your model
                          system_prompt="Use Hyperdex as your memory of every customer.")
    print(await agent.run("List my open tasks"))

asyncio.run(main())

Pydantic AI

Version 2 uses MCPToolset (the older MCPServerStreamableHTTP was removed). Install pydantic-ai-slim[mcp].

import os
from pydantic_ai import Agent
from pydantic_ai.mcp import MCPToolset

hyperdex = MCPToolset("https://hyperdex.hypervect.com/mcp", headers={"Authorization": f"Bearer {os.environ['HYPERDEX_API_KEY']}"})
agent = Agent("openai:gpt-5", toolsets=[hyperdex])  # your model

print(agent.run_sync("List my open tasks").output)

Google Agent Development Kit

google-adk[mcp]. The default timeout is five seconds; raise it with timeout= for long searches.

import os
from google.adk.agents import LlmAgent
from google.adk.tools.mcp_tool import McpToolset
from google.adk.tools.mcp_tool.mcp_session_manager import StreamableHTTPConnectionParams

root_agent = LlmAgent(
    model="gemini-flash-latest",
    name="crm_agent",
    instruction="Use Hyperdex as your memory of every customer.",
    tools=[McpToolset(connection_params=StreamableHTTPConnectionParams(
        url="https://hyperdex.hypervect.com/mcp",
        headers={"Authorization": f"Bearer {os.environ['HYPERDEX_API_KEY']}"},
    ))],
)

Microsoft Agent Framework

Python agent-framework uses static_headers; .NET uses the official C# MCP SDK.

import os, asyncio
from agent_framework import Agent, MCPStreamableHTTPTool
from agent_framework.openai import OpenAIChatClient

async def main():
    async with (
        MCPStreamableHTTPTool(
            name="hyperdex",
            url="https://hyperdex.hypervect.com/mcp",
            static_headers={"Authorization": f"Bearer {os.environ['HYPERDEX_API_KEY']}"},
        ) as hyperdex,
        Agent(client=OpenAIChatClient(), name="CRMAgent",
              instructions="Use Hyperdex as your memory of every customer.") as agent,
    ):
        print(await agent.run("List my open tasks", tools=hyperdex))

asyncio.run(main())

AWS Strands Agents

strands-agents.

import os
from strands import Agent
from strands.tools.mcp import MCPClient

hyperdex = MCPClient(url="https://hyperdex.hypervect.com/mcp", headers={"Authorization": f"Bearer {os.environ['HYPERDEX_API_KEY']}"})
with hyperdex:
    agent = Agent(tools=hyperdex.list_tools_sync())
    agent("List my open tasks")

OpenAI Agents SDK

Connect Hyperdex as a Streamable HTTP MCP server and hand it to your agent.

import os
from agents import Agent, Runner
from agents.mcp import MCPServerStreamableHttp

async with MCPServerStreamableHttp(
    name="hyperdex",
    params={"url": "https://hyperdex.hypervect.com/mcp", "headers": {"Authorization": f"Bearer {os.environ['HYPERDEX_API_KEY']}"}},
) as hyperdex:
    agent = Agent(name="Sales assistant", mcp_servers=[hyperdex])
    result = await Runner.run(agent, "Which deals have gone quiet?")
    print(result.final_output)

Official MCP SDKs

Version 2 of the TypeScript and Python SDKs, for full control over the connection.

import { Client, StreamableHTTPClientTransport } from "@modelcontextprotocol/client";

const client = new Client({ name: "my-agent", version: "1.0.0" });
await client.connect(
  new StreamableHTTPClientTransport(new URL("https://hyperdex.hypervect.com/mcp"), {
    requestInit: { headers: { Authorization: `Bearer ${process.env.HYPERDEX_API_KEY}` } },
  }),
);
const result = await client.callTool({ name: "search", arguments: { query: "acme" } });
await client.close();

OpenAI, Anthropic and xAI APIs

These APIs can call Hyperdex for you from their own servers, with no MCP client in your code. See OpenAI, Anthropic and xAI Grok.

Checked against each vendor’s own documentation in October 2026. Products change quickly; if a step no longer matches, write to transform@hypervect.com and we will update it.