RAG plugin for Axio TUI
Project description
axio-tui-rag
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 tools —
index_filesandsemantic_searchregistered 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.agent import Agent
from axio.context import MemoryContextStore
from axio_transport_openai import OpenAITransport, OPENAI_MODELS
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=OPENAI_MODELS["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 querylimit: 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
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file axio_tui_rag-0.6.0.tar.gz.
File metadata
- Download URL: axio_tui_rag-0.6.0.tar.gz
- Upload date:
- Size: 100.7 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
03ca01b5378f0e39bf8561e751812a622ce6f0bedde31c1100afda8411c34851
|
|
| MD5 |
2a12d54d34a60da31e2022523b51f0a7
|
|
| BLAKE2b-256 |
cde0c9c8ed5935f139d8b0f427f5bf75b6de0d73220be0cc77d78b4a9b2b9ef3
|
Provenance
The following attestation bundles were made for axio_tui_rag-0.6.0.tar.gz:
Publisher:
publish.yml on axio-agent/monorepo
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
axio_tui_rag-0.6.0.tar.gz -
Subject digest:
03ca01b5378f0e39bf8561e751812a622ce6f0bedde31c1100afda8411c34851 - Sigstore transparency entry: 1322166887
- Sigstore integration time:
-
Permalink:
axio-agent/monorepo@9e5c1e46072eadfc89eb4c76340cbfb6b5f2d22c -
Branch / Tag:
refs/tags/0.6.0 - Owner: https://github.com/axio-agent
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@9e5c1e46072eadfc89eb4c76340cbfb6b5f2d22c -
Trigger Event:
release
-
Statement type:
File details
Details for the file axio_tui_rag-0.6.0-py3-none-any.whl.
File metadata
- Download URL: axio_tui_rag-0.6.0-py3-none-any.whl
- Upload date:
- Size: 9.1 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
3eeb9cf3d5e015aa3b1e108eb7f339557cbd4379d2c8958bbb0ed61f23d3bb59
|
|
| MD5 |
4d3bfa6ed3c06e6e65213cf4f7f06d69
|
|
| BLAKE2b-256 |
a800ce20b9900624c422ef25faf92dfa1190fba3656ffaa2289737b04f0fed71
|
Provenance
The following attestation bundles were made for axio_tui_rag-0.6.0-py3-none-any.whl:
Publisher:
publish.yml on axio-agent/monorepo
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
axio_tui_rag-0.6.0-py3-none-any.whl -
Subject digest:
3eeb9cf3d5e015aa3b1e108eb7f339557cbd4379d2c8958bbb0ed61f23d3bb59 - Sigstore transparency entry: 1322166960
- Sigstore integration time:
-
Permalink:
axio-agent/monorepo@9e5c1e46072eadfc89eb4c76340cbfb6b5f2d22c -
Branch / Tag:
refs/tags/0.6.0 - Owner: https://github.com/axio-agent
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@9e5c1e46072eadfc89eb4c76340cbfb6b5f2d22c -
Trigger Event:
release
-
Statement type: