{"id":23633156,"url":"https://github.com/ravikumarmn/simple-llamaindex-agent","last_synced_at":"2026-02-08T05:01:52.650Z","repository":{"id":269884131,"uuid":"908751134","full_name":"ravikumarmn/Simple-LlamaIndex-Agent","owner":"ravikumarmn","description":"A FastAPI-based application that combines a Retrieval-Augmented Generation (RAG) system with an intelligent agent for enhanced information retrieval and query handling.","archived":false,"fork":false,"pushed_at":"2024-12-26T22:10:15.000Z","size":4438,"stargazers_count":2,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-05-19T01:37:46.459Z","etag":null,"topics":["ai-agents","langchain","llama-index","pinecone","rag","streamlit"],"latest_commit_sha":null,"homepage":"https://ravikumarmn.github.io/","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/ravikumarmn.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2024-12-26T21:48:45.000Z","updated_at":"2025-01-03T18:41:02.000Z","dependencies_parsed_at":"2024-12-26T22:38:07.632Z","dependency_job_id":null,"html_url":"https://github.com/ravikumarmn/Simple-LlamaIndex-Agent","commit_stats":null,"previous_names":["ravikumarmn/simple-llamaindex-agent"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/ravikumarmn/Simple-LlamaIndex-Agent","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ravikumarmn%2FSimple-LlamaIndex-Agent","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ravikumarmn%2FSimple-LlamaIndex-Agent/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ravikumarmn%2FSimple-LlamaIndex-Agent/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ravikumarmn%2FSimple-LlamaIndex-Agent/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/ravikumarmn","download_url":"https://codeload.github.com/ravikumarmn/Simple-LlamaIndex-Agent/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ravikumarmn%2FSimple-LlamaIndex-Agent/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":29221714,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-02-08T03:18:47.732Z","status":"ssl_error","status_checked_at":"2026-02-08T03:15:31.985Z","response_time":57,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.5:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["ai-agents","langchain","llama-index","pinecone","rag","streamlit"],"created_at":"2024-12-28T04:32:25.344Z","updated_at":"2026-02-08T05:01:52.633Z","avatar_url":"https://github.com/ravikumarmn.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Simple LlamaIndex Agent\n\n\u003cimg src=\"assets/image.png\" alt=\"Application Page\" title=\"Website Page\"\u003e\n\nA FastAPI-based application that combines a Retrieval-Augmented Generation (RAG) system with an intelligent agent for enhanced information retrieval and query handling.\n\n## Features\n\n- **RAG System**: Retrieves relevant information from a Pinecone vector database using LlamaIndex\n- **Intelligent Agent**: Makes decisions on when to use the vector database vs handling queries directly\n- **Multiple Interfaces**: FastAPI endpoints and Streamlit UI\n- **Content Safety**: Built-in inappropriate content detection\n- **Advanced Embedding**: Uses OpenAI's text-embedding-3-large model\n- **LLM Integration**: Powered by GPT-4 for high-quality responses\n\n## Prerequisites\n\n- Python 3.11+\n- OpenAI API key\n- Pinecone API key\n- Cohere API key (for reranking)\n\n## Installation\n\n1. Clone the repository and create a virtual environment:\n\n```bash\npython -m venv .venv\nsource .venv/bin/activate  # On Windows use: .venv\\Scripts\\activate\n```\n\n2. Install dependencies:\n\n```bash\npip install -r requirements.txt\n```\n\n```bash\npip install -e .\n```\n\n3. Set up environment variables:\n   Create a `.env` file based on `example.env`:\n\n```bash\nOPENAI_API_KEY=your_openai_api_key\nPINECONE_API_KEY=your_pinecone_api_key\nCOHERE_API_KEY=your_cohere_api_key\n```\n\n## Usage\n\n1. Start the FastAPI server:\n\n```bash\nuvicorn src.app.main:app --reload\n```\n\n2. Launch the Streamlit interface (optional):\n\n```bash\nstreamlit run src/streamlit_app.py\n```\n\n## API Endpoints\n\n### Agent Query\n\n- **POST** `/agent`\n- Intelligent query handling with contextual responses\n\n```json\n{\n  \"query\": \"Tell me about waves in physics\"\n}\n```\n\n## Agent Tools\n\n1. **VectorDBTool**: Handles complex information retrieval queries\n2. **InappropriateContentDetector**: Filters inappropriate or offensive content\n\n## Configuration\n\nKey settings in `config/ncert_search.json`:\n\n- Embedding model: text-embedding-3-large (3072 dimensions)\n- LLM: GPT-4\n- Vector similarity: Top 5 results\n- Chunk size: 1024 tokens with 50 token overlap\n\n## Project Structure\n\n```\n├── src/\n│   ├── app/\n│   │   ├── main.py          # FastAPI application\n│   │   └── streamlit_app.py # Streamlit interface\n│   ├── agent.py            # Agent implementation\n│   ├── document_manager.py # Document handling\n│   ├── indexer.py         # Vector database operations\n│   ├── retrieval.py       # RAG implementation\n│   └── service_config.py  # Configuration management\n├── config/\n│   └── ncert_search.json  # System configuration\n└── requirements.txt       # Project dependencies\n```\n\n## Dependencies\n\nKey packages:\n\n- llama-index-core\n- llama-index-vector-stores-pinecone\n- llama-index-embeddings-openai\n- fastapi\n- langchain\n- streamlit\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fravikumarmn%2Fsimple-llamaindex-agent","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fravikumarmn%2Fsimple-llamaindex-agent","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fravikumarmn%2Fsimple-llamaindex-agent/lists"}