Interface guide for the Talon data engine covering AI, SQL, and storage operations.
Install
mkdir -p .claude/skills/talon && curl -L -o skill.zip "https://agentskills.codes/api/skills/download/12589" && unzip -o skill.zip -d .claude/skills/talon && rm skill.zipInstalls to .claude/skills/talon
Activation
This is the description your AI agent reads to decide when to run this skill — the better it matches your request, the more reliably it fires.
Talon 多模融合数据引擎使用指南。当用户需要使用 Talon 数据库进行开发时触发:包括 SQL 查询、KV 存储、向量搜索、时序数据、消息队列、全文检索、地理空间、图数据库、AI 引擎(Session/Context/Memory/RAG/Agent/Trace)。也适用于:选择 Talon 引擎模块、使用 Go/Python/Node.js/Java/.NET SDK、构建 RAG 管道、Agent 工具缓存、对话管理、embedding 缓存、跨引擎融合查询(GraphRAG、Hybrid Search)。Key capabilities
- →Perform SQL queries, JOINs, and aggregations.
- →Manage KV storage for caching and sessions.
- →Conduct vector similarity searches for RAG retrieval.
- →Handle AI session management and memory.
- →Track monitoring metrics and token usage with TimeSeries.
- →Execute hybrid searches combining FTS and Vector.
How it works
Talon provides a multi-modal data engine with nine integrated engines (SQL, KV, Vector, TimeSeries, MessageQueue, Full-Text Search, GEO, Graph, AI) accessible through a single binary.
Inputs & outputs
When to use talon
- →Implement SQL queries
- →Develop RAG pipelines
- →Use vector search
- →Manage agent sessions
About this skill
Talon 使用指南
Talon 是面向 AI 应用的多模融合数据引擎,单二进制、零外部依赖,提供 9 大引擎:SQL、KV、Vector、TimeSeries、MessageQueue、Full-Text Search、GEO、Graph、AI。
连接
use talon::Talon;
use talon_ai::TalonAiExt;
let db = Talon::open("./data")?; // 嵌入式模式,数据目录
多语言 SDK 均通过 FFI 绑定 libtalon,接口模式一致。详见 references/sdk.md。
引擎选择
| 场景 | 引擎 | 入口 |
|---|---|---|
| 结构化数据 CRUD、JOIN、聚合 | SQL | db.run_sql() |
| 缓存、会话 token、分布式锁 | KV | db.kv() / Redis 协议 |
| embedding 相似搜索、RAG 检索 | Vector | db.vector() / SQL vec_cosine() |
| 对话管理、Agent 状态、记忆 | AI | db.ai() |
| 监控指标、token 用量追踪 | TimeSeries | db.create_timeseries() |
| 异步任务、事件驱动 | MQ | db.mq() |
| 关键词搜索、BM25 排序 | FTS | db.fts() |
| LBS、附近推荐 | GEO | db.geo() |
| 知识图谱、关系推理 | Graph | db.graph() |
| RAG (BM25+向量) | Fusion | hybrid_search() |
| GraphRAG | Fusion | graph_vector_search() |
快速上手
SQL
db.run_sql("CREATE TABLE users (id INTEGER PRIMARY KEY, name TEXT, emb VECTOR(384))")?;
db.run_sql("INSERT INTO users VALUES (1, 'Alice', '[0.1, ...]')")?;
db.run_sql("SELECT id, vec_cosine(emb, '[0.1, ...]') AS score FROM users ORDER BY score LIMIT 10")?;
KV
db.kv()?.set(b"user:1", b"Alice", None)?; // 无 TTL
db.kv()?.set(b"session:x", b"tok", Some(3600))?; // 1h TTL
let val = db.kv_read()?.get(b"user:1")?;
Vector
db.run_sql("CREATE VECTOR INDEX idx ON docs(emb) USING HNSW WITH (metric='cosine')")?;
let ve = db.vector("idx")?;
let hits = ve.search(&query_vec, 10, "cosine")?; // (id, score)
AI (Session / Memory / RAG)
let ai = db.ai()?;
ai.create_session("chat-1", BTreeMap::new(), None)?;
ai.append_message("chat-1", &ContextMessage { role: "user".into(), content: "Hi".into(), token_count: Some(1) })?;
let history = ai.get_context_window("chat-1", 4096)?; // 自动截断到 token 预算
ai.store_memory("chat-1", "用户偏好 Rust", &embedding, None)?;
let mems = ai.search_memories("chat-1", &query_emb, 5)?;
跨引擎融合查询
// Hybrid Search: BM25 + Vector (RRF)
let hits = hybrid_search(&store, &HybridQuery {
fts_index: "articles", vec_index: "emb_idx",
query_text: "AI database", query_vec: &emb, limit: 10, ..Default::default()
})?;
// GraphRAG: 图遍历 + 向量相似
let hits = graph_vector_search(&store, &GraphVectorQuery {
graph: "knowledge", vec_name: "embeddings",
start: root_id, max_depth: 3, direction: Direction::Out,
query_vec: &emb, k: 10,
})?;
详细 API 参考
按需查阅对应 reference 文件:
- SQL 引擎 (DDL/DML/函数/窗口/CTE/事务): references/sql.md
- KV 引擎 (CRUD/TTL/计数器/扫描/快照): references/kv.md
- Vector 引擎 (HNSW/metadata filter/量化/recommend/discover): references/vector.md
- AI 引擎 (Session/Context/Memory/RAG/Agent/Trace/Intent): references/ai.md
- 其他引擎 (TS/MQ/FTS/GEO/Graph/Fusion): references/more-engines.md
- 多语言 SDK (Go/Python/Node.js/Java/.NET): references/sdk.md
AI 应用最佳实践
RAG 管道
用户问题 → Embedding → hybrid_search(FTS + Vector) → Top-K chunks → LLM Context → 回答
用 ai.store_document() 存储文档分块,ai.search_chunks() 向量检索,ai.search_chunks_hybrid() 混合检索。
Agent 工具缓存
ai.cache_tool_result("weather", &args_hash, result_bytes, Some(3600))?;
if let Some(cached) = ai.get_cached_tool_result("weather", &args_hash)? { return cached; }
对话管理
ai.set_system_prompt("chat-1", "你是一个 Rust 专家")?;
let (prompt, msgs) = ai.get_context_window_with_prompt("chat-1", 4096)?;
// prompt + msgs 直接送入 LLM API
Embedding 缓存
let hash = sha256(text);
if let Some(emb) = ai.get_cached_embedding(&hash)? { return emb; }
let emb = call_openai_embedding(text)?;
ai.cache_embedding(&hash, &emb)?;
执行追踪
ai.log_trace(&TraceRecord {
run_id: "run-1".into(), session_id: Some("chat-1".into()),
operation: "llm_call".into(), input: json!({"model": "gpt-4"}),
output: None, latency_ms: 230, token_usage: Some(150),
})?;
let report = ai.trace_performance_report(Some("chat-1"))?;
When not to use it
- →When a non-Talon database is required.
- →When only a single data model is needed and a multi-modal engine is overkill.
Limitations
- →The skill is specific to the Talon multi-modal data engine.
- →The skill's SDKs are available for Go, Python, Node.js, Java, and .NET.
How it compares
Talon integrates nine distinct data engines into a single binary with zero external dependencies, offering a unified API for diverse data operations, unlike using separate databases for each data model.
Compared to similar skills
talon side by side with the closest alternatives in the catalog.
| Skill | Installs | Updated | Safety | Difficulty |
|---|---|---|---|---|
| talon (this skill) | 0 | 5mo | No flags | Advanced |
| senior-backend | 0 | 4mo | Review | Advanced |
| similarity-search-patterns | 3 | 2mo | No flags | Advanced |
| ai-engineer | 7 | 4mo | No flags | Advanced |
Try saying
Example prompts that trigger this skill in your AI assistant.
You might also like
senior-backend
Cor-Incorporated
Guides backend system development with Node.js, Express, Go, Python, PostgreSQL, GraphQL, and REST APIs. Use when the user says: 'design an API', 'optimize database queries', 'implement authentication', 'set up backend', 'create API endpoint', 'database migration', 'fix N+1 query', 'add rate limitin
similarity-search-patterns
wshobson
Implement efficient similarity search with vector databases. Use when building semantic search, implementing nearest neighbor queries, or optimizing retrieval performance.
ai-engineer
sickn33
Build production-ready LLM applications, advanced RAG systems, and intelligent agents. Implements vector search, multimodal AI, agent orchestration, and enterprise AI integrations. Use PROACTIVELY for LLM features, chatbots, AI agents, or AI-powered applications.
llm-application-dev
skillcreatorai
Building applications with Large Language Models - prompt engineering, RAG patterns, and LLM integration. Use for AI-powered features, chatbots, or LLM-based automation.
agentdb-vector-search
ruvnet
Implement semantic vector search with AgentDB for intelligent document retrieval, similarity matching, and context-aware querying. Use when building RAG systems, semantic search engines, or intelligent knowledge bases.
langgraph-chat-google-genai
akhilgupta01
Using ChatGoogleGenerativeAI, a chat model wrapper from langchain for Google Gemini series, for various applications including file processing.