Metadata-Version: 2.4
Name: fred-runtime
Version: 0.1.14
Summary: Runtime adapters and infrastructure wiring for Fred v2 agents.
Author-email: Thales <noreply@thalesgroup.com>
License: Apache-2.0
Project-URL: Homepage, https://fredk8.dev
Project-URL: Repository, https://github.com/ThalesGroup/fred
Classifier: License :: OSI Approved :: Apache Software License
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3 :: Only
Classifier: Operating System :: OS Independent
Requires-Python: <3.13,>=3.12
Description-Content-Type: text/markdown
Requires-Dist: fred-core>=1.3.1
Requires-Dist: fred-sdk>=0.1.1
Requires-Dist: fred-portable>=0.1.1
Requires-Dist: httpx>=0.28.1
Requires-Dist: langchain-mcp-adapters>=0.2.1
Requires-Dist: langfuse>=3.0.0
Requires-Dist: requests<3,>=2.32
Requires-Dist: PyYAML>=6.0
Provides-Extra: app
Requires-Dist: fastapi>=0.116; extra == "app"
Provides-Extra: dev
Requires-Dist: bandit>=1.8.6; extra == "dev"
Requires-Dist: basedpyright==1.31.0; extra == "dev"
Requires-Dist: detect-secrets>=1.5.0; extra == "dev"
Requires-Dist: pytest>=8.4.2; extra == "dev"
Requires-Dist: pytest-cov>=6.2.1; extra == "dev"
Requires-Dist: ruff>=0.12.5; extra == "dev"

# Fred Runtime

`fred-runtime` provides the execution layer and infrastructure adapters for Fred v2 agents.

It complements:

- `fred-sdk` (https://pypi.org/project/fred-sdk/) — agent authoring APIs  
- Backend implementations — databases, Knowledge Flow, MCP, tracing, security, and other platform services

---

## Overview

The Fred architecture is based on a clear separation between **agent definition** and **agent execution**.

### `fred-sdk` — Authoring layer

Developers use `fred-sdk` to define and structure agents. This includes:

- Chat-oriented profile agents  
- Multi-agent or team-based architectures (comparable to frameworks such as Agno)  
- Workflow-driven agents  

This layer provides:

- Agent interfaces and abstractions  
- Tool integration patterns  
- Prompt and behavior definitions  
- Runtime contracts (in abstract form)  

It is intentionally designed to be lightweight, portable, and independent of any specific backend or infrastructure.

---

### `fred-runtime` — Execution layer

`fred-runtime` provides the concrete implementation required to execute agents defined with `fred-sdk`.

Its responsibilities include:

- Checkpointing (e.g., LangGraph state persistence)  
- Tracing and observability  
- Security integration  
- Runtime wiring for tools and external systems (MCP, Knowledge Flow, etc.)  
- Infrastructure adapters (SQL, storage, and related services)  

In summary:

- `fred-sdk` defines agent behavior and structure  
- `fred-runtime` enables their execution in real environments  

---

### Backend / platform layer

The hosting application or platform is responsible for:

- Data storage and persistence  
- API exposure  
- Deployment and operations (local environments, Kubernetes, etc.)  
- Integration with external systems  

---

## Purpose

This package exists to:

- Keep `fred-sdk` clean, stable, and backend-agnostic  
- Centralize runtime logic that would otherwise be duplicated across projects  
- Provide a consistent and production-ready execution layer  
- Enable external agent repositories (such as `rags-v2`) to run Fred agents with minimal setup  

---

## Implementation details

`fred-runtime` relies on:

- LangChain and LangGraph for execution and orchestration  
- Runtime contracts defined in `fred-sdk`  

These dependencies are abstracted so that agent developers can focus on authoring rather than infrastructure concerns.

---

## Scope (initial)

- SQL-backed checkpointer for LangGraph runtimes  
- Runtime helper utilities extracted from the agentic backend  

Additional runtime adapters will be progressively integrated as the platform evolves.

---

## Developer workflow

Typical usage:

```bash
pip install fred-sdk fred-runtime
```

1. Use `fred-sdk` to define agents  
2. Use `fred-runtime` to execute them within a configured environment  

---

## Conceptual model

- `fred-sdk`: defines what the agent does  
- `fred-runtime`: defines how the agent runs  
