{"id":30660678,"url":"https://github.com/ashenfad/agex","last_synced_at":"2026-05-07T07:08:28.777Z","repository":{"id":311246741,"uuid":"1005703744","full_name":"ashenfad/agex","owner":"ashenfad","description":"Library-friendly Agents","archived":false,"fork":false,"pushed_at":"2026-05-07T04:02:15.000Z","size":25364,"stargazers_count":43,"open_issues_count":1,"forks_count":5,"subscribers_count":0,"default_branch":"main","last_synced_at":"2026-05-07T06:11:18.515Z","etag":null,"topics":["agentic-framework","code-execution","llm","python","sandbox"],"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/ashenfad.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":"docs/roadmap/faded_memory.md","authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2025-06-20T17:02:09.000Z","updated_at":"2026-05-07T04:02:13.000Z","dependencies_parsed_at":"2025-12-31T06:00:10.155Z","dependency_job_id":"86136679-a82b-4546-a066-f98743356c7e","html_url":"https://github.com/ashenfad/agex","commit_stats":null,"previous_names":["ashenfad/agex"],"tags_count":39,"template":false,"template_full_name":null,"purl":"pkg:github/ashenfad/agex","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ashenfad%2Fagex","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ashenfad%2Fagex/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ashenfad%2Fagex/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ashenfad%2Fagex/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/ashenfad","download_url":"https://codeload.github.com/ashenfad/agex/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ashenfad%2Fagex/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":32726730,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-07T02:14:30.463Z","status":"ssl_error","status_checked_at":"2026-05-07T02:14:29.405Z","response_time":62,"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":["agentic-framework","code-execution","llm","python","sandbox"],"created_at":"2025-08-31T14:12:34.702Z","updated_at":"2026-05-07T07:08:28.762Z","avatar_url":"https://github.com/ashenfad.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# agex: Library-Friendly Agents\n\n`agex` (a portmanteau of **age**nt **ex**ecution) is a Python library for building AI agents that work directly with your code.\n\nYou define a typed Python function with `@task` and the agent fills it in. It writes sandboxed Python that calls into the modules you've whitelisted, returning real Python objects (DataFrames, Plotly figures, your Pydantic models) that flow back into your code unchanged. There's no JSON serialization at the boundary and no separate runtime to deploy: agex runs inside your application's Python process.\n\nBecause the sandbox is pure-Python AST rewriting, the same agent code runs in-process, in a subprocess, in a kernel-isolated worker, or (via Pyodide) entirely in a browser tab. [agex-studio](https://agex.studio) is the proof-of-concept: pandas, scikit-learn, plotly, and a chat agent all running client-side with no backend.\n\n```python\nimport pandas as pd\nfrom agex import Agent\n\nagent = Agent()\nagent.module(pd)\n\n@agent.task\ndef summarize(df: pd.DataFrame) -\u003e dict[str, float]:\n    \"\"\"Return summary statistics for the numeric columns.\"\"\"\n    pass\n\nstats = summarize(my_dataframe)  # real dict[str, float]\n```\n\n![Demo of an agex agent returning pandas DataFrames and plotly figures in an IPython REPL](docs/assets/teaser.gif)\n\n## What you get\n\n- **Typed function tasks** - `@task` declares the input/output contract; the agent fulfills it.\n- **Curated Python environment** - whitelist exactly which modules and classes the agent can use, with per-member visibility.\n- **Versioned workspace** - virtual filesystem, the agent's session memory, and event log are all kvgit-backed, with checkpoints and time-travel.\n- **Multi-agent orchestration** - coordinate agents with regular Python control flow; sub-agents are just functions.\n- **Flexible execution** - in-process by default; subprocess, kernel-isolated, browser (Pyodide), or remote ([Modal](https://modal.com/), HTTP) when you need them.\n\nFor a deeper dive, see the [agex101 tutorial](https://ashenfad.github.io/agex/examples/agex101/) or the [geospatial routing example](https://ashenfad.github.io/agex/examples/routing/) for multi-library integration. For a NiceGUI integration demo, see [`agex-ui`](https://github.com/ashenfad/agex-ui).\n\n## Documentation\n\nComplete documentation is hosted at **[ashenfad.github.io/agex](https://ashenfad.github.io/agex/)**.\n\nKey sections:\n- **[📚 Quick Start Guide](https://ashenfad.github.io/agex/quick-start/)**\n- **[🔭 The Big Picture](https://ashenfad.github.io/agex/concepts/big-picture/)**\n- **[💡 Examples](https://ashenfad.github.io/agex/examples/overview/)**\n- **[📖 API Reference](https://ashenfad.github.io/agex/api/overview/)**\n\n## Installation\n\nInstall agex with your preferred LLM provider:\n\n```bash\npip install \"agex[openai]\"        # OpenAI models\npip install \"agex[anthropic]\"     # Anthropic Claude models\npip install \"agex[gemini]\"        # Google Gemini models\n\n# Or with all providers\npip install \"agex[all-providers]\"\n```\n\n## Project Status\n\nThis is a hobby project in active development. The core concepts are stabilizing but the API should be considered experimental.\n\nIf you're looking for a more battle-tested library built on the same \"agents-that-think-in-code\" idea, [`smolagents`](https://github.com/huggingface/smolagents) (Hugging Face) is the closest cousin and a good choice. agex explores a different shape: an embeddable library you import into your application, with typed function contracts and a pure-Python sandbox that runs anywhere Python runs (including the browser).\n\n## Built On\n\nagex is composed of several focused libraries that can also be used independently:\n\n| Library | Purpose |\n|---------|---------|\n| [sandtrap](https://github.com/ashenfad/sandtrap) | In-process Python sandbox via AST rewriting |\n| [kvgit](https://github.com/ashenfad/kvgit) | Versioned key-value store with git-like semantics |\n| [monkeyfs](https://github.com/ashenfad/monkeyfs) | Filesystem interception via monkey-patching |\n| [termish](https://github.com/ashenfad/termish) | Virtual terminal with shell-like commands |\n| [reprobate](https://github.com/ashenfad/reprobate) | Budget-controlled repr for Python objects |\n\n## Contributing\n\nBug reports, ideas, and pull requests welcome - see [GitHub Issues](https://github.com/ashenfad/agex/issues) or the [Contributing Guide](CONTRIBUTING.md).\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fashenfad%2Fagex","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fashenfad%2Fagex","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fashenfad%2Fagex/lists"}