Metadata-Version: 2.4
Name: greennode-agent-bridge
Version: 1.0.2rc3
Summary: A bridge package for connecting multiple agent frameworks (LangGraph, CrewAI, Microsoft Agent Framework, etc.) with GreenNode AgentBase
Project-URL: Homepage, https://github.com/vngcloud/greennode-agent-bridge
Project-URL: Bug Tracker, https://github.com/vngcloud/greennode-agent-bridge/issues
Project-URL: Documentation, https://github.com/vngcloud/greennode-agent-bridge
Author-email: GreenNode <opensource@greennode.ai>
License: Apache-2.0
Classifier: Development Status :: 3 - Alpha
Classifier: Intended Audience :: Developers
Classifier: License :: OSI Approved :: Apache Software License
Classifier: Operating System :: OS Independent
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.10
Classifier: Programming Language :: Python :: 3.11
Classifier: Programming Language :: Python :: 3.12
Classifier: Programming Language :: Python :: 3.13
Classifier: Topic :: Scientific/Engineering :: Artificial Intelligence
Classifier: Topic :: Software Development :: Libraries :: Python Modules
Requires-Python: <4.0,>=3.10
Requires-Dist: greennode-agentbase>=1.0.0
Requires-Dist: typing-extensions>=4.0.0; python_version < '3.11'
Provides-Extra: agent-framework
Requires-Dist: agent-framework-core==1.0.0b260212; extra == 'agent-framework'
Provides-Extra: langgraph
Requires-Dist: langgraph-checkpoint<5.0.0,>=3.0.0; extra == 'langgraph'
Requires-Dist: langgraph>=1.0.0; extra == 'langgraph'
Description-Content-Type: text/markdown

# GreenNode Agent Bridge

A bridge package for connecting multiple agent frameworks (LangGraph, CrewAI, Microsoft Agent Framework, etc.) with [GreenNode AgentBase](https://github.com/vngcloud/greennode-agentbase). Use your preferred agent framework while persisting state and memory in AgentBase Memory and Runtime services.

## Features

- **Framework adaptors** – Integrate agent frameworks with GreenNode AgentBase Memory and Runtime.
- **Optional extras** – Install only the frameworks you use; extras are isolated so installing one does not pull in others.
- **LangGraph support** – First-class support for LangGraph with:
  - **AgentBaseMemoryEvents** – A `BaseCheckpointSaver` that persists LangGraph checkpoints as events in AgentBase Memory.
  - **AgentBaseMemoryRecords** – A `BaseStore` that saves chat messages as conversational events and retrieves memories via semantic search (embedding and processing run in AgentBase Memory).

## Requirements

- Python 3.10+
- [GreenNode AgentBase](https://github.com/vngcloud/greennode-agentbase) (core dependency)

## Installation

**Base package** (AgentBase only; no framework adaptors):

```bash
pip install greennode-agent-bridge
```

**With LangGraph support**:

```bash
pip install "greennode-agent-bridge[langgraph]"
```

Other extras (e.g. CrewAI) may be added in future releases. Installing one extra does not install packages from other extras.

## Usage

### LangGraph checkpoint and store

When the `[langgraph]` extra is installed, you can use AgentBase Memory as a checkpoint saver and as a store for conversation and memory:

```python
from greennode_agent_bridge import AgentBaseMemoryEvents, AgentBaseMemoryRecords

# Checkpoint saver for LangGraph (persists graph state to AgentBase Memory)
checkpointer = AgentBaseMemoryEvents(
    memory_id="your-memory-id",
    # optional: memory_client=client,
)

# Store for chat messages and semantic memory (saves events, retrieves via AgentBase)
store = AgentBaseMemoryRecords(
    memory_id="your-memory-id",
)

# Use with your LangGraph graph
# graph = ... .compile(checkpointer=checkpointer)
# app with store for memory operations
```

Configure `memory_id` (and optionally credentials/client) according to your [AgentBase Memory](https://github.com/vngcloud/greennode-agentbase) setup.

### Without optional dependencies

If you import LangGraph types without installing the `[langgraph]` extra, the package raises an error that tells you to install `greennode-agent-bridge[langgraph]`.

## Development

- **Lint/format:** [Ruff](https://docs.astral.sh/ruff/)
- **Type checking:** [mypy](https://mypy-lang.org/)
- **Tests:** [pytest](https://pytest.org/)

With [uv](https://docs.astral.sh/uv/):

```bash
uv sync --group dev --group build
uv run ruff check src
uv run pytest
```

## License

Apache-2.0. See [LICENSE](LICENSE) for details.

## Links

- [Homepage](https://github.com/vngcloud/greennode-agent-bridge)
- [Bug tracker](https://github.com/vngcloud/greennode-agent-bridge/issues)
- [GreenNode AgentBase](https://github.com/vngcloud/greennode-agentbase)
