semvec/pypi-packages huggingface dataset:
fractal-graph-react-agent 0.0.0
Portable ReAct agent graph with MCP tools and RAG — part of the fractal-agent-graphs catalog
License: MIT
Requires Python: <3.13,>=3.11.0
Keywords: langgraph, langchain, mcp, agent, rag, react, fractal

# fractal-graph-react-agent

ReAct agent with MCP tools — part of the [fractal-agents-runtime](https://github.com/l4b4r4b4b4/fractal-agents-runtime) graph catalog.

## Overview

This package provides a portable, self-contained ReAct agent graph built on LangGraph with:

- **MCP tool integration** — connects to Model Context Protocol servers for extensible tool use
- **RAG tool factory** — creates retrieval-augmented generation tools from document collections
- **OAuth token exchange** — handles MCP server authentication with token caching
- **Multi-provider LLM support** — OpenAI, Anthropic, Google, and custom OpenAI-compatible endpoints

## Installation

```bash
uv add fractal-graph-react-agent
```

## Usage

The graph is a portable factory function that accepts a `RunnableConfig` and optional persistence components via dependency injection:

```python
from react_agent import graph
from langchain_core.runnables import RunnableConfig

# Build the agent graph — runtime injects persistence
config = RunnableConfig(configurable={"model_name": "openai:gpt-4o"})
agent = await graph(config, checkpointer=my_checkpointer, store=my_store)

# Invoke
result = await agent.ainvoke({"messages": [{"role": "user", "content": "Hello!"}]})
```

### Dependency Injection

The `graph()` factory uses dependency injection for persistence — it never imports from any specific runtime:

```python
# The runtime (e.g., Robyn server) creates and injects these:
from my_runtime.database import get_checkpointer, get_store

agent = await graph(
    config,
    checkpointer=get_checkpointer(),  # Thread-level conversation memory
    store=get_store(),                  # Cross-thread long-term memory
)
```

When `checkpointer` and `store` are `None` (the default), the agent runs without persistence — useful for testing or stateless invocations.

## Configuration

The graph is configured via `RunnableConfig.configurable`:

| Key | Type | Default | Description |
|-----|------|---------|-------------|
| `model_name` | `str` | `"openai:gpt-4o"` | LLM provider and model |
| `temperature` | `float` | `0.7` | Sampling temperature |
| `max_tokens` | `int` | `4000` | Maximum generation tokens |
| `system_prompt` | `str` | Generic helpful assistant | System prompt |
| `mcp_config` | `dict` | `None` | MCP server configuration |
| `rag` | `dict` | `None` | RAG collection configuration |
| `base_url` | `str` | `None` | Custom OpenAI-compatible endpoint |

## Architecture

This package is part of the 3-layer architecture:

```
apps/          → Thin HTTP wrappers (Robyn, FastAPI, etc.)
  ↓ depends on
graphs/        → Portable agent architectures (this package)
  ↓ depends on
infra/         → Shared runtime infrastructure (tracing, auth, store namespace)
```

Graphs have **zero coupling** to any runtime — they can be deployed to LangGraph Platform, embedded in any server framework, or run standalone.

## License

MIT
degirum-tools 1.1.0
Tools for PySDK
License: MIT
Requires Python: >=3.8

# degirum_tools - DeGirum utilities for PySDK

[![Unit Tests](https://github.com/DeGirum/degirum_tools/actions/workflows/test.yml/badge.svg)](https://github.com/DeGirum/degirum_tools/actions/workflows/test.yml)
[![pre-commit](https://img.shields.io/badge/pre--commit-enabled-brightgreen?logo=pre-commit)](https://github.com/pre-commit/pre-commit)


DeGirum Tools extends [PySDK](https://docs.degirum.com/pysdk) with a kit for building multi-threaded, low-latency media pipelines.
Where PySDK focuses on running a single model well, DeGirum Tools focuses on everything around it: video ingest, pre- and post-processing, multi-model fusion, result annotation, stream routing, and more.

In one sentence:

DeGirum Tools is a flow-based mini-framework that lets you prototype complex AI applications in a few dozen lines of Python.

Features:

* [Model Registry](https://docs.degirum.com/degirum-tools/model_registry)
* [Inference Support Utilities](https://docs.degirum.com/degirum-tools/inference_support)
* [Compound Models](https://docs.degirum.com/degirum-tools/compound_models)
* [Analyzers](https://docs.degirum.com/degirum-tools/analyzers)
* [Streams, Gizmos, Compositions](https://docs.degirum.com/degirum-tools/streams)
* [Support Modules](https://docs.degirum.com/degirum-tools/support)
* [Remote Assets](https://docs.degirum.com/degirum-tools/remote-assets)


## License

[MIT License](https://github.com/DeGirum/degirum_tools/blob/main/LICENSE)

> NOTE: This package heavily depends on DeGirum PySDK, which has [separate EULA](https://docs.degirum.com/pysdk/eula)

## Installation

`pip install -i https://pkg.degirum.com degirum-tools`

## Documentation

[DeGirum Docs | DeGirum Tools](https://docs.degirum.com/degirum-tools/)