Metadata-Version: 2.4
Name: synagent
Version: 0.0.1
Summary: Utility for reaction modeling using graph grammar
Project-URL: homepage, https://github.com/TieuLongPhan/SynAgent
Project-URL: source, https://github.com/TieuLongPhan/SynAgent
Project-URL: issues, https://github.com/TieuLongPhan/SynAgent/issues
Project-URL: documentation, https://SynAgent.readthedocs.io/en/latest/
Author-email: Tieu Long Phan <tieu@bioinf.uni-leipzig.de>
License-File: LICENSE
Classifier: License :: OSI Approved :: MIT License
Classifier: Operating System :: OS Independent
Classifier: Programming Language :: Python :: 3
Requires-Python: >=3.11
Requires-Dist: synkit>=1.0.1
Provides-Extra: all
Requires-Dist: numpy>=2.2.0; extra == 'all'
Requires-Dist: pandas>=1.5.3; extra == 'all'
Provides-Extra: docs
Requires-Dist: sphinx-rtd-theme; extra == 'docs'
Requires-Dist: sphinx>=6.0; extra == 'docs'
Requires-Dist: sphinxcontrib-bibtex; extra == 'docs'
Description-Content-Type: text/markdown

SynAgent
========

SynAgent is a proof-of-concept agent that orchestrates multiple Syn™ ecosystem
packages: **SynKit**, **SynRBL**, **SynTemp**, **SynCat**, **SynRFP**, and
**SynRXN**.  It wraps each package into a standard tool interface and
provides a simple agent core that sequences these tools for end-to-end
reaction informatics workflows.

Features
--------

- **SynRBL**: Rule- and MCS-based reaction rebalancing.
- **SynKit**: Reaction canonicalization and mechanistic transition graphs.
- **SynTemp**: High-accuracy reaction template extraction with consensus atom mapping.
- **SynCat**: Graph-based reaction classification via cross-attention models.
- **SynRFP**: Mapping-free, permutation-invariant reaction fingerprints.
- **SynRXN**: Reproducible reaction datasets and splits.

Structure
---------

- ``synagent/``: Core package providing the agent (``agent.py``), registry
  (``registry.py``) and tool wrappers.
  - ``tools/``: Implementations of each tool wrapper and a base protocol.
- ``README.md``: This document describing the package.

Usage
-----

1. **Register tools**: Instantiate a :class:`~synagent.registry.ToolRegistry`
   and register imported tool instances from :mod:`synagent.tools`.
2. **Create an agent**: Instantiate :class:`~synagent.agent.AgentCore`
   with the registry.
3. **Build a plan**: Create a list of
   :class:`~synagent.agent.PlanStep` objects specifying tool names and
   their parameters.
4. **Run the plan**: Call ``agent.run(plan)`` to execute tool calls
   sequentially.

Example
~~~~~~~

```python
from synagent import ToolRegistry, AgentCore, PlanStep
from synagent.tools import synrbl_balance, synkit_canonicalize

# 1. Register tools
registry = ToolRegistry()
registry.register(synrbl_balance)
registry.register(synkit_canonicalize)

# 2. Initialize agent
agent = AgentCore(registry)

# 3. Build plan
plan = [
    PlanStep("synrbl.balance", {"reaction": "CC=O>>CC(=O)O"}),
    PlanStep("synkit.canonicalize", {"reaction": "CC=O>>CC(=O)O", "with_mt_graph": False}),
]

# 4. Run
result = agent.run(plan)
print(result)
```

Notes
-----

- The actual Syn™ packages must be installed in your environment for the
  wrappers to work.
- Each tool uses lazy imports to avoid unnecessary dependencies until
  invoked.
- Error handling is basic; real-world agents should implement more
  robust failure recovery and logging.

License
-------

This repository is released under the Apache 2.0 License, consistent
with the licensing of the underlying Syn packages.