Skip to content

karanjaxyz/soma_agent

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Soma Agent

An agentic approach to document search. Ask questions about your files and let the agent figure out what to read.

How it works

  1. You ask a question
  2. The agent lists files, reads relevant ones, searches semantically
  3. It loops until it has enough context
  4. It synthesizes an answer

Install

git clone https://github.com/thirtyninetythree/soma-agent
cd soma-agent
python -m venv venv
source venv/bin/activate  # Windows: venv\Scripts\activate
pip install -r requirements.txt

Setup

Copy .env.example to .env and add your API key:

cp .env.example .env

Usage

python main.py --directory /path/to/your/docs

Options:

  • --provider - claude (default), gemini, openai
  • --directory - folder to index (default: current folder)

Tools

The agent has three tools:

  • list_files - list directory contents
  • read_file - read file contents
  • semantic_search - search indexed documents by meaning

Supported file types

.txt, .md, .py, .js, .ts, .json, .csv, .html, .css, .yml, .yaml

How indexing works

On startup, the agent:

  1. Walks the directory for supported files
  2. Chunks each file (500 chars, 100 overlap)
  3. Embeds chunks using all-MiniLM-L6-v2 (~90MB model)
  4. Saves vectors to .rag_index/

Changed files are re-indexed automatically (hash comparison).

License

MIT

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages