agentic-ecology-bioacoustics
Skill11 starsChanged 2 months agoApache-2.0View on GitHub
Provides bioacoustic analysis capabilities for ecologists and researchers using the perch-hoplite Python package. A typical use case is to use agile modeling to bootstrap the creation and deployment of a bespoke detector for targeted species on an existing collection of passive acoustic monitoring recordings. Use when processing and annotating audio recordings for bioacoustic applications.
In this repository4 other files it gives its agents.
The file
We split this skill into the rules it gives an agent
5 rules. About 0 are common, 4 are distinctive, and 1 is very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈4
Distinctive · estimate
This author's own choices. Worth a look.
1
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Distinctive: line 25
Follow these sequential steps:
- Distinctive: line 27
Preprocess: Create and populate a Hoplite database from the user's recordings.
- Distinctive: line 33
Assess Compute Scale: Follow the compute assessment and execution planning protocol in AGENTS.md to evaluate options (Local vs.
- Very specific: line 46
Remote Embedding with DirectRunner: Run dataflow_embed.py with --runner=DirectRunner on the Colab GPU/TPU runtime to generate sharded …
- Distinctive: line 70
Build a Bioacoustics Web App: Create an interactive webpage for the user to browse, search, and annotate audio snippets associated with the …
≈ “Common” is an estimate: at least 1 in 5 of the 350,495 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
Bioacoustics Skill
[!CAUTION] DATABASE SAFETY AND INTEGRITY: Do NOT write, modify, or insert test annotations directly into the user's production databases. If you need to test database operations (such as saving annotations or training models), you MUST copy the database to a temporary location in
agent_workspace(e.g.,agent_workspace/test_db) and test against the copy. Never leave testing data in production databases.
Workflow Overview
Follow these sequential steps:
- Preprocess: Create and populate a Hoplite database from the user's
recordings.
- Identify Recordings: Locate the user's recordings. If the location is not provided, ask the user.
- Select Embedding Model: Confirm which embedding model to use (e.g.,
perch_v2,surfperch). Query the user if they have not specified one. - Assess Compute Scale: Follow the compute assessment and execution
planning protocol in
AGENTS.mdto evaluate options (Local vs. Colab vs. GCP Dataflow) and await the user's decision. - Execute Ingestion Strategy:
[!IMPORTANT] MANDATORY INGESTION PIPELINE: Always use
dataflow_embed.pyto extract audio embeddings into sharded Apache Parquet files, followed byingest_embeddings.pyto build the Hoplite database. Do NOT useEmbedWorkerdirectly.- Option A (Local Ingestion via DirectRunner): For local execution on the local machine:
- Extract Embeddings with DirectRunner: Execute the Apache Beam pipeline (dataflow_embed.py) with
--runner=DirectRunner, passing local audio paths for--input_globand a local workspace directory (e.g.,agent_workspace/embeddings/<dataset>) for--output_dir. - Convert to Hoplite DB: Ingest the resulting Parquet embeddings into a Hoplite database in
databases/<dataset>using ingest_embeddings.py.
- Extract Embeddings with DirectRunner: Execute the Apache Beam pipeline (dataflow_embed.py) with
- Option B (Remote Ingestion via Colab): For intermediate batches
benefiting from GPU/TPU acceleration:
- Stage Audio: Transfer recordings to the Colab environment
following the storage evaluation and upload protocols in
AGENTS.md. - Remote Embedding with DirectRunner: Run dataflow_embed.py
with
--runner=DirectRunneron the Colab GPU/TPU runtime to generate sharded Apache Parquet embeddings. - Convert to Hoplite DB: Ingest the Parquet embeddings into an ephemeral
Hoplite database using ingest_embeddings.py
and sync the database files into the local
databases/directory. Ensure the database audio source metadata points to the local recordings path so the local web app can resolve and stream audio.
- Stage Audio: Transfer recordings to the Colab environment
following the storage evaluation and upload protocols in
- Option C (Cloud-Scale Ingestion via GCP Dataflow): For large
recording corpora (hundreds of GBs to TBs):
- Stage Audio to GCS: Stage recordings to Cloud Storage
following the GCP storage architecture and staging protocols in
AGENTS.md. - Distributed Dataflow Embedding: Execute the Apache Beam
pipeline (dataflow_embed.py) on
Google Cloud Dataflow with
DataflowRunnerto extract embeddings and generate sharded Apache Parquet files on GCS. - Convert to Hoplite DB: Ingest the resulting Parquet embeddings into a Hoplite database using ingest_embeddings.py.
- Mount with GCS FUSE: Mount the audio bucket via GCS FUSE
(
google-cloud-storage-fuse) so the web app can stream audio windows on demand without downloading full recordings. Refer to GCP Dataflow Audio Embedding for complete instructions and commands.
- Stage Audio to GCS: Stage recordings to Cloud Storage
following the GCP storage architecture and staging protocols in
- Option A (Local Ingestion via DirectRunner): For local execution on the local machine:
- Build a Bioacoustics Web App: Create an interactive webpage for the user
to browse, search, and annotate audio snippets associated with the Hoplite
database created in the previous step. Make sure the web app supports the
following:
- Browsing: Design the UI so that the user can inspect rows in the database and listen to their associated audio.
- Annotating: Empower the user to attach annotations to rows in the database. Save, update, and clear user annotations (positive, negative, or uncertain) directly in the database under the "user" provenance tag as they interact.
- Searching: Empower the user to reorder rows in the database
according to various criteria:
- Vector Search: Allow the user to present a search query in the form of a URI pointing to an audio clip. Embed it with the selected model and perform a search operation in the database. Use the result to rerank all rows in the database. Ensure that the query URI is only used for ranking, and any annotations submitted are saved under the active label (e.g., species name), NOT under the query URI itself.
- Trained Classifier: Once enough annotations are provided for a
particular label (at least two positives and one negative, or two
negatives and one positive), allow the user to search with a
classifier trained on those annotations. Train a linear classifier
using
perch-hopliteAPIs, and use the classifier's weights to score database rows and rerank them.
Technical Reference
For detailed API usage, implementation instructions, and code examples, see:
- Bioacoustics Technical Reference
- GCP Dataflow Audio Embedding Technical Reference
This reference covers:
- Hoplite Database initialization and loading
- Audio embedding extraction via
dataflow_embed.py(withDirectRunnerlocally orDataflowRunneron GCP) - Ingesting Parquet embeddings into Hoplite DB using
ingest_embeddings.py - Distributed audio embedding on Google Cloud Dataflow with Apache Beam
- Ingesting Dataflow embeddings with
ingest_embeddings.py - GCS FUSE audio streaming without breaking changes
- Resolving physical audio files from database records
- Agile Modeling setup and search implementation
- Serving search results via the interactive UI
- Processing user annotations (saving, clearing, and restoring state)
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

