Elyra
Elyra The coding agent Elyra Conductor Local project conductor Elyra SQL Anywhere Replication-ready SQL engine
Development
Development
Elyra
Semantic Index

Semantic Index

Local semantic code search — embed your codebase and find relevant code by meaning, not just keywords.

@elyracode/semantic-index lets the agent search your code by meaning. It embeds your tracked source files into a local index, so questions like "where is rate limiting handled?" resolve to the right code even when the exact keywords never appear.

Install

elyra install npm:@elyracode/semantic-index

Configuration

Configure the embeddings endpoint via environment variables. The defaults use the OpenAI API, but you can point at any OpenAI-compatible endpoint — including fully local ones like Ollama or LM Studio.

Variable Description Default
ELYRA_EMBED_BASE_URL OpenAI-compatible embeddings base URL. For fully local/private indexing, point at Ollama (http://localhost:11434/v1) or LM Studio. https://api.openai.com/v1
ELYRA_EMBED_MODEL Embedding model. For Ollama use nomic-embed-text. text-embedding-3-small
ELYRA_EMBED_API_KEY API key for the embeddings endpoint. Falls back to OPENAI_API_KEY. Not needed for local Ollama.

Tools

Tool Description
semantic_index_build Index the project's tracked source files. Run once, then re-run after big changes.
semantic_search Find code relevant to a natural-language query.

How it works

The index is stored locally at .elyra/semantic-index.json and never leaves your machine — the only network traffic is the embedding requests to your configured endpoint.

For full data sovereignty, use a local embeddings endpoint (such as Ollama) so nothing leaves your machine at all.

Examples

Once installed, ask Elyra to find code by meaning:

> Where is rate limiting handled?
> How does the app verify webhook signatures?
> Find the code that retries failed jobs

The agent builds the index with semantic_index_build, then uses semantic_search to locate the relevant code.

Included skill

The elyra-semantic-index skill is loaded automatically. It guides the agent on when and how to use semantic search effectively — building the index first and falling back to it when keyword search comes up empty.