项目介绍
Agent 开发框架 · 2026-11-09 更新 · 本站尚未实测
Observatory 是 The Context Company 维护的 monorepo,用于 AI Agent 可观测性:通过 OpenTelemetry 等方式为 Agent 调用埋点,收集 trace、会话与工具调用信息,并提供本地优先的可视化覆盖层与远程 MCP 查询服务。仓库以 TypeScript 为主,同时包含 Python SDK。
需要区分三类内容:仓库中的埋点 SDK 与本地组件、厂商托管的云端数据服务、以及远程 MCP 服务器。三者获取方式、权限和费用边界不同,不能混为一谈。
核心能力
点击能力名称查看输入、输出和原文依据。
- TypeScript 集成包:包含 OpenTelemetry 集成(@contextcompany/otel)、本地可视化组件(@contextcompany/widget)、Claude Agent SDK 埋点、LangChain.js / LangGraph 集成、Mastra 集成、手动埋点 SDK、OpenClaw 的 OpenTelemetry 集成、Pi Agent SDK 埋点,以及共享 API 工具。
- Python SDK:内置 LangChain、CrewAI、Agno、LiteLLM 集成。
- 本地模式:基于 Vercel AI SDK + Next.js 的本地优先运行方式,README 声明其“100% open-source”且无需账号或 API Key;当前仅支持 Vercel AI SDK on Next.js。
- 远程 MCP 服务器:供编码 Agent 与开发工具直接查询生产 Agent 数据,工具包括 insight_search(自然语言检索 trace、会话与模式)、运行与会话的列表和详情查询、行为模式与主题列表,以及管理已跟踪模式、定时回顾、记忆和技能的配置工具。
实际应用场景
适用场景
- 已在 Next.js 中使用 Vercel AI SDK,希望本地可视化查看 Agent 调用链的开发者。
- 使用 Claude Agent SDK、LangChain、Mastra、CrewAI、Agno 等框架,需要统一埋点并接入可观测平台的团队。
- 希望让 Cursor、Claude Code 等 MCP 客户端直接检索生产环境 Agent 故障、工具调用异常并辅助筛选评测样本的团队。
安装与接入
本地模式(仅 Vercel AI SDK + Next.js)按 README 步骤:安装依赖
pnpm add @contextcompany/otel @vercel/otel @opentelemetry/api
随后在项目根目录(或 src 下)创建 instrumentation 文件并调用 registerOTelTCC({ local: true }),在根布局引入 widget 脚本,并为需要观测的 AI SDK 调用设置 experimental_telemetry: { isEnabled: true }(README 说明 AI SDK v5 中遥测为实验性)。具体代码请对照原文与官方文档。
远程 MCP 可通过支持 streamable HTTP 的 MCP 客户端接入地址 https://api.thecontext.company/mcp,认证方式为 OAuth 或以 API Key 作为 Bearer Token;该服务已在官方 MCP registry 登记为 io.github.The-Context-Company/context-company。详细认证与工具说明见官方 MCP 文档。
使用条件与限制
- 是否需要部署
- 需自行准备运行环境,具体要求见正文
- 是否需要注册
- 账号和认证要求见正文;未明确说明的项目仍待核验
- 是否需要 API Key
- 待核验
- 费用与额度
- 费用边界见正文,项目许可不代表模型或托管服务免费
- 所需权限
- 待核验
- 许可证与服务条款
- 待核验
权限费用与限制
- 本地模式无需账号或 API Key,但 README 说明默认会收集有限的匿名使用数据,可通过设置
TCC_DISABLE_ANONYMOUS_TELEMETRY为true关闭。 - 远程 MCP 与云端数据查询需要账号、OAuth 或 API Key,涉及生产数据访问权限。
- 各集成包与云服务的具体定价、配额、数据留存与隐私条款 README 未说明,需向官方核验。
- 本地模式目前仅支持 Vercel AI SDK + Next.js,其他框架需使用对应集成包并接入云端或其他方案,具体能力范围待核验。
国内使用情况
网友核验 用户经验分享
与站长实测独立,不代表官方认证或本站已实测。
最近核验:暂无有效核验。参与人数按当前项目有效身份去重;不同核验项分别统计,不合并成用户总结果。仅统计审核通过且未过期的记录。
分项统计、有效期与样本量
| 核验项目 | 有效人数 | 成功 / 部分 / 失败 / 无法判断 | 成功率 | 最近核验 / 有效期 |
|---|---|---|---|---|
| 官方网站访问 | 0 | 0 / 0 / 0 / 0 | 样本不足 | 暂无 / 7 天 |
| GitHub 仓库访问 | 0 | 0 / 0 / 0 / 0 | 样本不足 | 暂无 / 7 天 |
| 安装与运行 | 0 | 0 / 0 / 0 / 0 | 样本不足 | 暂无 / 30 天 |
| 官方服务国内连接 / MCP 连接 | 0 | 0 / 0 / 0 / 0 | 样本不足 | 暂无 / 30 天 |
| 国内网络情况 | 0 | 0 / 0 / 0 / 0 | 样本不足 | 暂无 / 7 天 |
| 国内模型兼容性 | 0 | 0 / 0 / 0 / 0 | 样本不足 | 暂无 / 30 天 |
| 自定义 API | 0 | 0 / 0 / 0 / 0 | 样本不足 | 暂无 / 30 天 |
| 海外服务依赖 | 0 | 0 / 0 / 0 / 0 | 样本不足 | 暂无 / 30 天 |
| 海外账号要求 | 0 | 0 / 0 / 0 / 0 | 样本不足 | 暂无 / 30 天 |
| 中文界面 | 0 | 0 / 0 / 0 / 0 | 样本不足 | 暂无 / 30 天 |
| 客户端兼容性 | 0 | 0 / 0 / 0 / 0 | 样本不足 | 暂无 / 30 天 |
| 账号及费用信息 | 0 | 0 / 0 / 0 / 0 | 样本不足 | 暂无 / 30 天 |
成功率 = 成功 ÷(成功 + 部分成功 + 失败);无法判断不计入分母。至少 5 份可判断结果才显示成功率。账号、费用、海外依赖与语言等事实项,成功表示核查结论与资料吻合,具体观察另行统计;不表示免费或没有海外依赖。不同网络、客户端和版本的结果不能直接等同。
最近有效核验
暂无审核通过且未过期的网友核验。欢迎提交真实使用记录。
查看全部有效核验 →国内实测状态:国内可用性待核验。协议兼容和官方资料说明不等于国内网络可用。
- 官方网站访问
- 尚未实测 待核验
- GitHub 仓库访问
- 尚未实测 待核验
- 官方服务国内连接
- 尚未实测 待核验
- 国内网络情况
- 尚未实测 待核验
- 国内模型兼容性
- 尚未实测 待核验
- 自定义 API
- 尚未实测 待核验
- 海外服务依赖
- 尚未实测 待核验
- 海外账号要求
- 尚未实测 待核验
- 中文界面
- 尚未实测 待核验
- 国内最后核验时间
- 尚未实测
许可与国内使用
仓库 LICENSE 文件为 MIT 许可证(Copyright (c) 2025 The Context Company),覆盖仓库内代码。这不等于云端托管服务免费或开源,也不代表第三方模型、MCP 托管服务同样免费。境外服务的可用性、延迟、数据出境合规与国内网络访问情况均未在资料中说明,需自行核验。
项目资料与来源
字段依据与待核验事项
access:来源确认 · pnpm add @contextcompany/otel @vercel/otel @opentelemetry/api
project_type:来源确认 · Observatory is a monorepo containing core packages for AI agent observability across TypeScript and Python
原始 README(折叠技术参考)
# <img src="./.github/assets/tcc-logo.svg" width="70" align="center" /> Observatory
[The Context Company](https://thecontextcompany.com/) does agent observability. **We care deeply about DX; it's our single biggest priority.**
Observatory is a monorepo containing core packages for AI agent observability across TypeScript and Python:
**TypeScript:**
- **[@contextcompany/otel](./packages/ts/otel)** - OpenTelemetry integration for instrumenting AI SDK calls
- **[@contextcompany/widget](./packages/ts/widget)** - Local-first UI overlay for visualizing AI agent traces in real-time
- **[@contextcompany/claude](./packages/ts/claude)** - Instrumentation for Claude Agent SDK
- **[@contextcompany/langchain](./packages/ts/langchain)** - Integration for LangChain.js and LangGraph
- **[@contextcompany/mastra](./packages/ts/mastra)** - Integration for the Mastra framework
- **[@contextcompany/custom](./packages/ts/custom)** - Manual instrumentation SDK for custom agents
- **[@contextcompany/openclaw](./packages/ts/openclaw)** - Integration for OpenClaw via OpenTelemetry
- **[@contextcompany/pi](./packages/ts/pi)** - Instrumentation for the Pi Agent SDK
- **[@contextcompany/api](./packages/ts/api)** - Shared API utilities (feedback, configuration)
**Python:**
- **[contextcompany](./packages/python)** - Python SDK with built-in integrations for LangChain, CrewAI, Agno, and LiteLLM
## MCP server
The Context Company ships a remote [MCP](https://modelcontextprotocol.io) server so coding agents and developer tools can query your production agent data directly — no dashboard round-trips. It is listed in the [official MCP registry](https://registry.modelcontextprotocol.io) as `io.github.The-Context-Company/context-company`.
```
https://api.thecontext.company/mcp
```
Ask questions like "what failed in production this week?", "which tool calls are creating bad outcomes?", or "which traces should become evals?" and get answers backed by the actual runs.
**Tools include:**
- `insight_search` - natural-language questions over your production traces, sessions, and patterns
- `get_agent_runs` / `get_agent_run` - list and inspect runs with full step and tool-call detail
- `get_agent_sessions` / `get_agent_session` - conversation-level views
- `list_agent_patterns` / `list_agent_topics` - recurring behavior patterns and auto-detected topics
- Config tools for managing tracked patterns, scheduled recaps, memories, and skills (OAuth)
**Connect from Cursor, Claude Code, or any MCP client** (transport is streamable HTTP; authenticate with OAuth or an API key as a bearer token):
```json
{
"mcpServers": {
"context-company": {
"url": "https://api.thecontext.company/mcp"
}
}
}
```
See the [MCP documentation](https://docs.thecontextcompany.com/access-data/mcp) for authentication details and the full tool reference.
## Local mode (AI SDK + Next.js)
Local mode allows you to run The Context Company in a local-first way. This is 100% open-source and requires **no account or API key**. To set up local mode, refer to the guide below or [our documentation](https://docs.thecontextcompany.com/frameworks/vercel-ai-sdk#local-mode).
**Local mode currently only supports Vercel AI SDK on Next.js**.
<img src="./.github/assets/local.gif" />
### Setup
#### Step 1: Install dependencies
```Title pnpm
pnpm add @contextcompany/otel @vercel/otel @opentelemetry/api
```
#### Step 2: Add instrumentation to Next.js
If you haven't already, add an `instrumentation.[js|ts]` file in the **root directory** of your project (or inside the `src` folder if you're using one). Call the `registerOTelTCC` function to instrument your AI SDK calls.
See the [Next.js Instrumentation guide](https://nextjs.org/docs/app/guides/instrumentation) for more information on instrumenting your Next.js application.
```typescript instrumentation.ts
// instrumentation.ts
export async function register() {
if (process.env.NEXT_RUNTIME === "nodejs") {
const { registerOTelTCC } = await import("@contextcompany/otel/nextjs");
registerOTelTCC({ local: true });
}
}
```
#### Step 3: Add widget to layout
Add the Local Mode widget to the root layout of your Next.js application.
```tsx app/layout.tsx
// app/layout.tsx
import Script from "next/script";
export default function RootLayout({
children,
}: {
children: React.ReactNode;
}) {
return (
<html lang="en">
<head>
{/* add The Context Company widget */}
<Script
crossOrigin="anonymous"
integrity="sha384-ryHylpN8vggwpf+rjl5Z7CGgpVWrEAXn6WTY/Kv2RhlixzrdTMCP3/DPS3RMtNCg"
src="https://unpkg.com/@contextcompany/widget@1.0.8/dist/auto.global.js"
/>
{/* other scripts */}
</head>
<body>{children}</body>
</html>
);
}
```
#### Step 4: Enable telemetry for AI SDK calls
As of AI SDK v5, telemetry is experimental and requires the `experimental_telemetry` flag to be set to `true`. Ensure you set this flag to `true` for all AI SDK calls you want to instrument.
```typescript generateText
// route.ts
import { generateText } from "ai";
const result = generateText({
// ...
experimental_telemetry: { isEnabled: true }, // required
});
```
> [!NOTE]
> By default, The Context Company collects limited anonymous usage data when running local mode. **No sensitive or personally identifiable information is ever collected**. You can view exactly which events and values are tracked [here](https://github.com/The-Context-Company/observatory/blob/main/packages/ts/otel/src/nextjs/telemetry/events.ts). To disable anonymous telemetry, set the `TCC_DISABLE_ANONYMOUS_TELEMETRY` environment variable to `true` in your Next.js project. Learn more about this in our [documentation](https://docs.thecontextcompany.com/frameworks/vercel-ai-sdk#local-mode).
## Examples
Check out the [examples/](./examples) directory for working demos across all supported frameworks:
| Example | Framework | Language |
| ----------------------------------------------- | ------------------------- | ---------- |
| [nextjs-widget](./examples/nextjs-widget) | AI SDK + Local Widget | TypeScript |
| [nextjs-aisdk](./examples/nextjs-aisdk) | AI SDK + Cloud Mode | TypeScript |
| [claude-agent-sdk](./examples/claude-agent-sdk) | Claude Agent SDK | TypeScript |
| [langchain-ts](./examples/langchain-ts) | LangChain / LangGraph | TypeScript |
| [mastra](./examples/mastra) | Mastra | TypeScript |
| [custom-ts](./examples/custom-ts) | Custom Instrumentation | TypeScript |
| [openclaw](./packages/ts/openclaw) | OpenClaw (OTLP Collector) | TypeScript |
| [pi](./packages/ts/pi) | Pi Agent SDK | TypeScript |
| [langchain](./examples/langchain) | LangChain | Python |
| [crewai](./examples/crewai) | CrewAI | Python |
| [agno](./examples/agno) | Agno | Python |
| [custom-python](./examples/custom-python) | Custom Instrumentation | Python |
### Contributing
- Looking to contribute? Check out our [contributing guide](./CONTRIBUTING.md) to get started.
### Acknowledgments
- Big thanks to [Anthony Hoang](https://github.com/anth0nycodes) and [Eric Zhang](https://github.com/Eric-Zhang-Developer) for being active contributors!
- Special thanks to [@RobPruzan](https://github.com/RobPruzan) for helping with the design of the tool and being an early adopter.
- [React Scan](https://react-scan.com/) has a phenomenal DX and Preact widget that we took inspiration from.
- The implementation behind the [Next.js Devtools](https://github.com/vercel/next.js/tree/canary/packages/next/src/next-devtools) overlay widget was insightful.
历史前置条件说明(补充参考)
Next.js + Vercel AI SDK(本地模式);Node.js 与 pnpm 用于安装依赖;Python 环境用于 Python SDK;远程 MCP 需支持 streamable HTTP 的客户端及账号、OAuth 或 API Key;云服务费用、配额与境外访问条件待核验。
项目来源与清单版权许可
https://github.com/The-Context-Company/observatory
整理来源:https://github.com/slavakurilyak/awesome-ai-agents
清单版权与许可:
MIT License
Copyright (c) 2024 Slava Kurilyak
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.