{"id":23409200,"url":"https://github.com/shamspias/marmelad","last_synced_at":"2026-02-14T02:03:08.613Z","repository":{"id":268380714,"uuid":"904166729","full_name":"shamspias/marmelad","owner":"shamspias","description":"Marmelad: An intelligent LangGraph-powered agent to assist with research, coding, and problem-solving across various domains.","archived":false,"fork":false,"pushed_at":"2024-12-16T17:30:43.000Z","size":572,"stargazers_count":3,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-04-09T01:46:32.626Z","etag":null,"topics":["ai","artificial-intelligence","langchain","langchain-python","langgraph","langgraph-python","large-language-models","llm","python","rag"],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/shamspias.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","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-16T11:26:50.000Z","updated_at":"2025-02-08T07:43:30.000Z","dependencies_parsed_at":"2024-12-16T12:33:00.092Z","dependency_job_id":"068a6c00-f64c-4255-8396-b61f64a1aaa1","html_url":"https://github.com/shamspias/marmelad","commit_stats":null,"previous_names":["shamspias/marmelad"],"tags_count":0,"template":false,"template_full_name":"langchain-ai/rag-research-agent-template","purl":"pkg:github/shamspias/marmelad","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/shamspias%2Fmarmelad","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/shamspias%2Fmarmelad/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/shamspias%2Fmarmelad/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/shamspias%2Fmarmelad/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/shamspias","download_url":"https://codeload.github.com/shamspias/marmelad/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/shamspias%2Fmarmelad/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":29431593,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-02-13T22:20:51.549Z","status":"online","status_checked_at":"2026-02-14T02:00:07.626Z","response_time":53,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"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","artificial-intelligence","langchain","langchain-python","langgraph","langgraph-python","large-language-models","llm","python","rag"],"created_at":"2024-12-22T15:32:41.423Z","updated_at":"2026-02-14T02:03:08.591Z","avatar_url":"https://github.com/shamspias.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Marmelad\n\n**Marmelad** is an intelligent LangGraph-powered agent designed to assist with research, coding, and problem-solving\nacross various domains.\n\n[![CI](https://github.com/shamspias/marmelad/actions/workflows/unit-tests.yml/badge.svg)](https://github.com/shamspias/marmelad/actions/workflows/unit-tests.yml)\n[![Integration Tests](https://github.com/shamspias/marmelad/actions/workflows/integration-tests.yml/badge.svg)](https://github.com/shamspias/marmelad/actions/workflows/integration-tests.yml)\n\n[![Open in - LangGraph Studio](https://img.shields.io/badge/Open_in-LangGraph_Studio-00324d.svg)](https://studio.langchain.com/templates/open?githubUrl=https://github.com/shamspias/marmelad)\n\n## What it does\n\nThis project includes three key graphs:\n\n- An **index** graph (`src/index_graph/graph.py`) to index document objects.\n- A **retrieval** graph (`src/retrieval_graph/graph.py`) to handle chat history and respond with fetched documents.\n- A **researcher** subgraph (part of the retrieval graph) for executing research\n  plans (`src/retrieval_graph/researcher_graph/graph.py`).\n\n### How it works\n\n1. **Indexing Documents:**\n   The index graph takes in document objects to index them. If no documents are provided, sample documents\n   from `src/sample_docs.json` are indexed by default.\n\n2. **Handling Queries:**\n    - For LangChain-specific queries, the retrieval graph generates a research plan, passes it to the researcher\n      subgraph, and fetches relevant documents.\n    - For ambiguous queries, it seeks clarification.\n    - For unrelated queries, it responds appropriately.\n\n3. **Researcher Subgraph:**\n    - Breaks down research plans into steps.\n    - Generates search queries for each step and retrieves relevant documents in parallel.\n    - Returns these documents to the retrieval graph to generate a response.\n\n## Prerequisites\n\nEnsure you have the following installed:\n\n- Python 3.11+\n- Docker\n- A virtual environment tool\n\n## Installation Steps\n\n### 1. Clone the Repository\n\n```bash\ngit clone https://github.com/shamspias/marmelad.git\ncd marmelad\n```\n\n### 2. Setup Python Environment\n\n```bash\npython -m venv venv\nsource venv/bin/activate  # Use `venv\\Scripts\\activate` on Windows\n```\n\n### 3. Install Dependencies\n\n```bash\npip install -r requirements.txt\n```\n\n### 4. Environment Configuration\n\nCopy and configure the environment variables:\n\n```bash\ncp example.env .env\n# Edit .env to include necessary API keys and database URLs\n```\n\n### 5. Docker Setup\n\nEnsure Docker is operational on your machine.\n\n### 6. Install and Run LangGraph CLI\n\n```bash\npip install langgraph-cli\nlanggraph up  # Initializes and runs the necessary services\n```\n\n### 7. Enable Memory\n\n```bash\nsudo sysctl vm.overcommit_memory=1\n```\n\n## Model Configuration\n\nSpecify the model provider and model name using the following formats:\n\n| Provider Name   | Model Specification Format             |\n|-----------------|----------------------------------------|\n| Anthropic       | `anthropic/claude-3-5-sonnet`          |\n| Anthropic       | `anthropic/claude-3-opus`              |\n| Anthropic       | `anthropic/claude-3-haiku`             |\n| Azure OpenAI    | `azure_openai/gpt-4o-realtime-preview` |\n| Cohere          | `cohere/command-r-plus`                |\n| Cohere          | `cohere/phi-3-vision-128k-instruct`    |\n| Google VertexAI | `google_vertexai/gemini`               |\n| Hugging Face    | `huggingface/bert-large`               |\n\n### Enable Models in `project.toml`\n\nTo use specific models, enable their corresponding libraries in the `project.toml` file under dependencies:\n\n```toml\ndependencies = [\n    \"langgraph\u003e=0.2.34\",\n    \"langchain-openai\u003e=0.2.2\",\n    \"langchain-anthropic\u003e=0.2.3\",\n    \"langchain\u003e=0.3.3\",\n    #    \"langchain-fireworks\u003e=0.2.1\", # Uncomment to enable\n    \"python-dotenv\u003e=1.0.1\",\n    #    \"langchain-elasticsearch\u003e=0.3.0\", # Uncomment to enable\n    #    \"langchain-pinecone\u003e=0.2.0\", # Uncomment to enable\n    \"msgspec\u003e=0.18.6\",\n    #    \"langchain-mongodb\u003e=0.2.0\", # Uncomment to enable\n    #    \"langchain-cohere\u003e=0.3.0\", # Uncomment to enable Cohere models\n    \"langchain-postgres\u003e=0.0.12\",\n    \"httpx[socks]\u003e=0.27.2\",\n    #    \"langchain-google-genai\u003e=2.0.1\", # Uncomment to enable Google models\n    \"langchain-mistralai\u003e=0.2.0\",\n    #    \"gigachat\u003e=0.1.35\", # Uncomment to enable\n    #    \"langchain-community\u003e=0.3.2\", # Uncomment to enable\n]\n```\n\n## Running the Application\n\n### Using LangGraph CLI\n\nTo use a different database:\n\n```bash\nlanggraph up\n```\n\nTo connect to a pre-existing database:\n\n```bash\nlanggraph up --postgres-uri postgresql+psycopg://user_name:password@localhost:port/marmelad_db\n```\n\n## Customization\n\n1. **Change the retriever:** Modify the `retriever_provider` to use Elasticsearch, MongoDB, or Pinecone as per your\n   requirements.\n\n2. **Adjust models:** Update the `response_model`, `query_model`, and `embedding_model` in your configuration for\n   different use cases.\n\n3. **Extend functionality:** Add nodes or edges in the retrieval graph or customize prompts\n   in `src/retrieval_graph/prompts.py` to tailor the agent's behavior.\n\n## Troubleshooting\n\nRefer to the Troubleshooting section in the documentation for common setup issues.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fshamspias%2Fmarmelad","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fshamspias%2Fmarmelad","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fshamspias%2Fmarmelad/lists"}