Fournex Documentation
Deploy Reinforcement Learning Agents at Scale. High performance, multi-tenant, and production ready.
Getting Started
Get up and running with Fournex in minutes. Our platform is designed to be framework-agnostic, supporting Stable-Baselines3, ONNX, and custom PyTorch models out of the box.
# Clone the repository
git clone https://github.com/jorgevee/Fournex.git
cd Fournex
# Start all services (PostgreSQL, MinIO, Redis, API)
docker-compose up -d
# Start the platform
docker-compose up -dfrom fournex import Client
# Response includes agent_id and version_id
# {
# "agent_id": "123e4567-e89b-12d3-a456-426614174000",
# "version_id": "...",
# "artifact_uri": "s3://agents/workspace/agent/v1/model.zip",
# "checksum": "a3d2f8e9...",
# "size_bytes": 10485760
# }
# Upload your trained agent
agent = client.deploy(
name="my-cartpole-agent",
framework="sb3",
model_path="./trained_agent.zip",
obs_space={"type": "box", "shape": [4]},
action_space={"type": "discrete", "n": 2}
)Key Features
Multi-Framework
Native support for SB3, ONNX, RLLib, and PyTorch.
High Performance
C-optimized inference engine delivering 85M+ ops/sec.
Stateful & Stateless
Support for both reactive agents and environment sessions.
Multi-tenant
Built-in workspace isolation, API keys, and rate limiting.
System Architecture
Fournex follows a three-phase implementation strategy to ensure scalability and reliability.
Phase 1: Foundation
Complete- Multi-tenant PostgreSQL database (12 tables)
- C performance layer (405M+ ops/sec memory operations)
- pybind11 Python bindings with zero-copy NumPy
Phase 2: Inference Engine
Complete- FastAPI async service (10K+ RPS per instance)
- Two-tier caching (LRU + Redis)
- Prometheus metrics and rate limiting
Performance Benchmarks
| Operation | Throughput | Use Case |
|---|---|---|
| Arena Allocator | 405M ops/sec | Bulk tensor allocations |
| Ring Buffer | 253M ops/sec | Trajectory storage |
| Memory Pool | 319M ops/sec | Small allocations |
| Tensor Add | 64M ops/sec | Vector math |
API Reference
Upload and register a new agent. Supports SB3 and ONNX formats.
Stateless inference - send observation, receive action prediction.
Step the environment. Agent automatically selects action if not provided.
Deployment
Deploy your agents to production with confidence.