Metadata-Version: 2.4
Name: agent-actions
Version: 0.1.10
Summary: Declarative YAML-based framework for orchestrating agentic workflows
Project-URL: Homepage, https://github.com/Muizzkolapo/agent-actions
Project-URL: Documentation, https://docs.runagac.com
Project-URL: Repository, https://github.com/Muizzkolapo/agent-actions
Project-URL: Issues, https://github.com/Muizzkolapo/agent-actions/issues
Author: Muizz Kolapo
License: Apache-2.0
License-File: LICENSE
Keywords: agents,ai,anthropic,batch-processing,llm,openai,workflow,yaml
Classifier: Development Status :: 4 - Beta
Classifier: Intended Audience :: Developers
Classifier: License :: OSI Approved :: Apache Software License
Classifier: Programming Language :: Python :: 3.11
Classifier: Programming Language :: Python :: 3.12
Classifier: Programming Language :: Python :: 3.13
Classifier: Topic :: Scientific/Engineering :: Artificial Intelligence
Requires-Python: >=3.11
Requires-Dist: aiofiles<26,>=24.0.0
Requires-Dist: anthropic<2,>=0.30.0
Requires-Dist: beautifulsoup4<5,>=4.12.3
Requires-Dist: cohere<6,>=5.0.0
Requires-Dist: defusedxml<1,>=0.7.1
Requires-Dist: flask-cors<7,>=4.0.1
Requires-Dist: flask<4,>=3.0.3
Requires-Dist: google-api-python-client<3,>=2.130.0
Requires-Dist: google-genai<2,>=1.0.0
Requires-Dist: groq<2,>=0.1.0
Requires-Dist: jinja2<4,>=3.1.0
Requires-Dist: jsonschema<5,>=4.23.0
Requires-Dist: lsprotocol<2026,>=2024.0.0
Requires-Dist: mistralai<3,>=0.1.0
Requires-Dist: networkx<4,>=3.3
Requires-Dist: numpy<3,>=1.26.4
Requires-Dist: ollama<1,>=0.1.0
Requires-Dist: openai<3,>=1.26.0
Requires-Dist: openpyxl<4,>=3.1.2
Requires-Dist: pandas<4,>=2.2.2
Requires-Dist: portalocker<4,>=2.8.2
Requires-Dist: pydantic-settings<3,>=2.4.0
Requires-Dist: pydantic<3,>=2.8.0
Requires-Dist: pygls<3,>=2.0.0
Requires-Dist: pyparsing<4,>=3.1.1
Requires-Dist: pypdf<7,>=4.0.0
Requires-Dist: python-docx<2,>=1.1.2
Requires-Dist: python-dotenv<2,>=1.0.1
Requires-Dist: pyyaml<7,>=6.0.0
Requires-Dist: rich<15,>=13.0.0
Requires-Dist: ruamel-yaml<1,>=0.18.0
Requires-Dist: sentence-transformers<6,>=2.2.2
Requires-Dist: tiktoken<1,>=0.9.0
Provides-Extra: dev
Requires-Dist: ipdb<1,>=0.13.0; extra == 'dev'
Requires-Dist: ipython<10,>=8.0.0; extra == 'dev'
Requires-Dist: mypy<2,>=1.8.0; extra == 'dev'
Requires-Dist: pandas-stubs<4,>=2.0.3; extra == 'dev'
Requires-Dist: pytest-cov<8,>=4.1.0; extra == 'dev'
Requires-Dist: pytest<10,>=7.4.0; extra == 'dev'
Requires-Dist: types-beautifulsoup4<5,>=4.12.0; extra == 'dev'
Requires-Dist: types-pyyaml<7,>=6.0.12; extra == 'dev'
Requires-Dist: types-requests<3,>=2.31.0; extra == 'dev'
Provides-Extra: nlp
Requires-Dist: spacy<4,>=3.0.0; extra == 'nlp'
Description-Content-Type: text/markdown

Declarative LLM orchestration. Define workflows in YAML — each action gets its own model, context window, schema, and pre-check gate. The framework handles DAG resolution, parallel execution, batch processing, and output validation.

> [!WARNING]
> **Experimental** — Under active development. Expect breaking changes. [Open an issue](https://github.com/Muizzkolapo/agent-actions/issues) with feedback.

    Agent Actions lifecycle: Define → Validate → Execute

```yaml
actions:
  - name: extract_features
    intent: "Extract key product features from listing"
    model_vendor: anthropic              # Each action picks its own model
    model_name: claude-sonnet-4-20250514

  - name: generate_description
    dependencies: [extract_features]
    model_vendor: openai                 # Mix vendors in one pipeline
    model_name: gpt-4o-mini
    context_scope:
      observe:
        - extract_features.features      # See only what it needs
      drop:
        - source.raw_html                # Don't waste tokens on noise
```

## Install

```bash
pip install agent-actions
```

## Quick start

```bash
agac init my-project && cd my-project                # scaffold a project
agac init --example contract_reviewer my-project     # or start from an example
agac run -a my_workflow                              # execute
```

## Why not just write Python?

You will, until you have 15 steps, 3 models, batch retry, and a teammate asks what your pipeline does.

| Capability | Agent Actions | Python script | n8n / Make |
|---|---|---|---|
| Per-step model selection | YAML field | Manual wiring | Per-node config |
| Context isolation per step | `observe` / `drop` | You build it | Not available |
| Pre-check guards (skip before LLM call) | `guard:` | If-statements | Post-hoc branching |
| Parallel consensus (3 voters + merge) | 2 lines of YAML | Custom code | Many nodes + JS |
| Schema validation + auto-reprompt | Built in | DIY | Not available |
| Batch processing (1000s of records) | Built in | For-loops | Loop nodes |
| The YAML *is* the documentation | Yes | No | Visual graph |

## Examples

| Example | Pattern | Key Features |
|---|---|---|
| [Review Analyzer](examples/review_analyzer) | Parallel consensus | 3 independent scorers, vote aggregation, guard on quality threshold |
| [Contract Reviewer](examples/contract_reviewer) | Map-reduce | Split clauses, analyze each, aggregate risk summary |
| [Product Listing Enrichment](examples/product_listing_enrichment) | Tool + LLM hybrid | LLM generates copy, tool fetches pricing, LLM optimizes |
| [Book Catalog Enrichment](examples/book_catalog_enrichment) | Multi-step enrichment | BISAC classification, marketing copy, SEO metadata, reading level |
| [Incident Triage](examples/incident_triage) | Parallel consensus | Severity classification, impact assessment, team assignment, response plan |

## Providers

| Provider | Batch | Provider | Batch |
|----------|-------|----------|-------|
| OpenAI | Yes | Groq | Yes |
| Anthropic | Yes | Mistral | Yes |
| Google Gemini | Yes | Cohere | Online only |
| Ollama (local) | Online only | | |

Switch providers per-action by changing `model_vendor`.

## Key capabilities

- **Pre-flight validation** — schemas, dependencies, templates, and credentials checked before any LLM call
- **Batch processing** — route thousands of records through provider batch APIs
- **User-defined functions** — Python tools for pre/post-processing and custom logic
- **Reprompting** — auto-retry when LLM output doesn't match schema
- **Observability** — per-action timing, token counts, and structured event logs
- **Interactive docs** — `agac docs` builds and serves a visual workflow dashboard

## Documentation

- [Full docs](https://docs.runagac.com) — guides, tutorials, reference
- [Configuration](https://docs.runagac.com/docs/reference/configuration/) — YAML schema reference
- [CLI](https://docs.runagac.com/docs/reference/cli/) — all commands and options

## Contributing

```bash
git clone https://github.com/Muizzkolapo/agent-actions.git && cd agent-actions
pip install -e ".[dev]"
pytest
```

See [CONTRIBUTING.md](CONTRIBUTING.md). Report bugs via [Issues](https://github.com/Muizzkolapo/agent-actions/issues).

## License

[Apache License 2.0](LICENSE)
