Skip to main content

RAG plugin for Axio TUI

Project description

axio-tui-rag

PyPI Python License: MIT

RAG (Retrieval-Augmented Generation) plugin for axio-tui.

Index your local files into a vector store and let the agent search them semantically. Point the agent at a codebase, documentation, or notes — it retrieves relevant chunks without reading every file.

Features

  • File indexing — chunk and embed files into a LanceDB vector store
  • Semantic search — retrieve the most relevant chunks for a query using embedding similarity
  • Incremental updates — re-indexing a file replaces its old chunks; unchanged files are skipped
  • Two axio toolsindex_files and semantic_search registered via entry points

Installation

pip install axio-tui-rag

Or install as part of the TUI bundle:

pip install "axio-tui[rag]"

Usage

Via axio-tui (recommended)

Launch the TUI with RAG enabled — the agent gains two new tools automatically:

pip install "axio-tui[rag,openai]"
axio

Then ask the agent:

  • "Index all Python files in ./src"
  • "Search for how authentication is implemented"

Standalone

from axio import Agent
from axio.context import MemoryContextStore
from axio_transport_openai import OpenAITransport
from axio_tui_rag import IndexFiles, SemanticSearch
from axio.tool import Tool

tools = [
    Tool(name="index_files",    description=IndexFiles.__doc__ or "",    handler=IndexFiles),
    Tool(name="semantic_search", description=SemanticSearch.__doc__ or "", handler=SemanticSearch),
]

agent = Agent(
    system="You are a code assistant. Index files before searching.",
    tools=tools,
    transport=OpenAITransport(api_key="sk-...", model="gpt-4o"),
)

Tools

index_files

Index one or more files into the vector store for later semantic search. Files are chunked and embedded. Re-indexing a file replaces its old chunks.

Parameters:

  • paths: list[str] — file paths to index (relative to cwd)

semantic_search

Search the vector store for chunks semantically similar to a query. Returns ranked excerpts with file paths and line numbers.

Parameters:

  • query: str — natural-language search query
  • limit: int (default: 5) — number of results to return

Plugin registration

[project.entry-points."axio.tools"]
index_files     = "axio_tui_rag:IndexFiles"
semantic_search = "axio_tui_rag:SemanticSearch"

Part of the axio ecosystem

axio · axio-tui · axio-tui-guards

License

MIT

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

axio_tui_rag-0.2.2.tar.gz (98.3 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

axio_tui_rag-0.2.2-py3-none-any.whl (7.6 kB view details)

Uploaded Python 3

File details

Details for the file axio_tui_rag-0.2.2.tar.gz.

File metadata

  • Download URL: axio_tui_rag-0.2.2.tar.gz
  • Upload date:
  • Size: 98.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for axio_tui_rag-0.2.2.tar.gz
Algorithm Hash digest
SHA256 8e31df1f08a32d836507f53a4f06c6bb17690b2a74a157ff535b91d0f1e497fc
MD5 e0aa9d84be4cd08af196dd94c0e8a0b8
BLAKE2b-256 a0190e04c7ebf32625abd3cd30b8e3c64178b605be99e6caa988bd2c71046a80

See more details on using hashes here.

Provenance

The following attestation bundles were made for axio_tui_rag-0.2.2.tar.gz:

Publisher: publish.yml on axio-agent/axio-tui-rag

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file axio_tui_rag-0.2.2-py3-none-any.whl.

File metadata

  • Download URL: axio_tui_rag-0.2.2-py3-none-any.whl
  • Upload date:
  • Size: 7.6 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for axio_tui_rag-0.2.2-py3-none-any.whl
Algorithm Hash digest
SHA256 4baac3402472d3567f22f55e165b38ba061314d3adb4964fe685a1db6cf74eb7
MD5 567ec5ce46aba368eacfc32872e5fbdb
BLAKE2b-256 ae395bd4a8ff44249b7812987c2f6c6c0bff565d02a2faaf9aa17bb340e0ab36

See more details on using hashes here.

Provenance

The following attestation bundles were made for axio_tui_rag-0.2.2-py3-none-any.whl:

Publisher: publish.yml on axio-agent/axio-tui-rag

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page