{"id":48898931,"url":"https://github.com/5005-69/logeion-agentic-executor","last_synced_at":"2026-04-16T13:01:41.084Z","repository":{"id":351546591,"uuid":"1208854803","full_name":"5005-69/Logeion-agentic-executor","owner":"5005-69","description":"A cli tool for agents giving them the ability for batch tool calling and multi step workflows in python language ","archived":false,"fork":false,"pushed_at":"2026-04-15T13:03:31.000Z","size":46,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2026-04-15T14:28:12.789Z","etag":null,"topics":["agentic-workflow","ai-agents","claude-code","cli-tool","code-analysis-true","python-execution"],"latest_commit_sha":null,"homepage":"","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/5005-69.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,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2026-04-12T20:37:28.000Z","updated_at":"2026-04-15T13:03:01.000Z","dependencies_parsed_at":null,"dependency_job_id":null,"html_url":"https://github.com/5005-69/Logeion-agentic-executor","commit_stats":null,"previous_names":["5005-69/logeion-agentic-executor"],"tags_count":2,"template":false,"template_full_name":null,"purl":"pkg:github/5005-69/Logeion-agentic-executor","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/5005-69%2FLogeion-agentic-executor","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/5005-69%2FLogeion-agentic-executor/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/5005-69%2FLogeion-agentic-executor/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/5005-69%2FLogeion-agentic-executor/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/5005-69","download_url":"https://codeload.github.com/5005-69/Logeion-agentic-executor/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/5005-69%2FLogeion-agentic-executor/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":31886937,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-16T11:36:10.202Z","status":"ssl_error","status_checked_at":"2026-04-16T11:36:09.652Z","response_time":69,"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":["agentic-workflow","ai-agents","claude-code","cli-tool","code-analysis-true","python-execution"],"created_at":"2026-04-16T13:01:28.665Z","updated_at":"2026-04-16T13:01:41.078Z","avatar_url":"https://github.com/5005-69.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"\u003cdiv align=\"center\"\u003e\n\n# Agentic Executor\n\n### The execution layer for AI agents that need real hands\n\n[![Version](https://img.shields.io/badge/version-1.0.2-blue.svg?style=flat-square)](https://github.com/Logeion/agentic-executor)\n[![Python](https://img.shields.io/badge/python-3.10+-yellow.svg?style=flat-square)]()\n[![License](https://img.shields.io/badge/license-MIT-lightgrey.svg?style=flat-square)]()\n[![No deps](https://img.shields.io/badge/dependencies-zero-brightgreen.svg?style=flat-square)]()\n\n\u003c/div\u003e\n\n---\n\nAI agents are powerful thinkers but poor actors. They call one tool, wait for a result, call another tool, wait again. Every step is a round-trip.\n\n**Agentic Executor** gives the agent a Python interpreter and a set of high-performance commands. Instead of ten tool calls, it writes one script. Loops, conditionals, error handling — all in a single thought.\n\n```python\n# One thought. Ten files. Zero round-trips.\npython -m agentic_executor.cli --thought-stdin \u003c\u003c'EOF'\nfiles = execute('search', {'pattern': '*.py'})\nfor f in files['data']['files']:\n    result = execute('read', {'path': f, 'lines': 5})\n    if result['success']:\n        print(f\"=== {f} ===\")\n        print('\\n'.join(result['data']['lines']))\nEOF\n```\n\n---\n\n## Install\n\n```bash\npip install agentic-executor\n```\n\nNo dependencies. Works immediately with Python's built-in `ast` for Python files.  \nFor full multi-language support (20+ languages via tree-sitter):\n\n```bash\npip install \"agentic-executor[languages]\"\n```\n\n---\n\n## Activate the /exec skill\n\nAfter installing, deploy the `/exec` skill to your AI agent of choice:\n\n```bash\nexec-install                       # Claude Code  (default)\nexec-install --agent cursor        # Cursor\nexec-install --agent windsurf      # Windsurf\nexec-install --agent kiro          # Kiro\nexec-install --agent codex         # Codex\nexec-install --agent copilot       # GitHub Copilot\nexec-install --agent opencode      # OpenCode\nexec-install --agent aider         # Aider\nexec-install --agent claw          # OpenClaw\nexec-install --agent hermes        # Hermes\nexec-install --agent trae          # Trae\nexec-install --agent droid         # Factory Droid\nexec-install --agent all           # All at once\n```\n\nCheck status at any time:\n\n```bash\nexec-install --list\n```\n\n---\n\n## How it works\n\nEverything goes through one function: `execute(command, args)`.\n\nThe agent writes Python code that calls `execute()`. That code runs locally, with full Python logic — loops, conditions, error handling, chaining results between steps.\n\n```python\n# Standard return format — every command\n{\n    \"success\": bool,\n    \"data\":    Any,       # command result\n    \"error\":   str|None   # message if failed\n}\n```\n\nAlways check `result['success']` before reading `result['data']`.\n\n---\n\n## Commands\n\n### Filesystem\n\n```python\nexecute('read',    {'path': 'file.txt'})                                   # first 200 lines (default)\nexecute('read',    {'path': 'file.txt', 'full': True})                    # full file, no limit\nexecute('read',    {'path': 'file.txt', 'lines': 20})                     # first N lines\nexecute('read',    {'path': 'file.txt', 'start': 10, 'end': 30})          # range\nexecute('write',   {'path': 'out.txt', 'content': 'hello'})\nexecute('write',   {'path': 'log.txt', 'content': 'x\\n', 'mode': 'a'})  # append\nexecute('replace', {'path': 'f.py', 'line': 42, 'new': '    # fixed'})   # line mode\nexecute('replace', {'path': 'f.py', 'old': 'foo()', 'new': 'bar()'})     # text mode\nexecute('copy',    {'src': 'a.txt', 'dst': 'b.txt'})\nexecute('move',    {'src': 'old.txt', 'dst': 'new.txt'})\nexecute('delete',  {'path': 'file.txt'})\nexecute('mkdir',   {'path': 'new/dir'})\nexecute('ls',      {'path': '.'})\n```\n\n### Search\n\n```python\nexecute('search', {'pattern': '*.py', 'path': '.', 'recursive': True})\n# → {\"files\": [\"src/main.py\", ...]}\n\nexecute('grep', {'pattern': 'TODO:', 'file_pattern': '*.py', 'path': '.'})\n# → {\"matches\": [{\"file\": str, \"line\": int, \"text\": str}, ...]}\n\nexecute('info', {'path': 'file.txt'})\n# → {\"exists\": bool, \"type\": \"file\"|\"dir\", \"size\": int, \"modified\": float}\n```\n\n### Codebase intelligence\n\n```python\n# Scan — supports Python, JS, TS, Go, Rust, Java, C, C++, Ruby, C#, Kotlin, Scala, PHP, Swift, Lua...\nexecute('scan_codebase', {'path': '.'})\n# Writes cache to .agentic_executor/metadata.json\n\nexecute('get_metadata', {'type': 'summary'})\n# → total files, functions, classes, imports\n\nexecute('get_metadata', {'type': 'structure'})\n# → per-file: functions (name, line), classes, imports\n\nexecute('get_metadata', {'type': 'imports'})\n# → import graph: who imports whom (bidirectional)\n\nexecute('get_metadata', {'type': 'all', 'filter': {'file': 'src/main.py'}})\n# → single-file detail\n```\n\n### Process\n\n```python\nexecute('run', {'cmd': 'pytest tests/', 'timeout': 60})\n# → {\"stdout\": str, \"stderr\": str, \"returncode\": int}\n```\n\n---\n\n## Usage patterns\n\n### Batch operations\n\n```python\npython -m agentic_executor.cli --thought-stdin \u003c\u003c'EOF'\nfiles = execute('search', {'pattern': 'test_*.py'})\n\nfor f in files['data']['files']:\n    result = execute('read', {'path': f, 'lines': 3})\n    if result['success']:\n        print(f\"--- {f} ---\")\n        for line in result['data']['lines']:\n            print(line)\nEOF\n```\n\n### Metadata-driven analysis\n\n```python\npython -m agentic_executor.cli --thought-stdin \u003c\u003c'EOF'\nexecute('scan_codebase', {'path': '.'})\nmeta = execute('get_metadata', {'type': 'structure'})\n\n# Find the most complex files\nby_size = sorted(\n    ((path, len(data['functions'])) for path, data in meta['data']['files'].items()),\n    key=lambda x: x[1], reverse=True\n)\nfor path, count in by_size[:5]:\n    print(f\"{count:3}  functions  {path}\")\nEOF\n```\n\n### Conditional logic + cache\n\n```python\npython -m agentic_executor.cli --thought-stdin \u003c\u003c'EOF'\ninfo = execute('info', {'path': '.agentic_executor/metadata.json'})\n\nif not info['data']['exists']:\n    execute('scan_codebase', {'path': '.'})\n\nmeta = execute('get_metadata', {'type': 'summary'})\ns = meta['data']['summary']\nprint(f\"Files: {s['total_files']}  Functions: {s['total_functions']}  Classes: {s['total_classes']}\")\nEOF\n```\n\n### Orchestrate external tools\n\n```python\npython -m agentic_executor.cli --thought-stdin \u003c\u003c'EOF'\n# Run any CLI tool and process its output with Python\nresult = execute('run', {'cmd': 'git log --oneline -10'})\nif result['success']:\n    commits = result['data']['stdout'].strip().split('\\n')\n    print(f\"Last {len(commits)} commits:\")\n    for c in commits:\n        print(f\"  {c}\")\nEOF\n```\n\n### Error handling\n\n```python\nresult = execute('read', {'path': 'file.txt'})\n\nif result['success']:\n    print(result['data']['content'])\nelse:\n    print(f\"Error: {result['error']}\")\n    # fallback logic\n```\n\n---\n\n## Multi-language support\n\nWithout tree-sitter (default): Python files via `ast`, other languages via regex patterns.  \nWith `pip install \"agentic-executor[languages]\"`: accurate parsing for 20+ languages.\n\n| Language | Extension | Parser |\n|----------|-----------|--------|\n| Python | `.py` | tree-sitter / ast |\n| JavaScript | `.js .jsx .mjs` | tree-sitter / regex |\n| TypeScript | `.ts .tsx` | tree-sitter / regex |\n| Go | `.go` | tree-sitter / regex |\n| Rust | `.rs` | tree-sitter / regex |\n| Java | `.java` | tree-sitter / regex |\n| C / C++ | `.c .h .cpp .hpp` | tree-sitter / regex |\n| Ruby | `.rb` | tree-sitter / regex |\n| C# | `.cs` | tree-sitter / regex |\n| Kotlin | `.kt` | tree-sitter / regex |\n| Scala | `.scala` | tree-sitter / regex |\n| PHP | `.php` | tree-sitter / regex |\n| Swift | `.swift` | tree-sitter / regex |\n| Lua | `.lua` | tree-sitter / regex |\n| Elixir, Bash, R, Dart | ... | regex |\n\nTo install tree-sitter parsers separately:\n\n```bash\nexec-install --languages        # 9 essential languages\nexec-install --full             # all 16\n```\n\n---\n\n## CLI reference\n\n```bash\n# Execute a thought inline\npython -m agentic_executor.cli --thought \"result = execute('ls', {'path': '.'}); print(result['data'])\"\n\n# Execute from stdin (recommended for multi-line code)\npython -m agentic_executor.cli --thought-stdin \u003c\u003c'EOF'\n# your Python code\nEOF\n\n# JSON output (for subprocess use)\npython -m agentic_executor.cli --thought \"...\" --json-output\n\n# Show available commands\npython -m agentic_executor.cli --help-commands\n```\n\nUse `--thought-stdin` with heredoc for any script longer than one line or containing quotes. It avoids all shell escaping issues.\n\n---\n\n## Tips\n\n**Raw strings for file content with escape sequences:**\n\n```python\n# Wrong — double escaping needed\ncontent = 'def f():\\n    print(\"hello\")'\n\n# Right — raw string, no escaping\ncontent = r'''\ndef f():\n    print(\"hello\")\n'''\nexecute('write', {'path': 'f.py', 'content': content})\n```\n\n**Reading large files:**\n\n`read` always returns `result['data']['content']` (str) — even when the file\nis truncated. Check `truncated` and use `next_start` to continue:\n\n```python\nresult = execute('read', {'path': 'big.py'})    # up to 200 lines, always 'content'\ndata = result['data']\n\nif data.get('truncated'):\n    # fetch the rest — next_start points to the first unread line\n    rest = execute('read', {'path': 'big.py',\n                            'start': data['next_start'],\n                            'end':   data['total_lines']})\n    full = data['content'] + '\\n'.join(rest['data']['lines'])\n\n# Or skip the loop entirely:\nresult = execute('read', {'path': 'big.py', 'full': True})\n```\n\n**Scan before querying metadata:**\n\n```python\nexecute('scan_codebase', {'path': '.'})   # always first\nmeta = execute('get_metadata', {'type': 'summary'})\n```\n\n**Cache location:** `.agentic_executor/metadata.json` — add to `.gitignore`.\n\n---\n\n## Project structure\n\n```\nagentic_executor/\n├── __init__.py          public API\n├── cli.py               --thought / --thought-stdin interface\n├── install.py           exec-install command\n├── skills/\n│   └── exec/\n│       └── skill.md     /exec skill for Claude Code and others\n└── code_parts/\n    ├── executor.py      core execute() function\n    └── commands.py      14 commands + multi-language scanner\n\npyproject.toml           pip packaging\n```\n\n---\n\n## When to use it\n\nUse Agentic Executor when the task needs **more than two steps or a loop**.  \nFor single reads or writes, use your agent's native tools directly — they're simpler.\n\n---\n\n\u003cdiv align=\"center\"\u003e\n\n*Part of the [Logeion](https://github.com/5005-69) projects*\n\n\u003c/div\u003e\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2F5005-69%2Flogeion-agentic-executor","html_url":"https://awesome.ecosyste.ms/projects/github.com%2F5005-69%2Flogeion-agentic-executor","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2F5005-69%2Flogeion-agentic-executor/lists"}