{"id":13593808,"url":"https://github.com/simonmesmith/agentflow","last_synced_at":"2026-01-17T06:36:24.661Z","repository":{"id":185705349,"uuid":"673969898","full_name":"simonmesmith/agentflow","owner":"simonmesmith","description":"Complex LLM Workflows from Simple JSON.","archived":false,"fork":false,"pushed_at":"2023-08-11T18:07:43.000Z","size":80,"stargazers_count":296,"open_issues_count":13,"forks_count":26,"subscribers_count":5,"default_branch":"main","last_synced_at":"2025-04-09T05:33:50.715Z","etag":null,"topics":[],"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/simonmesmith.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}},"created_at":"2023-08-02T20:57:16.000Z","updated_at":"2025-04-07T07:26:53.000Z","dependencies_parsed_at":null,"dependency_job_id":"8c30f77b-d4b6-41fe-8fcb-3cb61b453651","html_url":"https://github.com/simonmesmith/agentflow","commit_stats":null,"previous_names":["simonmesmith/agentflow"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/simonmesmith/agentflow","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/simonmesmith%2Fagentflow","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/simonmesmith%2Fagentflow/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/simonmesmith%2Fagentflow/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/simonmesmith%2Fagentflow/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/simonmesmith","download_url":"https://codeload.github.com/simonmesmith/agentflow/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/simonmesmith%2Fagentflow/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28502593,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-17T04:31:57.058Z","status":"ssl_error","status_checked_at":"2026-01-17T04:31:45.816Z","response_time":85,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.6: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":[],"created_at":"2024-08-01T16:01:24.894Z","updated_at":"2026-01-17T06:36:24.628Z","avatar_url":"https://github.com/simonmesmith.png","language":"Python","funding_links":[],"categories":["Frameworks","其他LLM框架","Other LLM Frameworks"],"sub_categories":["文章","Videos Playlists"],"readme":"# Agentflow: Complex LLM Workflows from Simple JSON\n\n![Python lint and test](https://github.com/simonmesmith/agentflow/actions/workflows/build.yml/badge.svg)\n\nAgentflow is a powerful yet user-friendly tool to run workflows powered by LLMs. You can:\n\n* **Write workflows in plain English** in human-readable JSON files.\n* **Use variables for dynamic outputs** that change based on user input.\n* **Build and execute custom functions** to go beyond text generation.\n\n## Why Agentflow?\n\nAgentflow fills the gap between chat and autonomous interfaces:\n\n* **Chat (e.g. ChatGPT) can't run workflows** because they're conversational.\n* **Autonomous (e.g. Auto-GPT) run them unreliably** because they have too much freedom.\n\nAgentflow offers a balanced solution: Workflows that LLMs follow step-by-step.\n\n## Install and Use\n\nAgentflow is currently in development. To try it:\n\n1. Sign up for the [OpenAI API](https://platform.openai.com/overview) and get an [API key](https://help.openai.com/en/articles/4936850-where-do-i-find-my-secret-api-key)\n2. Clone or download this repository.\n3. Create a `.env` file from [example.env](https://github.com/simonmesmith/agentflow/blob/main/example.env) and add your OpenAI API key.\n4. Run `pip install -r requirements.txt` to install dependencies.\n\nNow you can run flows from the command line, like this:\n```bash\npython -m run --flow=example\n```\n\n### Optional Arguments\n\n#### Use `variables` to pass variables to your flow\n\n```bash\npython -m run --flow=example_with_variables --variables 'market=college students' 'price_point=$50'\n```\n\n#### Use `v` (verbose) to see task completion in real-time\n\n```bash\npython -m run --flow=example -v\n```\n\n## Create New Flows\n\nCopy [example.json](https://github.com/simonmesmith/agentflow/blob/main/agentflow/flows/example.json) or [example_with_variables.json](https://github.com/simonmesmith/agentflow/blob/main/agentflow/flows/example_with_variables.json) or create a flow from scratch in this format:\n\n```json\n{\n    \"system_message\": \"An optional message that guides the model's behavior.\",\n    \"tasks\": [\n        {\n            \"action\": \"Instruct the LLM here!\"\n        },\n        {\n            \"action\": \"Actions can have settings, including function calls and temperature, like so:\",\n            \"settings\": {\n                \"function_call\": \"save_file\",\n                \"temperature\": 0.5\n            }\n        },\n        {\n            \"action\": \"...\"\n        }\n    ]\n}\n```\n\n## Create New Functions\n\nCopy [save_file.py](https://github.com/simonmesmith/agentflow/blob/main/agentflow/functions/save_file.py) and modify it, or follow these instructions (replace \"function_name\" with your function name):\n\n1. **Create `function_name.py` in the [functions](https://github.com/simonmesmith/agentflow/tree/main/agentflow/functions) folder**.\n2. **Create a class within called `FunctionName`** that inherits from `BaseFunction`.\n3. **Add `get_definition()` and `execute()` in the class**. See descriptions of these in `BaseFunction`.\n\nThat's it! You can now use your function in `function_call` as shown above. However, you should probably:\n\n4. **Add tests in [tests](https://github.com/simonmesmith/agentflow/tree/main/tests)**! Then you'll know if workflows are failing because of your function.\n\n## License\n\nAgentflow is licensed under the [MIT License](https://github.com/simonmesmith/agentflow/blob/main/LICENSE).\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsimonmesmith%2Fagentflow","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsimonmesmith%2Fagentflow","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsimonmesmith%2Fagentflow/lists"}