chat-agent-toolkit 1.2.24 → 1.2.26
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.
- package/README.md +45 -89
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -1,79 +1,13 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
1
|
+

|
|
3
2
|
|
|
4
3
|
Multi-provider AI agent toolkit for generating language responses, searching the web, extracting page content, and managing long-term memory across 10+ LLM providers.
|
|
5
4
|
|
|
6
5
|
Built on top of the [Vercel AI SDK](https://sdk.vercel.ai), with a small registry of pre-tuned agent prompts (research, summarization, citation answering, query resolution, knowledge-graph extraction, etc.) and tool wrappers around the [QwkSearch](https://qwksearch.com) API.
|
|
7
6
|
|
|
8
|
-
## Language Intelligence Providers
|
|
9
|
-
|
|
10
|
-
| Provider | 🌍 | Top Model (Others) | 🏆 Benchmarks | 📄 Docs | 🔑 Keys | 💰 Funding |
|
|
11
|
-
| ---------------------- | --- | --------------------------------------------- | --------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------- | ------------ |
|
|
12
|
-
| **Anthropic** | 🇺🇸 | Claude Mythos / Opus (Sonnet, Haiku) | 🥇 GPQA Diamond 94.6% · 🥇 SWE-bench 93.9% · 🧬 PhD reasoning | [Docs](https://docs.anthropic.com/en/docs/welcome) | [Keys](https://console.anthropic.com/settings/keys) | ~$60B |
|
|
13
|
-
| **OpenAI** | 🇺🇸 | GPT / o3 / Codex (o1, o4, o4-mini, gpt-4o) | 🥇 AIME 2025 100% · 🥇 SWE-bench Pro · 📚 MMLU-Pro 90% | [Docs](https://platform.openai.com/docs/overview) | [Keys](https://platform.openai.com/api-keys) | ~$180B |
|
|
14
|
-
| **Google** | 🇺🇸 | Gemini Pro (Flash, Flash-Lite, Gemma) | 🥇 GPQA 94.1% · 🥇 LiveCodeBench Elo 2439 · 🌐 #1 in 6/13 Vals | [Docs](https://cloud.google.com/vertex-ai/generative-ai/docs/learn/models) | [Keys](https://cloud.google.com/vertex-ai/generative-ai/docs/start/express-mode/overview#api-keys) | Public |
|
|
15
|
-
| **xAI** | 🇺🇸 | Grok Heavy (Grok-3, Grok Vision) | 🥇 AIME 2025 100% · 🧮 Math competition · ⚡ X integration | [Docs](https://docs.x.ai/docs#models) | [Keys](https://console.x.ai/) | ~$45B |
|
|
16
|
-
| **Meta** | 🇺🇸 | Llama Maverick / Scout (Llama 3.x, CodeLlama) | 🥇 DocVQA 94.4% · 🥇 10M token context · 📊 ChartQA 90% | [Docs](https://www.llama.com/docs/overview/) | [Keys](https://www.llama.com/llama-downloads/) | Public |
|
|
17
|
-
| **NVIDIA** | 🇺🇸 | Nemotron-Cascade (Llama Nemotron, Kimi) | 🥇 LCB v6 87.2% · 🏅 IMO+IOI+ICPC gold · 🧮 AIME 98.6% | [Docs](https://docs.api.nvidia.com/nim/reference/llm-apis) | [Keys](https://build.nvidia.com/settings/api-keys) | Public |
|
|
18
|
-
| **Perplexity** | 🇺🇸 | Sonar Reasoning Pro (Sonar Deep Research) | 🥇 Search Arena · 🔍 #1 web-grounded QA · 🌐 Real-time retrieval | [Docs](https://docs.perplexity.ai/models/model-cards) | [Keys](https://www.perplexity.ai/account/api/keys) | ~$1B |
|
|
19
|
-
| **Groq** | 🇺🇸 | (Llama, DeepSeek, Gemma, Mistral, Qwen) | ⚡ #1 inference speed · 🏎️ Fastest TTFT · 🔧 LPU hardware | [Docs](https://console.groq.com/docs/overview) | [Keys](https://console.groq.com/keys) | ~$640M |
|
|
20
|
-
| **Mistral** | 🇫🇷 | Mistral Large (Small 4, Codestral, Devstral) | 🥈 Arena Elo 1418 · 🌍 Multilingual MMLU 85.5% · 🚀 Fastest TTFT | [Docs](https://docs.mistral.ai/) | [Keys](https://console.mistral.ai/api-keys/) | ~$3.1B |
|
|
21
|
-
| **Together** | 🇺🇸 | (Llama, Mistral, Gemma, Qwen, DeepSeek) | 🏗️ Widest open hosting · 💸 Best open-source pricing · 🔧 Fine-tuning | [Docs](https://docs.together.ai/docs/quickstart) | [Keys](https://api.together.xyz/settings/api-keys) | ~$225M |
|
|
22
|
-
| **Moonshot** | 🇨🇳 | Kimi Reasoning (K2.6, K2) | 🥇 AIME open 96.1% · 🥇 MATH-500 98% · 🥇 HumanEval 99% | [Docs](https://platform.moonshot.cn/docs) | [Keys](https://platform.moonshot.cn/console/api-keys) | ~$3.9B |
|
|
23
|
-
| **Zhipu** | 🇨🇳 | GLM Reasoning / GLM-4.7 (GLM-4V, CogView) | 🥇 Chatbot Arena Elo 1451 · 🥇 MMLU 96% · 🧮 AIME 95.7% | [Docs](https://bigmodel.cn/dev/api) | [Keys](https://bigmodel.cn/usercenter/apikeys) | ~$1.8B |
|
|
24
|
-
| **Alibaba** | 🇨🇳 | Qwen-Coder / Qwen (Qwen-VL, Qwen-Audio) | 🥇 Codeforces Elo 2056 · 💻 SWE-bench 69.6% · 🏎️ LCB 70.7% | [Docs](https://www.alibabacloud.com/help/en/model-studio/developer-reference/use-qwen-by-calling-api) | [Keys](https://bailian.console.aliyun.com/?apiKey=1) | Public |
|
|
25
|
-
| **DeepSeek** | 🇨🇳 | DeepSeek (DeepSeek-Coder, DeepSeek-VL) | 🥇 IMO gold (open) · 📚 MMLU-Pro 81.2 · 🧮 AIME 87.5% | [Docs](https://api-docs.deepseek.com/) | [Keys](https://platform.deepseek.com/api_keys) | Bootstrapped |
|
|
26
|
-
| **Cloudflare** | 🇺🇸 | (Llama, Mistral, Gemma, Qwen, DeepSeek) | 🌐 Edge inference · ⚡ Serverless CDN scale · 🔒 Privacy-first | [Docs](https://developers.cloudflare.com/workers-ai/) | [Keys](https://dash.cloudflare.com/profile/api-tokens) | Public |
|
|
27
|
-
| **Ollama** | 🇺🇸 | (Llama, Mistral, Gemma, Qwen, DeepSeek) | 🖥️ #1 local inference · 🔒 Fully offline · 🆓 Free self-hosted | [Docs](https://ollama.com/docs) | [Keys](https://ollama.com/settings/keys) | ~$20M |
|
|
28
|
-
|
|
29
|
-
## Amazon Bedrock Provider
|
|
30
|
-
|
|
31
|
-
Use Vercel AI SDK's official Bedrock provider: install `@ai-sdk/amazon-bedrock`, configure AWS auth, then call `bedrock('model-id')` in `generateText` or `streamText`. [ai-sdk](https://ai-sdk.dev/providers/ai-sdk-providers/amazon-bedrock)
|
|
32
|
-
|
|
33
|
-
### Install
|
|
34
|
-
|
|
35
|
-
- Run `pnpm add ai @ai-sdk/amazon-bedrock` or the npm/yarn equivalent. [vercel](https://vercel.com/changelog/amazon-bedrock-provider-for-the-vercel-ai-sdk-now-available)
|
|
36
|
-
- Import either `bedrock` directly or `createAmazonBedrock` for custom config. [ai-sdk](https://ai-sdk.dev/providers/ai-sdk-providers/amazon-bedrock)
|
|
37
|
-
|
|
38
|
-
### Env setup
|
|
39
|
-
|
|
40
|
-
- Simplest path: set `AWS_BEARER_TOKEN_BEDROCK` with a Bedrock API key; the docs say API key auth is the recommended method. [ai-sdk](https://ai-sdk.dev/providers/ai-sdk-providers/amazon-bedrock)
|
|
41
|
-
- SigV4 also works with `AWS_ACCESS_KEY_ID`, `AWS_SECRET_ACCESS_KEY`, and `AWS_REGION`, and the provider can also use the AWS credential chain. [ai-sdk](https://ai-sdk.dev/providers/ai-sdk-providers/amazon-bedrock)
|
|
42
|
-
|
|
43
|
-
### Minimal example
|
|
44
|
-
|
|
45
|
-
```ts
|
|
46
|
-
import { generateText } from 'ai';
|
|
47
|
-
import { bedrock } from '@ai-sdk/amazon-bedrock';
|
|
48
|
-
|
|
49
|
-
const { text } = await generateText({
|
|
50
|
-
model: bedrock('anthropic.claude-3-haiku-20240307-v1:0'),
|
|
51
|
-
prompt: 'Explain Bedrock in one sentence.',
|
|
52
|
-
});
|
|
53
|
-
|
|
54
|
-
console.log(text);
|
|
55
|
-
```
|
|
56
|
-
|
|
57
|
-
### Custom region
|
|
58
|
-
|
|
59
|
-
```ts
|
|
60
|
-
import { createAmazonBedrock } from '@ai-sdk/amazon-bedrock';
|
|
61
|
-
|
|
62
|
-
export const amazonBedrock = createAmazonBedrock({
|
|
63
|
-
region: 'us-east-1',
|
|
64
|
-
apiKey: process.env.AWS_BEARER_TOKEN_BEDROCK,
|
|
65
|
-
});
|
|
66
|
-
```
|
|
67
|
-
|
|
68
|
-
### Notes
|
|
69
|
-
|
|
70
|
-
- You must enable model access in the AWS Bedrock console first; access is not granted by default. [ai-sdk](https://ai-sdk.dev/providers/ai-sdk-providers/amazon-bedrock)
|
|
71
|
-
- `streamText` is supported too, and Bedrock-specific options like guardrails can be passed via `providerOptions.bedrock`. [ai-sdk](https://ai-sdk.dev/providers/ai-sdk-providers/amazon-bedrock)
|
|
72
|
-
|
|
73
7
|
## Install
|
|
74
8
|
|
|
75
9
|
```bash
|
|
76
|
-
npm
|
|
10
|
+
npm i chat-agent-toolkit
|
|
77
11
|
```
|
|
78
12
|
|
|
79
13
|
## Quick start
|
|
@@ -93,22 +27,6 @@ console.log(response.content);
|
|
|
93
27
|
|
|
94
28
|
`response.content` is HTML by default (set `html: false` for raw Markdown). Agents that define an `after` hook also return parsed data on `response.extract`.
|
|
95
29
|
|
|
96
|
-
### Using Amazon Bedrock
|
|
97
|
-
|
|
98
|
-
```ts
|
|
99
|
-
import { writeLanguageResponse } from "ai-research-agent";
|
|
100
|
-
|
|
101
|
-
const response = await writeLanguageResponse({
|
|
102
|
-
provider: "amazon",
|
|
103
|
-
apiKey: process.env.AWS_BEARER_TOKEN_BEDROCK, // or "region:accessKeyId:secretAccessKey"
|
|
104
|
-
model: "anthropic.claude-3-5-sonnet-20241022-v2:0",
|
|
105
|
-
agent: "question",
|
|
106
|
-
query: "Explain transformer attention in two sentences.",
|
|
107
|
-
});
|
|
108
|
-
|
|
109
|
-
console.log(response.content);
|
|
110
|
-
```
|
|
111
|
-
|
|
112
30
|
## Supported providers
|
|
113
31
|
|
|
114
32
|
| Provider | ID | Default model | Notes |
|
|
@@ -119,7 +37,7 @@ console.log(response.content);
|
|
|
119
37
|
| Google Vertex | `google` | Gemini 2.x | |
|
|
120
38
|
| XAI | `xai` | `grok-beta` | |
|
|
121
39
|
| Amazon Bedrock | `amazon` | `anthropic.claude-3-5-sonnet-20241022-v2:0` | apiKey = bearer token or `region:key:secret` |
|
|
122
|
-
| Cloudflare | `cloudflare` | `llama-4-scout-17b-16e-instruct` | apiKey
|
|
40
|
+
| Cloudflare | `cloudflare` | `llama-4-scout-17b-16e-instruct` | apiKey = `token:accountId` |
|
|
123
41
|
| Together AI | `togetherai` | `meta-llama/Meta-Llama-3.1-8B-Instruct-Turbo` | |
|
|
124
42
|
| Perplexity | `perplexity` | `sonar` | |
|
|
125
43
|
| NVIDIA NIM | `nvidia` | `moonshotai/kimi-k2.5` | |
|
|
@@ -127,6 +45,27 @@ console.log(response.content);
|
|
|
127
45
|
|
|
128
46
|
The full registry (including context lengths) is exported as `LANGUAGE_MODELS`.
|
|
129
47
|
|
|
48
|
+
### Amazon Bedrock setup
|
|
49
|
+
|
|
50
|
+
Install the provider: `pnpm add ai @ai-sdk/amazon-bedrock`
|
|
51
|
+
|
|
52
|
+
**Auth options** — set one of:
|
|
53
|
+
- `AWS_BEARER_TOKEN_BEDROCK` (recommended API key auth)
|
|
54
|
+
- `AWS_ACCESS_KEY_ID` + `AWS_SECRET_ACCESS_KEY` + `AWS_REGION` (SigV4)
|
|
55
|
+
|
|
56
|
+
**Custom region:**
|
|
57
|
+
|
|
58
|
+
```ts
|
|
59
|
+
import { createAmazonBedrock } from '@ai-sdk/amazon-bedrock';
|
|
60
|
+
|
|
61
|
+
export const amazonBedrock = createAmazonBedrock({
|
|
62
|
+
region: 'us-east-1',
|
|
63
|
+
apiKey: process.env.AWS_BEARER_TOKEN_BEDROCK,
|
|
64
|
+
});
|
|
65
|
+
```
|
|
66
|
+
|
|
67
|
+
> You must enable model access in the AWS Bedrock console before use; access is not granted by default.
|
|
68
|
+
|
|
130
69
|
## Built-in agents
|
|
131
70
|
|
|
132
71
|
The `agent` option selects a prompt template from [`AGENT_PROMPTS`](src/agents/agent-prompts.ts):
|
|
@@ -142,7 +81,7 @@ The `agent` option selects a prompt template from [`AGENT_PROMPTS`](src/agents/a
|
|
|
142
81
|
- `knowledge-graph-nodes` — builds a temporal knowledge graph from a document.
|
|
143
82
|
- `results-relevance-filter` — picks the most relevant URLs from a search result list.
|
|
144
83
|
|
|
145
|
-
Templates use `{variableName}` placeholders
|
|
84
|
+
Templates use `{variableName}` placeholders filled from the options object (`query`, `article`, `chat_history`, `context`, etc.).
|
|
146
85
|
|
|
147
86
|
## Agent tools
|
|
148
87
|
|
|
@@ -200,17 +139,34 @@ Vite bundles ES + CJS targets to `dist/`, emits `.d.ts` files alongside, and app
|
|
|
200
139
|
|
|
201
140
|
## Resources
|
|
202
141
|
|
|
203
|
-
### Documentation & Guides
|
|
204
142
|
- [Vercel AI SDK generateText docs](https://sdk.vercel.ai/docs/reference/ai-sdk-core/generate-text)
|
|
205
143
|
- [Hugging Face tutorials](https://huggingface.co/learn)
|
|
206
144
|
- [Illustrated Transformer](https://jalammar.github.io/illustrated-transformer/)
|
|
207
145
|
- [Building a Transformer with PyTorch](https://www.datacamp.com/tutorial/building-a-transformer-with-py-torch)
|
|
208
146
|
- [LLM training example](https://github.com/vtempest/ai-research-agent/blob/master/packages/neural-net/src/train/predict-next-word.js)
|
|
209
147
|
|
|
210
|
-
|
|
148
|
+
<img src="https://i.imgur.com/uW6E9VJ.gif" alt="Transformer architecture visualization" />
|
|
211
149
|
|
|
212
|
-
|
|
150
|
+
## Language Intelligence Providers
|
|
213
151
|
|
|
152
|
+
| Provider | 🌍 | Top Model (Others) | 🏆 Benchmarks | 📄 Docs | 🔑 Keys | 💰 Funding |
|
|
153
|
+
| ---------------------- | --- | --------------------------------------------- | --------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------- | ------------ |
|
|
154
|
+
| **Anthropic** | 🇺🇸 | Claude Mythos / Opus (Sonnet, Haiku) | 🥇 GPQA Diamond 94.6% · 🥇 SWE-bench 93.9% · 🧬 PhD reasoning | [Docs](https://docs.anthropic.com/en/docs/welcome) | [Keys](https://console.anthropic.com/settings/keys) | ~$60B |
|
|
155
|
+
| **OpenAI** | 🇺🇸 | GPT / o3 / Codex (o1, o4, o4-mini, gpt-4o) | 🥇 AIME 2025 100% · 🥇 SWE-bench Pro · 📚 MMLU-Pro 90% | [Docs](https://platform.openai.com/docs/overview) | [Keys](https://platform.openai.com/api-keys) | ~$180B |
|
|
156
|
+
| **Google** | 🇺🇸 | Gemini Pro (Flash, Flash-Lite, Gemma) | 🥇 GPQA 94.1% · 🥇 LiveCodeBench Elo 2439 · 🌐 #1 in 6/13 Vals | [Docs](https://cloud.google.com/vertex-ai/generative-ai/docs/learn/models) | [Keys](https://cloud.google.com/vertex-ai/generative-ai/docs/start/express-mode/overview#api-keys) | Public |
|
|
157
|
+
| **xAI** | 🇺🇸 | Grok Heavy (Grok-3, Grok Vision) | 🥇 AIME 2025 100% · 🧮 Math competition · ⚡ X integration | [Docs](https://docs.x.ai/docs#models) | [Keys](https://console.x.ai/) | ~$45B |
|
|
158
|
+
| **Meta** | 🇺🇸 | Llama Maverick / Scout (Llama 3.x, CodeLlama) | 🥇 DocVQA 94.4% · 🥇 10M token context · 📊 ChartQA 90% | [Docs](https://www.llama.com/docs/overview/) | [Keys](https://www.llama.com/llama-downloads/) | Public |
|
|
159
|
+
| **NVIDIA** | 🇺🇸 | Nemotron-Cascade (Llama Nemotron, Kimi) | 🥇 LCB v6 87.2% · 🏅 IMO+IOI+ICPC gold · 🧮 AIME 98.6% | [Docs](https://docs.api.nvidia.com/nim/reference/llm-apis) | [Keys](https://build.nvidia.com/settings/api-keys) | Public |
|
|
160
|
+
| **Perplexity** | 🇺🇸 | Sonar Reasoning Pro (Sonar Deep Research) | 🥇 Search Arena · 🔍 #1 web-grounded QA · 🌐 Real-time retrieval | [Docs](https://docs.perplexity.ai/models/model-cards) | [Keys](https://www.perplexity.ai/account/api/keys) | ~$1B |
|
|
161
|
+
| **Groq** | 🇺🇸 | (Llama, DeepSeek, Gemma, Mistral, Qwen) | ⚡ #1 inference speed · 🏎️ Fastest TTFT · 🔧 LPU hardware | [Docs](https://console.groq.com/docs/overview) | [Keys](https://console.groq.com/keys) | ~$640M |
|
|
162
|
+
| **Mistral** | 🇫🇷 | Mistral Large (Small 4, Codestral, Devstral) | 🥈 Arena Elo 1418 · 🌍 Multilingual MMLU 85.5% · 🚀 Fastest TTFT | [Docs](https://docs.mistral.ai/) | [Keys](https://console.mistral.ai/api-keys/) | ~$3.1B |
|
|
163
|
+
| **Together** | 🇺🇸 | (Llama, Mistral, Gemma, Qwen, DeepSeek) | 🏗️ Widest open hosting · 💸 Best open-source pricing · 🔧 Fine-tuning | [Docs](https://docs.together.ai/docs/quickstart) | [Keys](https://api.together.xyz/settings/api-keys) | ~$225M |
|
|
164
|
+
| **Moonshot** | 🇨🇳 | Kimi Reasoning (K2.6, K2) | 🥇 AIME open 96.1% · 🥇 MATH-500 98% · 🥇 HumanEval 99% | [Docs](https://platform.moonshot.cn/docs) | [Keys](https://platform.moonshot.cn/console/api-keys) | ~$3.9B |
|
|
165
|
+
| **Zhipu** | 🇨🇳 | GLM Reasoning / GLM-4.7 (GLM-4V, CogView) | 🥇 Chatbot Arena Elo 1451 · 🥇 MMLU 96% · 🧮 AIME 95.7% | [Docs](https://bigmodel.cn/dev/api) | [Keys](https://bigmodel.cn/usercenter/apikeys) | ~$1.8B |
|
|
166
|
+
| **Alibaba** | 🇨🇳 | Qwen-Coder / Qwen (Qwen-VL, Qwen-Audio) | 🥇 Codeforces Elo 2056 · 💻 SWE-bench 69.6% · 🏎️ LCB 70.7% | [Docs](https://www.alibabacloud.com/help/en/model-studio/developer-reference/use-qwen-by-calling-api) | [Keys](https://bailian.console.aliyun.com/?apiKey=1) | Public |
|
|
167
|
+
| **DeepSeek** | 🇨🇳 | DeepSeek (DeepSeek-Coder, DeepSeek-VL) | 🥇 IMO gold (open) · 📚 MMLU-Pro 81.2 · 🧮 AIME 87.5% | [Docs](https://api-docs.deepseek.com/) | [Keys](https://platform.deepseek.com/api_keys) | Bootstrapped |
|
|
168
|
+
| **Cloudflare** | 🇺🇸 | (Llama, Mistral, Gemma, Qwen, DeepSeek) | 🌐 Edge inference · ⚡ Serverless CDN scale · 🔒 Privacy-first | [Docs](https://developers.cloudflare.com/workers-ai/) | [Keys](https://dash.cloudflare.com/profile/api-tokens) | Public |
|
|
169
|
+
| **Ollama** | 🇺🇸 | (Llama, Mistral, Gemma, Qwen, DeepSeek) | 🖥️ #1 local inference · 🔒 Fully offline · 🆓 Free self-hosted | [Docs](https://ollama.com/docs) | [Keys](https://ollama.com/settings/keys) | ~$20M |
|
|
214
170
|
|
|
215
171
|
## Alternative Agents Frameworks
|
|
216
172
|
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "chat-agent-toolkit",
|
|
3
|
-
"version": "1.2.
|
|
3
|
+
"version": "1.2.26",
|
|
4
4
|
"description": "Multi-provider AI agent toolkit: generate language responses, search the web, extract content, and manage memory across 10+ LLM providers.",
|
|
5
5
|
"author": "vtempest <grokthiscontact@gmail.com>",
|
|
6
6
|
"license": "AGPL-3.0",
|