OpenParable
Skip to content
← Back to skills

Route By Query Shape

Agent Building
route-by-query-shape

Route By Query Shape is an Agent Skill for agent building published in the Bitterbot-AI/bitterbot-desktop repository on GitHub: a SKILL.md instruction file an AI agent can load to do this task.

When the agent calls memory_search with a relationship-shaped query ("who did I talk to about X"), redirect to the knowledge_graph backend where it will actually find the answer.

View on GitHub ↗
QUICK START

How to use this skill

Bring this guide into your coding agent with a prompt tailored to the tool you use.

  1. Open your project in Codex.
  2. Copy and paste the prompt below.
  3. Review files and risks before approving any action.
Prompt to paste
Inspect the Agent Skill at https://github.com/Bitterbot-AI/bitterbot-desktop/blob/HEAD/skills/route-by-query-shape/SKILL.md and all supporting files. Report provenance, permissions, scripts, dependencies, and security risks. Propose an exact installation into .agents/skills/route-by-query-shape, but wait for my approval before writing files or running scripts.

Copying this prompt does not install or run the skill. Review third-party files before use.

route-by-query-shape

When you ask Bitterbot a relationship question — "who did I talk to about Q4?", "who worked with me on Foo?" — the vector-based memory_search often misses because the answer lives in entity relationships, not in chunk text. The graph backend gets these right.

This interceptor watches memory_search calls, detects relationship-shaped queries, extracts the salient entity, and re-routes the call to the graph backend before it executes.

What you'll see

For relationship questions, the agent will hit the knowledge graph rather than searching through unstructured text. Expect noticeably better hit rates on "who did X with Y" style questions.

Implementation

Built-in interceptor route-by-query-shape:relationship lives in src/agents/skills/builtin-interceptors/route-by-query-shape.ts. Fires up to 12 times per session.