{"id":22883628,"url":"https://github.com/deadbits/cascade","last_synced_at":"2025-07-27T18:14:10.703Z","repository":{"id":230967442,"uuid":"779092139","full_name":"deadbits/cascade","owner":"deadbits","description":"Conversations between LLMs","archived":false,"fork":false,"pushed_at":"2025-05-26T02:57:29.000Z","size":1029,"stargazers_count":9,"open_issues_count":1,"forks_count":0,"subscribers_count":4,"default_branch":"main","last_synced_at":"2025-05-26T03:59:35.864Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"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/deadbits.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,"zenodo":null}},"created_at":"2024-03-29T02:48:26.000Z","updated_at":"2025-05-26T02:57:32.000Z","dependencies_parsed_at":"2024-04-01T21:28:32.605Z","dependency_job_id":"cab41e78-1706-4eba-b5a6-5eab5af1c2fe","html_url":"https://github.com/deadbits/cascade","commit_stats":null,"previous_names":["deadbits/cascade"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/deadbits/cascade","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/deadbits%2Fcascade","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/deadbits%2Fcascade/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/deadbits%2Fcascade/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/deadbits%2Fcascade/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/deadbits","download_url":"https://codeload.github.com/deadbits/cascade/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/deadbits%2Fcascade/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":267400577,"owners_count":24081185,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2025-07-27T02:00:11.917Z","response_time":82,"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":[],"created_at":"2024-12-13T18:39:27.057Z","updated_at":"2025-07-27T18:14:10.697Z","avatar_url":"https://github.com/deadbits.png","language":"Python","readme":"# cascade\n\nFacilitates a conversation between two LLMs (OpenAI, Anthropic, Ollama) and an optional human-in-the-loop\n\n## Installation\n\n```bash\ngit clone https://github.com/deadbits/cascade.git\ncd cascade\npyenv virtualenv 3.11.7 cascade\npyenv activate cascade\npip install -r requirements.txt\n```\n\n## Configuration\n\n### API Keys\nIf using OpenAI/Anthropic, set your API keys as environment variables:\n```\nexport ANTHROPIC_API_KEY=foo\nexport OPENAI_API_KEY=foo\n```\n\n### YAML Config\nModify the config file `data/config.yaml` or create your own with the following structure:\n\n```yaml\n# LLM connection strings\nllm1:\n  connection: anthropic:claude-3-opus-20240229\n  system_prompt_file: path/to/system_prompt1.txt\n\nllm2:\n  connection: openai:gpt-4-1106-preview\n  system_prompt_file: path/to/system_prompt2.txt\n\n# Conversation Settings\nrounds: 5\noutput_file: path/to/output.json\n\n# Conversation history in JSON format\nhistory_file: path/to/conversation_history.json\n\n# Enable/disable\nhuman_in_the_loop: False\n```\n\n* `history_file` takes a JSON file containing the conversation history\n* For an example conversation history, see [data/prompts/simulation.json](data/prompts/simulation.json)\n\n\n## Usage\n\n```bash\npython main.py --config data/config.yaml\n```\n\n### Human-in-the-loop\n\nWhen running in this mode, you'll see `msg ($LLM_NAME): ` in between messages sent to/from the LLMs.\nYou can optionally add your own message to the chat here, or press Ctrl+C to skip that round.\n\nIf you add a message, it'll be appended with the format below.\n\n**It is up to you to use a system prompt or conversation history that handles this appropriately.**\n\n```xml\n\u003cHUMAN\u003eyour message\u003c/HUMAN\u003e\n```\n\n## Credit\n\nCredit to [Andy Ayrey](https://twitter.com/AndyAyrey/status/1769942282168664104) for inspiration and [original code and prompt](https://www.codedump.xyz/py/ZfkQmMk8I7ecLbIk).  \nCheck out [his project here](https://dreams-of-an-electric-mind.webflow.io/).\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdeadbits%2Fcascade","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdeadbits%2Fcascade","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdeadbits%2Fcascade/lists"}