How neptune-glitch/ecocycle_ai works
EcoCycle AI turns an uploaded waste photo into recycling and reuse advice. In the Streamlit workflow, optional user notes are checked for threats, then the image is identified, matching knowledge is retrieved, and advice is generated and displayed. A separate Google ADK agent registers security, identification, and retrieval tools. The knowledge base is built from the CSV into ChromaDB using Gemini embeddings. The README describes broader capabilities; the graph follows sampled code where it differs, and does not infer unsampled ADK runtime behavior.
Main entry points: streamlit_app.py Streamlit App · retrieve.py Knowledge Retrieval · build_db.py Database Builder · identify.py Image Identification
Components 14
User Interface
- Streamlit App
streamlit_app.py - Recommendations
streamlit_app.py
Agent Orchestration
- ADK Agent
agents/agent.py - CLI Workflow
app.py
Waste Analysis
- Input Security
skills/security.py - Image Identification
skills/identify.py - Advice Generation
skills/advise.py
Knowledge Retrieval
- Knowledge Retrieval
skills/retrieve.py - Database Builder
build_db.py - Embedding Builder
rag/embed.py - Waste Dataset
data/waste_knowledge.csv - ChromaDB
Other components
- User
- Gemini API
Connections 23
- User → Streamlit App: uploads image
README.md - Streamlit App → Input Security: checks note
streamlit_app.py - Streamlit App → Image Identification: identifies image
streamlit_app.py - Streamlit App → Knowledge Retrieval: requests knowledge
streamlit_app.py - Streamlit App → Advice Generation: generates advice
streamlit_app.py - Streamlit App → Recommendations: displays response
streamlit_app.py - ADK Agent → Input Security: registers tool
agents/agent.py - ADK Agent → Image Identification: registers tool
agents/agent.py - ADK Agent → Knowledge Retrieval: registers tool
agents/agent.py - CLI Workflow → Image Identification: identifies image
app.py - CLI Workflow → Knowledge Retrieval: requests knowledge
app.py - CLI Workflow → Advice Generation: generates advice
app.py - Image Identification → Gemini API: analyzes image
skills/identify.py - Advice Generation → Gemini API: generates response
skills/advise.py - Knowledge Retrieval → Gemini API: creates query embedding
skills/retrieve.py - Knowledge Retrieval → ChromaDB: queries vectors
skills/retrieve.py - Knowledge Retrieval → Database Builder: builds if absent
skills/retrieve.py - Database Builder → Waste Dataset: reads records
build_db.py - Database Builder → Gemini API: embeds records
build_db.py - Database Builder → ChromaDB: stores vectors
build_db.py - Embedding Builder → Waste Dataset: reads records
rag/embed.py - Embedding Builder → Gemini API: embeds records
rag/embed.py - Embedding Builder → ChromaDB: stores vectors
rag/embed.py