Skip to content

SynapCores / Recipe library

Agentic AI Recipes

Memory, RAG, semantic tool routing, knowledge graphs — every primitive an AI agent needs, in plain SQL on SynapCores.

36 recipes in this cluster. Each one is a self-contained Markdown file with the SQL or Cypher you can paste into SynapCores Community Edition and run.

36 of 36 recipes

agents
16 minutes
A Self-Improving Agent (learn from feedback)
advancedsql

Build an AI agent that learns from thumbs-up/down feedback — train a model on past interactions to predict whether a draft reply will satisfy the user, all in one SQL database. Works with Claude Code, OpenClaw, LangChain, or a voice agent.

ai-agentself-improvingfeedbackautoml
agents
15 minutes
Prove an AI Agent's Decision Was Never Altered (Clinical Decision Support)
intermediatesql

Run a deterioration-watch agent that can read the chart but never write to it, then keep a hash-chained, append-only record of every recommendation it made — the traceability a clinical safety review actually asks for.

ai-agentcreate-agentaudit-trailimmutable
agents
15 minutes
Prove an AI Agent's Decision Was Never Altered (Loan Underwriting)
intermediatesql

Give a loan-review agent a hard governance envelope, then hand a regulator a tamper-evident, hash-chained record of every decision it made — all in SQL, inside one database.

ai-agentcreate-agentaudit-trailimmutable
agents
12 minutes
Agentic DevOps Incident Triage
intermediateen

An incident-triage agent that correlates the alert with recent deploys, runbooks, and customer impact — producing a structured 'here's what I see / suspected cause / recommended action' in one SQL call.

ai-agentagent-rundevopssre
agents
12 minutes
Agentic FinServ Compliance Reviewer
intermediateen

A compliance-reviewer agent that walks the transaction table, consults KYC docs and regulations by meaning, surfaces hits with citations, and drafts an SAR-style write-up — all in SQL via AGENT_RUN.

ai-agentagent-runfinservcompliance
agents
12 minutes
Agentic Healthcare Clinical Q&A
intermediateen

A clinical-assistant agent that grounds answers in the patient's chart AND the relevant guideline — never just one or the other. Built on a single SQL session with AGENT_RUN.

ai-agentagent-runhealthcareclinical
agents
12 minutes
Agentic HR Employee Q&A
intermediateen

An HR-assistant agent that combines the employee's specific row (country, tenure, role band) with the right policy doc to answer correctly — not a generic RAG-only bot that hallucinates country-specific rules.

ai-agentagent-runhrpeople-ops
agents
12 minutes
Agentic Insurance Claims Triage
intermediateen

Stand up an in-database claims-adjuster agent that retrieves policy clauses by meaning, scans prior-claim history for fraud signals, and recommends an action — all in a single SQL session via AGENT_RUN.

ai-agentagent-runinsuranceclaims
agents
12 minutes
Agentic Legal — Contract Clause Review
intermediateen

A contract-reviewer agent that diffs an inbound MSA against your standard playbook AND your recent negotiated precedents — surfacing deviations with the closest prior deal as a reference.

ai-agentagent-runlegalcontracts
agents
12 minutes
Agentic Logistics — Shipment Exception
intermediateen

A shipment-exception agent that joins the late shipment with the customer's SLA tolerance and recalls similar past exceptions, then drafts both the customer notice and the carrier dispatch — in one SQL call.

ai-agentagent-runlogisticssupply-chain
agents
12 minutes
Agentic Retail Returns Triage
intermediateen

A returns-processing agent that reads the order, checks return-policy by meaning, scans for abuse patterns in prior returns, checks live inventory for swap availability, and recommends a specific action — all in SQL via AGENT_RUN.

ai-agentagent-runretailecommerce
agents
12 minutes
Agentic SaaS Support — Tier-1 Auto-Resolution
intermediateen

A tier-1 support agent that reads the customer's actual account state AND the help docs in one call, then either resolves the ticket or escalates with full context — not a RAG-only chatbot.

ai-agentagent-runsaassupport
agents
12 minutes
Agentic Sales Account Research
intermediateen

An account-research agent that pulls the CRM record, finds similar past wins by meaning, and outputs a one-page briefing before the sales call — all in SQL via AGENT_RUN.

ai-agentagent-runsalescrm
agents
22 minutes
Build a Customer-Support Agent on One Database
advancedsql

Build a complete AI customer-support agent on one database — semantic ticket memory, RAG over your help docs, intent routing, priority scoring, and a customer graph, no five-service stack. Works with Claude Code, OpenClaw, LangChain, or a voice agent.

ai-agentcustomer-supportragintent-routing
agents
20 minutes
Build a Personal Assistant Agent (memory + tools + RAG)
advancedsql

Build a personal AI assistant on one database — long-term memory of preferences, semantic tool routing, RAG over your notes, and grounded replies. No five-service stack. Works with Claude Code, OpenClaw, LangChain, or a voice agent.

ai-agentpersonal-assistantagent-memorytool-routing
agents
22 minutes
Build a Research / Knowledge Agent (RAG + KG)
advancedcypher

Build an AI research agent that reads documents, builds a knowledge graph, answers multi-hop questions with citations, and synthesizes a briefing — RAG plus a knowledge graph in one database. Works with Claude Code, OpenClaw, LangChain, or a voice agent.

ai-agentresearch-agentragknowledge-graph
agents
18 minutes
Build a Triage / Routing Agent
advancedsql

Build an AI triage agent that classifies every incoming request by meaning, scores its urgency with AutoML, and routes it to the right queue or human — all on one database. Works with Claude Code, OpenClaw, LangChain, or a voice agent.

ai-agenttriage-agentroutingintent-classification
agents
16 minutes
Build an Agent Knowledge Graph from Text
advancedcypher

Turn unstructured text into a queryable knowledge graph an AI agent can reason over — extract entities and relationships with GENERATE, store them as a Cypher graph, all in one database. Works with Claude Code, OpenClaw, LangChain, or a voice agent.

ai-agentknowledge-graphentity-extractioncypher
agents
22 minutes
Build an AI SDR / Outbound Agent
advancedsql

Build an AI SDR agent on one database — score leads with AutoML, match them to case studies by meaning, map the buying committee as a graph, and draft personalized outreach with GENERATE. Works with Claude Code, OpenClaw, LangChain, or a voice agent.

ai-agentai-sdrlead-scoringoutbound
agents
12 minutes
The Backend for a Coding Agent: Memory + Code Search + Impact Graph + Audit
intermediatesql

Stand up everything a coding agent needs — project memory, semantic code search, a code-dependency impact graph, and a tamper-evident decision log — on ONE self-hosted database it queries over MCP or SQL. No stitching four datastores; your code never leaves your box.

ai-agentcoding-agentmemoryrag
agents
14 minutes
Conversation Memory + Rolling Summary for a Chatbot
intermediateen

Store a chatbot's full conversation history and keep a rolling summary so it never blows the context window — turn buffer, semantic recall, and auto-summary in one SQL database. Works with Claude Code, OpenClaw, LangChain, or a voice agent.

chatbotconversation-memoryrolling-summaryvector
agents
16 minutes
Conversation Memory + Structured Facts for a Chatbot
intermediateen

The next-step variant of the rolling-summary recipe — replace the single prose summary with a typed chat_facts table (category, key, value, confidence, updated_at). Higher recall, surgical updates, no contradiction accumulation.

chatbotconversation-memorystructured-factsvector
agents
10 minutes
Customer Support Inbox: Sentiment Triage & Routing
intermediateen

Classify every inbound support message with SENTIMENT() and auto-route it to the right team, owner, and priority — no external NLP service.

sentimentsentiment-analysisnlpai
agents
14 minutes
Episodic + Semantic Memory for an Agent
intermediateen

Give an AI agent two memory types — episodic (what happened, when) and semantic (durable facts) — in one SQL store, and recall across both by meaning. Framework-agnostic: Claude Code, OpenClaw, LangChain, or a voice agent.

ai-agentepisodic-memorysemantic-memoryagent-memory
agents
12 minutes
Give Any AI Agent Long-Term Memory (in SQL)
intermediateen

Add persistent, semantic long-term memory to any AI agent — store and recall memories by meaning with vector embeddings in plain SQL. Framework-agnostic: works with Claude Code, OpenClaw, LangChain, or a custom or voice agent.

ai-agentlong-term-memoryvectorembeddings
agents
16 minutes
GraphRAG: Multi-hop Answers for an Agent
advancedcypher

Give an AI agent multi-hop reasoning — combine semantic retrieval with a knowledge graph so it can answer questions that need several connected facts, not just one passage. Works with Claude Code, OpenClaw, LangChain, or a voice agent.

ai-agentgraphragknowledge-graphmulti-hop
agents
12 minutes
Intent Classification for an Agent
intermediateen

Classify what a user wants — billing, support, sales, cancel — so your AI agent routes the conversation correctly, using vector nearest-example matching in plain SQL. No training job, works with Claude Code, OpenClaw, LangChain, or a voice agent.

ai-agentintent-classificationnluvector
agents
14 minutes
Shared Memory for Multi-Agent Systems (Blackboard Pattern)
intermediateen

Let multiple AI agents collaborate through one shared memory — a blackboard where each agent posts findings and reads what the others know, by meaning, in plain SQL. Works with Claude Code, OpenClaw, LangChain, or a voice agent.

multi-agentshared-memoryblackboardagent-collaboration
agents
12 minutes
RAG: Ground Any Agent's Answers in Your Data
intermediateen

Build retrieval-augmented generation for any AI agent in one database — embed your docs, retrieve the most relevant chunks by meaning, and generate a grounded answer in plain SQL. Works with Claude Code, OpenClaw, LangChain, or a voice agent.

ai-agentragretrieval-augmented-generationvector
agents
12 minutes
RAG Role-Based Access Control: Permission-Aware Retrieval in SQL
intermediateen

Add role-based access control to RAG so each user only retrieves the documents they're allowed to see. Nested groups, vector search, the LLM answer and an audit log in one SQL database, with no separate permission service.

ai-agentragaccess-controlrbac
agents
13 minutes
RAG with Citations (grounded answers that cite sources)
intermediateen

Make an AI agent cite its sources — retrieve passages, generate an answer, and attach the source documents it used, all in one SQL database. Auditable RAG that works with Claude Code, OpenClaw, LangChain, or a voice agent.

ai-agentragcitationsretrieval-augmented-generation
agents
12 minutes
Recall Agent Memory by Meaning + Recency
intermediateen

Make an AI agent recall the right memories by blending semantic relevance with recency — fresh, on-point context in one SQL query, no separate vector store or cache. Works with Claude Code, OpenClaw, LangChain, or a voice agent.

ai-agentagent-memoryrecencyvector
agents
14 minutes
Self-Checking / Grounded Generation (validate the answer)
intermediateen

Stop your AI agent from hallucinating — generate an answer, then have the agent verify it against your source data before returning it, all in one SQL database. Self-checking RAG for Claude Code, OpenClaw, LangChain, or a voice agent.

ai-agentgrounded-generationself-checkhallucination
agents
13 minutes
Semantic Deduplication of Agent Memories
intermediateen

Stop your AI agent from storing the same fact ten times — detect and merge near-duplicate memories by meaning with vector similarity in plain SQL. Keeps agent memory clean for Claude Code, OpenClaw, LangChain, or a voice agent.

ai-agentdeduplicationagent-memoryvector
agents
12 minutes
Semantic Tool Routing (function-calling without a framework)
intermediateen

Route an AI agent's request to the right tool by meaning — semantic function-calling with vector embeddings in plain SQL, no framework, no brittle keyword rules. Works with Claude Code, OpenClaw, LangChain, or a voice agent.

ai-agenttool-routingfunction-callingsemantic-routing
agents
15 minutes
Stop RAG Answering With Outdated Facts
intermediateen

RAG retrieves what is relevant, not what is still true. Give your AI agent the current value of every fact, the note it came from, and what was true on any date, with CREATE MEMORY, CURRENT, TRACE and RECALL AS OF in plain SQL.

ragoutdated-informationagent-memoryai-agent-memory