agent-search

Search message content across Birdhouse agent sessions using SQLite queries.

36|5|Updated Feb 27, 2026
One-click install
npx skills add https://github.com/Birdhouse-Labs/birdhouse --skill agent-search-birdhouse-labs
Or copy as Structured Prompt for Agent▼
Please help me install this Agent Skill.
Skill: agent-search
Source: https://github.com/Birdhouse-Labs/birdhouse/tree/main/.agents/skills/agent-search
Command: npx skills add https://github.com/Birdhouse-Labs/birdhouse --skill agent-search-birdhouse-labs

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes scripts (resource) components.

What problem does it solve? Finding a specific past conversation, command, or output across dozens of Birdhouse agents is tedious when you only remember what was said or done, not which agent did it. This Skill searches message content directly in the OpenCode and Birdhouse SQLite databases to locate agents by their actual activity. ## Core Features & Use Cases - Full-Text Message Search: Query text parts, tool inputs, and tool outputs across all messages in one workspace or every workspace at once. - Role and Type Filtering: Narrow searches to user messages, assistant messages, or specific tool calls like bash commands. - Agent Resolution: Map OpenCode session IDs to Birdhouse agent IDs and generate clickable birdhouse:agent/ links. - Use Case: You remember an agent ran "gh pr create" last week but not which one. Run the search script across all workspaces to find the exact session, see the surrounding user prompt for context, and jump straight to that agent in the Birdhouse UI. ## Quick Start Ask the agent to search all Birdhouse workspaces for messages mentioning a specific term, such as "find which agent ran the database migration".

Frequently Asked Questions about agent-search

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

FAQPage Schema
How do I search agent message history in Birdhouse?▼

Run the search-messages.ts script with bun, passing a workspace ID or "all" plus your search term. It queries the opencode.db SQLite database for matching text parts, tool commands, and tool outputs, then prints matching sessions with context.

How do I find which agent ran a specific command?▼

Search tool call parts by filtering on json_extract of state.input.command with a LIKE pattern, such as '%gh pr create%'. The query joins part, message, and session tables to return the session ID and title of the agent that executed it.

Where does Birdhouse store agent conversation data?▼

Birdhouse stores OpenCode message history in opencode.db under ~/Library/Application Support/Birdhouse/workspaces/<workspace_id>/engine/data/opencode/, and agent metadata in agents.db in the same workspace folder. The workspace list lives in data.db.

Why does a session not resolve to a Birdhouse agent ID?▼

Some OpenCode sessions were run outside Birdhouse and have no entry in agents.db, so the resolve query returns null. Only sessions created through Birdhouse have a matching agent record for birdhouse:agent/ links.

Can I search messages across all workspaces at once?▼

Yes, pass "all" as the workspace argument to the search script. It enumerates every ws_ directory under the Birdhouse workspaces folder and runs the query against each workspace's opencode.db, aggregating matches.

Why do queries fail on older Birdhouse workspaces?▼

Very old databases predate the part table schema, so queries against it fail. Wrap queries in try/catch when iterating all workspaces to skip incompatible databases gracefully.