ask-chat-agent-toolkit

Orchestrates search handlers, Mastra agents, RAG pipelines, and memory storage for research agents.

74|11|Updated Jul 4, 2024
One-click install
npx skills add https://github.com/OpenSourceAGI/qwksearch-research-agent --skill ask-chat-agent-toolkit-opensourceagi
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: ask-chat-agent-toolkit
Source: https://github.com/OpenSourceAGI/qwksearch-research-agent/tree/main/skills/ask-chat-agent-toolkit
Command: npx skills add https://github.com/OpenSourceAGI/qwksearch-research-agent --skill ask-chat-agent-toolkit-opensourceagi

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve? Wiring together retrieval, generation, memory, and tool integrations for a research agent requires coordinating many moving parts across packages, and misconfigurations (wrong engine names, lost memory, shadowed exports) fail silently. This Skill guides you through the chat-agent-toolkit package so agents, search handlers, and persistence behave as intended. ## Core Features & Use Cases - Search-and-answer handlers: Configure webSearch, academicSearch, youtubeSearch, redditSearch, wolframAlphaSearch, and writingAssistant via createSearchHandlers with injectable retrieval functions. - Mastra agents, workflows, RAG, and evals: Build tool-using agents, multi-step research/RAG workflows, and score generations with factuality, relevance, coherence, and toxicity evals. - Memory and MCP tooling: Persist long-term memory with SimpleMemory, Drizzle, D1, or KV storage, and connect QwkSearch or third-party OAuth MCP tool sessions. - Use Case: You are adding a new tool to a research agent on Cloudflare Workers — use this Skill to declare the tool in the agent prompt, pick MastraD1MemoryStorage for persistence, and avoid the SearXNG engine-name pitfalls. ## Quick Start Ask the agent to wire up a cited search-and-answer handler using createSearchHandlers with your own searchWeb implementation and explain which storage backend fits your deployment.

Frequently Asked Questions about ask-chat-agent-toolkit

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I add a tool to a Mastra agent in chat-agent-toolkit?

Define the tool in src/tools/qwksearch-api-tools.ts using the Vercel AI SDK tool() shape, then list its name in the agent prompt's tools array. Tools are attached by being declared in the prompt template, not by passing them at the call site.

How do I persist agent memory across restarts?

Construct MemoryAgent with a persistent storage backend such as DrizzleMemoryStorage, MastraD1MemoryStorage, or MastraKVMemoryStorage. The default SimpleMemory is in-process only and loses everything on restart.

Why does my activeEngines filter match no search results?

The activeEngines values are SearXNG engine names with spaces, like "google scholar", not the search-web-api ALL_ENGINES keys with underscores. Also note wolframalpha exists only on the SearXNG side.

Why does my bundler fail on TypeScript from node_modules with this package?

The ./connectors and wildcard subpath exports resolve to raw src/*.ts files rather than built dist output. Either configure your bundler to transpile the package or import from the root entry, which ships compiled dist files.

Why does reranking drop all my retrieved documents?

The rerankThreshold is a cosine similarity cutoff; webSearch uses 0.3 while academicSearch uses 0. If everything is dropped, lower the threshold before assuming retrieval itself failed.