FrootAI SDK — The open glue for AI architecture. Offline access to 16 knowledge modules, 20 solution plays, cost estimation, evaluation, and A/B testing.
Project description
FrootAI — Python SDK
Offline-first access to 16 AI architecture knowledge modules, 20 solution plays, cost estimation, evaluation, and A/B testing. Zero external dependencies.
Install
pip install frootai
Quick Start
from frootai import FrootAI, SolutionPlay, Evaluator
# Search 682KB knowledge base (16 modules across 5 FROOT layers)
client = FrootAI()
results = client.search("RAG architecture")
for r in results:
print(f"[{r['module_id']}] {r['title']} — {r['relevance']} hits")
# Get a specific module
module = client.get_module("R2") # RAG Architecture & Retrieval
print(f"{module['title']}: {module['content_length']:,} chars")
# List all FROOT layers
for layer in client.list_layers():
print(f"{layer['emoji']} {layer['name']} ({len(layer['modules'])} modules)")
# Estimate Azure costs
cost = client.estimate_cost("01-enterprise-rag", scale="prod")
print(f"${cost['monthly_total']}/mo")
# Browse 20 solution plays
plays = SolutionPlay.all()
ready = SolutionPlay.ready() # 3 production-ready
by_layer = SolutionPlay.by_layer("R") # Reasoning layer plays
Features
Knowledge Search (offline, no API calls)
client = FrootAI()
# Full-text search across 16 modules (643KB of real content)
results = client.search("embeddings", max_results=5)
# Get module by ID
mod = client.get_module("O2") # AI Agents & Microsoft Agent Framework
# List all modules
for m in client.list_modules():
print(f"{m['emoji']} {m['id']} {m['title']} ({m['content_length'] // 1024}KB)")
# Extract a specific section
section = client.get_module_section("F1", "Table of Contents")
Glossary (159+ terms extracted from content)
# Look up a term
term = client.lookup_term("temperature")
# Search glossary
terms = client.search_glossary("embedding", max_results=10)
Cost Estimation
# Estimate monthly Azure costs for a solution play
cost = client.estimate_cost("01-enterprise-rag", scale="dev")
# {'play': '01-enterprise-rag', 'scale': 'dev', 'monthly_total': 430, 'breakdown': {...}}
cost = client.estimate_cost("01-enterprise-rag", scale="prod")
# {'monthly_total': 3600, 'breakdown': {'openai-gpt4o': 2500, 'ai-search-standard': 750, ...}}
Solution Plays (20 pre-tuned architecture blueprints)
from frootai.plays import SolutionPlay
play = SolutionPlay.get("03")
print(f"{play.name}: {play.description}")
print(f"Infrastructure: {play.infra}")
print(f"Tuning params: {play.tuning}")
print(f"Related modules: {play.modules}")
# Filter by FROOT layer
orchestration_plays = SolutionPlay.by_layer("O_ORCH")
Evaluation (quality gates)
from frootai import Evaluator
evaluator = Evaluator()
scores = {"groundedness": 4.5, "relevance": 3.2, "coherence": 4.1, "fluency": 4.8}
results = evaluator.check_thresholds(scores)
print(evaluator.summary(scores))
# 3/4 checks passed (relevance 3.2 < threshold 4.0)
A/B Testing (prompt experiments)
from frootai.ab_testing import PromptExperiment, PromptVariant
# You provide the model function — no fake scores
def my_model(system_prompt, query):
return call_your_llm(system_prompt=system_prompt, user_message=query)
def my_scorer(query, response):
return {"groundedness": 4.5, "relevance": 4.0}
experiment = PromptExperiment(
name="system-prompt-v2",
variants=[
PromptVariant("control", "You are a helpful assistant."),
PromptVariant("expert", "You are an Azure AI expert. Cite sources."),
],
)
results = experiment.run(["What is RAG?"], model_fn=my_model, scorer_fn=my_scorer)
print(f"Winner: {experiment.pick_winner(results)}")
CLI
frootai plays # List all 20 solution plays
frootai plays --ready # Show production-ready plays only
frootai plays --layer R # Filter by FROOT layer
frootai search "embeddings" # Search knowledge base
frootai modules # List all 16 modules with sizes
frootai glossary temperature # Look up a term
frootai cost 01-enterprise-rag # Estimate Azure costs
frootai cost 01-enterprise-rag --scale prod
frootai --version # Show version
What's Inside
- 16 knowledge modules (643KB) across 5 FROOT layers: Foundations, Reasoning, Orchestration, Operations, Transformation
- 20 solution plays with infrastructure, tuning parameters, and module mapping
- 159+ glossary terms extracted from module content
- Cost estimation for 10 plays with dev/prod breakdowns
- Evaluation framework with configurable thresholds
- A/B testing framework with real model callbacks (no fake scores)
- Zero external dependencies — pure Python stdlib
FROOT Layers
| Layer | Emoji | Name | Modules |
|---|---|---|---|
| F | 🌱 | Foundations | F1-F4 (GenAI, LLMs, Glossary, Agentic OS) |
| R | 🪵 | Reasoning | R1-R3 (Prompts, RAG, Deterministic AI) |
| O_ORCH | 🌿 | Orchestration | O1-O3 (Semantic Kernel, Agents, MCP) |
| O_OPS | 🏗️ | Operations | O4-O6 (Platform, Infrastructure, Copilot) |
| T | 🍎 | Transformation | T1-T3 (Fine-Tuning, Responsible AI, Production) |
Links
- Website: frootai.dev
- npm MCP Server: frootai-mcp
- VS Code Extension: frootai.frootai-vscode
- Docker: ghcr.io/frootai/frootai-mcp
- GitHub: github.com/frootai/frootai
- Python MCP Server: frootai-mcp (PyPI)
- Contact: info@frootai.dev
License
MIT — Pavleen Bali
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file frootai-3.4.0.tar.gz.
File metadata
- Download URL: frootai-3.4.0.tar.gz
- Upload date:
- Size: 238.1 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.12.13
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
a56572da383f88aa25afc3b3262b283418105cb58b02c85f60d55d88dc472361
|
|
| MD5 |
01b773da0dd6888f6173e051a8bf380b
|
|
| BLAKE2b-256 |
20b6dd155d12173e7f33afc97c26e330cb1a9f81967ce1d352838949e1902d43
|
File details
Details for the file frootai-3.4.0-py3-none-any.whl.
File metadata
- Download URL: frootai-3.4.0-py3-none-any.whl
- Upload date:
- Size: 239.2 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.12.13
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
53f278c1efdd44c6b8f9b5c76cc9c4325a3db56185485bde2a88443c3051698a
|
|
| MD5 |
70c6ed8b01f1d7901dd0abfda3e3b999
|
|
| BLAKE2b-256 |
ce86fed3332530d1d8711202ad3ccbacf05e7aa19e239133ae50cc4a7f3d3822
|