Building AI agents, atomically
Add dspy integration example and progressive disclosure example
KennyVaneetvelde8a5f38534d7a
diff --git a/atomic-examples/dspy-integration/README.md b/atomic-examples/dspy-integration/README.mdnew file mode 100644index 0000000..c20d904--- /dev/null+++ b/atomic-examples/dspy-integration/README.md@@ -0,0 +1,778 @@+# DSPy + Atomic Agents Integration: A Complete Guide++> **The Best of Both Worlds**: Automatic prompt optimization meets type-safe structured outputs.++This example provides a comprehensive, hands-on walkthrough of why combining DSPy with Atomic Agents produces superior results compared to using either framework alone. We don't just show you *how* to use the integration—we teach you *why* it works and *when* to use each approach.++## Table of Contents++1. [The Problem We're Solving](#the-problem-were-solving)+2. [Quick Start](#quick-start)+3. [Understanding the Frameworks](#understanding-the-frameworks)+4. [The Three Stages](#the-three-stages)+5. [Benchmark Results](#benchmark-results)+6. [Deep Dive: How Each Stage Works](#deep-dive-how-each-stage-works)+7. [The Bridge: DSPyAtomicModule](#the-bridge-dspyatomicmodule)+8. [When to Use Each Approach](#when-to-use-each-approach)+9. [API Reference](#api-reference)+10. [Troubleshooting](#troubleshooting)++---++## The Problem We're Solving++Neither DSPy nor Atomic Agents alone gives you everything you need for production LLM applications:++```+┌─────────────────────────────────────────────────────────────────────────────┐+│ DSPy ALONE │+│ ✓ Automatic prompt optimization (finds what works!) │+│ ✓ Systematic few-shot example selection │+│ ✓ Chain-of-thought reasoning built-in │+│ ✗ No Pydantic ecosystem (validators, serializers, Field constraints) │+│ ✗ Type enforcement is DSPy-specific, not Python-native │+│ ✗ Limited integration with structured output tools like Instructor │+├─────────────────────────────────────────────────────────────────────────────┤+│ ATOMIC AGENTS ALONE │+│ ✓ Full Pydantic ecosystem (validators, serializers, ge/le constraints) │+│ ✓ Instructor integration for robust structured output │+│ ✓ Python-native type safety with runtime validation │+│ ✗ Manual prompt engineering - you're guessing what works │+│ ✗ No systematic way to improve prompts │+│ ✗ Adding few-shot examples requires manual selection │+├─────────────────────────────────────────────────────────────────────────────┤+│ DSPy + ATOMIC AGENTS COMBINED │+│ ✓ Automatic prompt optimization │+│ ✓ Type-safe structured outputs with full Pydantic ecosystem │+│ ✓ Measurable, reproducible improvements │+│ ✓ Production-ready with IDE autocomplete and type checking │+└─────────────────────────────────────────────────────────────────────────────┘+```++### The Real-World Impact++In our benchmark with **60 training examples** and **30 intentionally challenging test cases**:++| Approach | Accuracy | Improvement |+|----------|----------|-------------|+| Raw DSPy (typed signatures) | 73.3% | baseline |+| Raw Atomic Agents | 76.7% | +3.4 pts |+| **DSPy + Atomic Agents** | **86.7%** | **+13.4 pts** |++The combined approach achieved **13.4 percentage points better accuracy** than DSPy alone and **10 percentage points better** than Atomic Agents alone.++---++## Quick Start++```bash+# Navigate to the example directory+cd atomic-examples/dspy-integration++# Install dependencies+uv sync++# Set your OpenAI API key (or create a .env file)+export OPENAI_API_KEY="your-key-here"++# Run the full didactic example+uv run python -m dspy_integration.main+```++The example will walk you through all three stages with detailed explanations, showing you the actual prompts being generated and optimized.++---++## Understanding the Frameworks++### What is DSPy?++DSPy (Declarative Self-improving Python) is a framework for **automatically optimizing LLM prompts**. Instead of manually crafting prompts, you:++1. Define a **Signature** (what inputs and outputs you need)+2. Create a **Module** (how to process the data)+3. Provide **training examples** with correct answers+4. Let DSPy **optimize** the prompts to maximize accuracy++DSPy's key insight: **The best prompt isn't what you think—let data decide.**++```python+import dspy+from typing import Literal++# Define a typed signature+class MovieGenreSignature(dspy.Signature):+ """Classify a movie review into its primary genre."""++ review: str = dspy.InputField(desc="The movie review text")+ genre: Literal["action", "comedy", "drama", "horror", "sci-fi", "romance"] = \+ dspy.OutputField(desc="The primary genre")+ confidence: float = dspy.OutputField(desc="Confidence 0.0-1.0")+ reasoning: str = dspy.OutputField(desc="Brief explanation")++# DSPy automatically:+# 1. Generates prompts from this signature+# 2. Adds type constraints to the prompt+# 3. Optimizes with few-shot examples+```++### What is Atomic Agents?++Atomic Agents is a framework for building **type-safe LLM applications** using Pydantic schemas. It integrates with [Instructor](https://github.com/jxnl/instructor) to guarantee structured outputs:++```python+from pydantic import Field+from typing import Literal+from atomic_agents.base.base_io_schema import BaseIOSchema++class MovieGenreOutput(BaseIOSchema):+ """Output schema for movie genre classification."""++ genre: Literal["action", "comedy", "drama", "horror", "sci-fi", "romance"] = Field(+ ...,+ description="The primary genre of the movie.",+ )+ confidence: float = Field(+ ...,+ ge=0.0, le=1.0, # VALIDATED! Must be between 0 and 1+ description="Confidence score between 0.0 and 1.0",+ )+ reasoning: str = Field(+ ...,+ description="Brief explanation for the classification.",+ )++# Atomic Agents + Instructor guarantees:+# 1. genre is ALWAYS one of the 6 valid options+# 2. confidence is ALWAYS a float between 0.0 and 1.0+# 3. If validation fails, it retries with error feedback+```++### Why Combine Them?++| Feature | DSPy | Atomic Agents | Combined |+|---------|------|---------------|----------|+| Prompt Optimization | ✅ Automatic | ❌ Manual | ✅ Automatic |+| Type Safety | ⚠️ DSPy-specific | ✅ Pydantic | ✅ Pydantic |+| Validation Constraints | ⚠️ Basic | ✅ Full (ge/le/etc) | ✅ Full |+| Few-Shot Selection | ✅ Automatic | ❌ Manual | ✅ Automatic |+| IDE Autocomplete | ⚠️ Partial | ✅ Full | ✅ Full |+| Instructor Integration | ❌ No | ✅ Yes | ✅ Yes |+| Retry on Failure | ❌ No | ✅ Yes | ✅ Yes |++---++## The Three Stages++Our didactic example walks through three approaches to the same task: **classifying movie reviews into genres**.++### Stage 1: Raw DSPy (Properly Implemented)++We use DSPy with **typed signatures** (class-based signatures with `Literal` type constraints). This is DSPy at its best:++```python+from typing import Literal+import dspy++GenreType = Literal["action", "comedy", "drama", "horror", "sci-fi", "romance"]++class MovieGenreSignature(dspy.Signature):+ """Classify a movie review into its primary genre."""++ review: str = dspy.InputField(desc="The movie review text to classify")+ genre: GenreType = dspy.OutputField(desc="The primary genre")+ confidence: float = dspy.OutputField(desc="Confidence score 0.0-1.0")+ reasoning: str = dspy.OutputField(desc="Brief explanation")++# Create classifier with chain-of-thought reasoning+classify = dspy.ChainOfThought(MovieGenreSignature)++# Optimize with training data+optimizer = dspy.BootstrapFewShot(+ metric=genre_match,+ max_bootstrapped_demos=4,+ max_labeled_demos=4,+)+optimized = optimizer.compile(classify, trainset=training_examples)+```++**What DSPy does with Literal types:**++DSPy automatically includes the constraint in the generated prompt:+```+genre (Literal['action', 'comedy', 'drama', 'horror', 'sci-fi', 'romance']):+The primary genre: action, comedy, drama, horror, sci-fi, or romance++# note: the value you produce must exactly match (no extra characters) one of:+# action; comedy; drama; horror; sci-fi; romance+```++**Result: 73.3% accuracy** on our challenging test set.++### Stage 2: Raw Atomic Agents++We use Atomic Agents with a **manually crafted system prompt**:++```python+from atomic_agents.agents.atomic_agent import AtomicAgent, AgentConfig+from atomic_agents.context.system_prompt_generator import SystemPromptGenerator++# Manual prompt - we're guessing what works!+system_prompt = SystemPromptGenerator(+ background=[+ "You are a movie genre classification expert.",+ "You analyze movie reviews and determine the primary genre.",+ "Valid genres are: action, comedy, drama, horror, sci-fi, romance",+ ],+ steps=[+ "Read the review carefully.",+ "Identify key genre indicators.",+ "Consider the overall tone and subject matter.",+ "Select the single most appropriate genre.",+ ],+ output_instructions=[+ "Be decisive - pick ONE primary genre even if multiple could apply.",+ "Confidence should be 0.7-1.0 for clear cases, 0.5-0.7 for ambiguous.",+ ],+)++agent = AtomicAgent[MovieReviewInput, MovieGenreOutput](+ config=AgentConfig(+ client=instructor.from_openai(openai.OpenAI()),+ model="gpt-4o-mini",+ system_prompt_generator=system_prompt,+ )+)+```++**The problem with manual prompts:**+- Is "Be decisive" helping or hurting accuracy?+- Should we add few-shot examples? Which ones?+- Would different wording improve results?+- **Without DSPy, we're just guessing!**++**Result: 76.7% accuracy** - better structure, but limited by manual prompt engineering.++### Stage 3: DSPy + Atomic Agents Combined++We use the **DSPyAtomicModule bridge** to get the best of both:++```python+from dspy_integration.bridge import DSPyAtomicModule, create_dspy_example++# The bridge combines both frameworks+module = DSPyAtomicModule(+ input_schema=MovieReviewInput, # Pydantic input validation+ output_schema=MovieGenreOutput, # Pydantic output structure+ instructions="Classify the movie review into a genre.",+ use_chain_of_thought=True, # DSPy's reasoning capability+)++# Create type-validated training examples+trainset = [+ create_dspy_example(+ MovieReviewInput,+ MovieGenreOutput,+ {"review": "Non-stop explosions and car chases!"},+ {"genre": "action", "confidence": 0.9, "reasoning": "Action keywords"},+ )+ for ex in training_data+]++# Optimize with DSPy+optimizer = dspy.BootstrapFewShot(metric=genre_match)+optimized = optimizer.compile(module, trainset=trainset)++# Get type-safe output+result = optimized.run_validated(review="A touching love story...")+print(result.genre) # Guaranteed Literal type+print(result.confidence) # Guaranteed 0.0-1.0 float+```++**Result: 86.7% accuracy** - optimized prompts + guaranteed structure!++---++## Benchmark Results++### Dataset Composition++**Training Set: 60 examples** (10 per genre)+- Clear, representative examples for learning+- Some nuanced examples to teach edge cases++**Test Set: 30 challenging examples** intentionally designed to be difficult:++| Category | Count | Description |+|----------|-------|-------------|+| Sarcasm & Irony | 5 | Reviews that say the opposite of what they mean |+| Multi-Genre | 6 | Reviews spanning multiple genres (must pick primary) |+| Misleading Signals | 5 | Keywords suggesting wrong genre |+| Subverted Expectations | 5 | Genre setups that don't pay off |+| Subtle/Ambiguous | 5 | Nuanced, hard-to-classify reviews |+| Cultural Context | 4 | References requiring cultural knowledge |++### Example Challenging Test Cases++```python+# Sarcasm - sounds negative but reviewer enjoyed it+"Oh great, another movie where the hero walks away from explosions in slow motion.+How original. Still watched it twice though." # → action++# Multi-genre - sci-fi setting but drama focus+"The robot's sacrifice to save humanity made me sob uncontrollably.+Beautiful storytelling set against a dystopian future." # → sci-fi++# Misleading signals - thriller language but romance theme+"A thriller where the biggest twist was how much I ended up caring+about these characters' relationships." # → romance++# Cultural context - requires knowing references+"John Wick energy but make it about a retired chef defending his restaurant.+Knife fights choreographed like ballet." # → action+```++### Final Results++```+┌────────────────────┬─────────────┬──────────────────────┬─────────────────┐+│ Metric │ Raw DSPy │ Raw Atomic Agents │ DSPy + Atomic │+├────────────────────┼─────────────┼──────────────────────┼─────────────────┤+│ Accuracy │ 73.3% │ 76.7% │ 86.7% │+│ Correct/Total │ 22/30 │ 23/30 │ 26/30 │+│ Prompt Optimization│ ✓ Auto │ ✗ Manual │ ✓ Auto │+│ Type Safety │ ~ DSPy │ ✓ Pydantic │ ✓ Pydantic │+│ Output Validation │ ~ Basic │ ✓ Full │ ✓ Full │+│ Pydantic Ecosystem │ ✗ No │ ✓ Full │ ✓ Full │+│ Few-Shot Selection │ ✓ Auto │ ✗ Manual │ ✓ Auto │+│ IDE Support │ ~ Partial │ ✓ Full │ ✓ Full │+└────────────────────┴─────────────┴──────────────────────┴─────────────────┘+```++---++## Deep Dive: How Each Stage Works++### How DSPy Optimization Works++DSPy's `BootstrapFewShot` optimizer doesn't just use your examples verbatim. Here's what happens:++```+┌─────────────────────────────────────────────────────────────────────────────┐+│ Step 1: Run LLM on Training Examples │+│ │+│ For each training example, DSPy runs the LLM and captures the full │+│ "trace" - including any chain-of-thought reasoning generated. │+└─────────────────────────────────────────────────────────────────────────────┘+ │+ ▼+┌─────────────────────────────────────────────────────────────────────────────┐+│ Step 2: Filter by Metric │+│ │+│ Only traces that produce correct answers are kept. If the LLM got │+│ the genre wrong, that trace is discarded. │+└─────────────────────────────────────────────────────────────────────────────┘+ │+ ▼+┌─────────────────────────────────────────────────────────────────────────────┐+│ Step 3: Select Best Traces │+│ │+│ DSPy selects diverse, high-quality traces as few-shot demonstrations. │+│ These aren't your original examples - they include LLM-generated │+│ reasoning that actually worked! │+└─────────────────────────────────────────────────────────────────────────────┘+ │+ ▼+┌─────────────────────────────────────────────────────────────────────────────┐+│ Step 4: Inject into Future Prompts │+│ │+│ The selected demonstrations are automatically added to prompts, │+│ showing the LLM examples of correct reasoning and outputs. │+└─────────────────────────────────────────────────────────────────────────────┘+```++### How Atomic Agents Validates Output++Atomic Agents uses Instructor under the hood for structured output:++```+┌─────────────────────────────────────────────────────────────────────────────┐+│ Step 1: Schema Conversion │+│ │+│ Your Pydantic schema is converted to JSON Schema and sent to the LLM │+│ along with your prompt. │+└─────────────────────────────────────────────────────────────────────────────┘+ │+ ▼+┌─────────────────────────────────────────────────────────────────────────────┐+│ Step 2: LLM Generation │+│ │+│ The LLM generates output attempting to match the schema. Modern LLMs │+│ (like GPT-4) support function calling which helps with this. │+└─────────────────────────────────────────────────────────────────────────────┘+ │+ ▼+┌─────────────────────────────────────────────────────────────────────────────┐+│ Step 3: Pydantic Validation │+│ │+│ Instructor validates the response against your Pydantic schema: │+│ - Is genre one of the allowed Literal values? │+│ - Is confidence a float between 0.0 and 1.0? │+│ - Are all required fields present? │+└─────────────────────────────────────────────────────────────────────────────┘+ │+ ┌─────────┴─────────┐+ │ │+ VALID │ INVALID+ ▼ ▼+┌─────────────────────────────┐ ┌─────────────────────────────┐+│ Return Pydantic Object │ │ Retry with Error Feedback │+│ │ │ │+│ You get a fully typed, │ │ Instructor tells the LLM │+│ validated result! │ │ what went wrong and retries │+└─────────────────────────────┘ └─────────────────────────────┘+```++### How the Bridge Combines Both++The `DSPyAtomicModule` bridges both frameworks:++```python+class DSPyAtomicModule(dspy.Module):+ """+ Bridges Pydantic schemas with DSPy optimization.++ 1. Converts Pydantic schemas → DSPy signatures+ 2. Enables DSPy optimization (BootstrapFewShot, etc.)+ 3. Returns validated Pydantic objects+ """++ def __init__(+ self,+ input_schema: Type[BaseIOSchema], # Your Pydantic input+ output_schema: Type[BaseIOSchema], # Your Pydantic output+ instructions: str, # Task description+ use_chain_of_thought: bool = True, # Enable reasoning+ ):+ # Convert Pydantic → DSPy signature+ self.signature = create_dspy_signature_from_schemas(+ input_schema, output_schema, instructions+ )++ # Create DSPy predictor+ if use_chain_of_thought:+ self.predictor = dspy.ChainOfThought(self.signature)+ else:+ self.predictor = dspy.Predict(self.signature)++ def forward(self, **kwargs) -> dspy.Prediction:+ """Standard DSPy forward - for optimization."""+ validated_input = self.input_schema(**kwargs)+ return self.predictor(**validated_input.model_dump())++ def run_validated(self, **kwargs) -> BaseIOSchema:+ """Get type-safe Pydantic output."""+ prediction = self(**kwargs)++ # Extract fields and validate with Pydantic+ output_dict = {+ field: getattr(prediction, field)+ for field in self.output_schema.model_fields+ }+ return self.output_schema(**output_dict)+```++---++## The Bridge: DSPyAtomicModule++### Core Functions++#### `create_dspy_signature_from_schemas`++Converts Pydantic schemas to DSPy signatures:++```python+from dspy_integration.bridge import create_dspy_signature_from_schemas++signature = create_dspy_signature_from_schemas(+ input_schema=MovieReviewInput,+ output_schema=MovieGenreOutput,+ instructions="Classify the movie review into its primary genre.",+)++# The signature preserves:+# - Field names and descriptions+# - Type constraints (Literal, float, etc.)+# - Documentation from schema docstrings+```++#### `create_dspy_example`++Creates validated training examples:++```python+from dspy_integration.bridge import create_dspy_example++# This validates both input and output!+example = create_dspy_example(+ MovieReviewInput,+ MovieGenreOutput,+ {"review": "Amazing action sequences!"},+ {"genre": "action", "confidence": 0.95, "reasoning": "Clear action signals"},+)++# If you accidentally put confidence=1.5:+# ValidationError: confidence must be <= 1.0+```++#### `DSPyAtomicModule`++The main bridge class:++```python+from dspy_integration.bridge import DSPyAtomicModule++module = DSPyAtomicModule(+ input_schema=MovieReviewInput,+ output_schema=MovieGenreOutput,+ instructions="Classify the movie review.",+ use_chain_of_thought=True,+)++# Use as DSPy module (for optimization)+prediction = module(review="A love story...")++# Get validated Pydantic output+result = module.run_validated(review="A love story...")+print(type(result)) # MovieGenreOutput+print(result.genre) # Guaranteed valid Literal+```++#### `DSPyAtomicPipeline`++Chain multiple modules together:++```python+from dspy_integration.bridge import DSPyAtomicPipeline++pipeline = DSPyAtomicPipeline([+ ("extract", extraction_module),+ ("analyze", analysis_module),+ ("summarize", summary_module),+])++# Optimize entire pipeline end-to-end+optimized = optimizer.compile(pipeline, trainset=examples)+```++---++## When to Use Each Approach++### Use Raw DSPy When:++- **Quick prototyping** - You want to iterate fast without worrying about schemas+- **Output format doesn't matter** - You'll post-process the outputs anyway+- **Research and experimentation** - You're exploring what's possible+- **Simple outputs** - Just need a string or simple structured data++```python+# Good for DSPy alone: quick iteration+classify = dspy.ChainOfThought("text -> sentiment")+result = classify(text="I love this!")+print(result.sentiment) # Might be "positive", "Positive", "POSITIVE", etc.+```++### Use Raw Atomic Agents When:++- **Need structure NOW** - You don't have time to set up optimization+- **No training data** - You can't optimize without labeled examples+- **Simple enough task** - Manual prompts are good enough+- **Integration priority** - Need Pydantic ecosystem immediately++```python+# Good for Atomic Agents alone: guaranteed structure, no training needed+result = agent.run(input_data)+print(result.sentiment) # Always exactly "positive", "negative", or "neutral"+print(result.score) # Always a float between 0.0 and 1.0+```++### Use DSPy + Atomic Agents When:++- **Have labeled data** - You can optimize with real examples+- **Production systems** - Need both accuracy AND type safety+- **Measurable improvement** - You want to track and improve performance+- **Complex tasks** - Where prompt optimization significantly helps+- **Team collaboration** - Type safety helps multiple developers++```python+# Best of both: optimized prompts + guaranteed structure+module = DSPyAtomicModule(...)+optimized = optimizer.compile(module, trainset=training_data)+result = optimized.run_validated(review="...")++# result.genre is Literal["action", "comedy", ...] - type checker knows this!+# result.confidence is float with 0.0 <= x <= 1.0 - guaranteed!+```++### Decision Flowchart++```+ START+ │+ ▼+ ┌─────────────────────┐+ │ Do you have labeled │+ │ training data? │+ └─────────────────────┘+ │+ ┌───────────────┴───────────────┐+ │ NO │ YES+ ▼ ▼+ ┌─────────────────────┐ ┌─────────────────────┐+ │ Need guaranteed │ │ Need guaranteed │+ │ output structure? │ │ output structure? │+ └─────────────────────┘ └─────────────────────┘+ │ │+ ┌─────────┴─────────┐ ┌─────────┴─────────┐+ │ NO │ YES │ NO │ YES+ ▼ ▼ ▼ ▼+┌─────────┐ ┌─────────────┐ ┌─────────┐ ┌─────────────────┐+│ Raw │ │ Raw Atomic │ │ Raw │ │ DSPy + Atomic │+│ DSPy │ │ Agents │ │ DSPy │ │ Agents │+└─────────┘ └─────────────┘ └─────────┘ │ (RECOMMENDED) │+ └─────────────────┘+```++---++## API Reference++### Schemas (`schemas.py`)++Pre-built schemas for common tasks:++```python+from dspy_integration.schemas import (+ SentimentInputSchema, # text → sentiment analysis+ SentimentOutputSchema,+ QuestionInputSchema, # question + context → answer+ AnswerOutputSchema,+ SummaryInputSchema, # text → summary+ SummaryOutputSchema,+ ClassificationInputSchema, # text + categories → labels+ ClassificationOutputSchema,+)+```++### Bridge (`bridge.py`)++```python+from dspy_integration.bridge import (+ DSPyAtomicModule, # Main bridge class+ DSPyAtomicPipeline, # Chain multiple modules+ create_dspy_signature_from_schemas, # Pydantic → DSPy+ create_dspy_example, # Create training examples+ pydantic_to_dspy_fields, # Convert field definitions+ python_type_to_dspy_type, # Convert Python types+)+```++---++## Troubleshooting++### Common Issues++**1. "API key not found"**+```bash+# Make sure your key is set+export OPENAI_API_KEY="sk-..."++# Or create a .env file in the dspy-integration directory+echo 'OPENAI_API_KEY=sk-...' > .env+```++**2. "Invalid genre output"**++If using raw DSPy without typed signatures, you might get invalid genres. Use class-based signatures with `Literal` types:++```python+# BAD - no type constraints+classify = dspy.ChainOfThought("review -> genre, confidence, reasoning")++# GOOD - Literal type constraint+class MovieGenreSignature(dspy.Signature):+ genre: Literal["action", "comedy", ...] = dspy.OutputField(...)+```++**3. "Validation error in Atomic Agents"**++Instructor retries automatically, but if you consistently get errors:+- Check your schema constraints aren't too restrictive+- Ensure the LLM model supports structured output well+- Consider using a more capable model (GPT-4 > GPT-3.5)++**4. "Optimization not improving accuracy"**++- Add more training examples (at least 20-30)+- Ensure training examples are high quality+- Try different optimizer settings:+ ```python+ optimizer = dspy.BootstrapFewShot(+ max_bootstrapped_demos=6, # Try more demos+ max_labeled_demos=6,+ max_rounds=2, # More optimization rounds+ )+ ```++---++## Project Structure++```+dspy-integration/+├── pyproject.toml # Dependencies (uv/pip)+├── README.md # This file+├── .env # API keys (create this)+└── dspy_integration/+ ├── __init__.py # Package exports+ ├── bridge.py # DSPyAtomicModule implementation+ ├── schemas.py # Reusable Pydantic schemas+ └── main.py # The didactic example+```++---++## Requirements++- Python 3.12++- OpenAI API key+- Dependencies (installed via `uv sync`):+ - `dspy-ai` - DSPy framework+ - `atomic-agents` - Atomic Agents framework+ - `instructor` - Structured output library+ - `pydantic` - Data validation+ - `rich` - Beautiful terminal output++---++## License++MIT License - Part of the Atomic Agents monorepo.++---++## Further Reading++- [DSPy Documentation](https://dspy-docs.vercel.app/)+- [Atomic Agents Documentation](https://github.com/BrainBlend-AI/atomic-agents)+- [Instructor Documentation](https://python.useinstructor.com/)+- [Pydantic Documentation](https://docs.pydantic.dev/)++---++## Contributing++Found a bug or want to improve this example? Please open an issue or PR in the atomic-agents monorepo!diff --git a/atomic-examples/dspy-integration/dspy_integration/__init__.py b/atomic-examples/dspy-integration/dspy_integration/__init__.pynew file mode 100644index 0000000..2381e4a--- /dev/null+++ b/atomic-examples/dspy-integration/dspy_integration/__init__.py@@ -0,0 +1,37 @@+"""+DSPy + Atomic Agents Integration++This module provides a seamless integration between DSPy's declarative prompt optimization+framework and Atomic Agents' type-safe structured output system.++Key Components:+- DSPyAtomicModule: A DSPy module that wraps Atomic Agents for structured outputs+- AtomicSignature: Bridge between Pydantic schemas and DSPy signatures+- Optimization utilities for improving agent performance with few-shot learning+"""++from dspy_integration.bridge import (+ DSPyAtomicModule,+ pydantic_to_dspy_fields,+ create_dspy_signature_from_schemas,+)+from dspy_integration.schemas import (+ SentimentInputSchema,+ SentimentOutputSchema,+ QuestionInputSchema,+ AnswerOutputSchema,+ SummaryInputSchema,+ SummaryOutputSchema,+)++__all__ = [+ "DSPyAtomicModule",+ "pydantic_to_dspy_fields",+ "create_dspy_signature_from_schemas",+ "SentimentInputSchema",+ "SentimentOutputSchema",+ "QuestionInputSchema",+ "AnswerOutputSchema",+ "SummaryInputSchema",+ "SummaryOutputSchema",+]diff --git a/atomic-examples/dspy-integration/dspy_integration/bridge.py b/atomic-examples/dspy-integration/dspy_integration/bridge.pynew file mode 100644index 0000000..fb83af9--- /dev/null+++ b/atomic-examples/dspy-integration/dspy_integration/bridge.py@@ -0,0 +1,345 @@+"""+Bridge module connecting DSPy's optimization framework with Atomic Agents' structured outputs.++This module provides the core integration that allows:+1. Using Pydantic schemas as DSPy signatures+2. Wrapping Atomic Agents as DSPy modules for optimization+3. Applying DSPy optimizers (BootstrapFewShot, MIPROv2, etc.) to improve agent performance+"""++from typing import Type, Dict, Any, Optional, List, get_type_hints, get_origin, get_args, Literal+import dspy+from pydantic import BaseModel, Field+from pydantic.fields import FieldInfo+from atomic_agents.base.base_io_schema import BaseIOSchema+++def python_type_to_dspy_type(python_type: Any) -> Any:+ """+ Convert Python/Pydantic types to DSPy-compatible type annotations.++ Args:+ python_type: The Python type to convert++ Returns:+ A DSPy-compatible type annotation+ """+ origin = get_origin(python_type)++ # Handle Literal types+ if origin is Literal:+ return python_type++ # Handle List types+ if origin is list:+ args = get_args(python_type)+ if args:+ return list[python_type_to_dspy_type(args[0])]+ return list++ # Handle Optional types+ if origin is type(None) or (hasattr(origin, '__origin__') and origin.__origin__ is type(None)):+ return python_type++ # Handle Union types (including Optional)+ if hasattr(origin, '__name__') and origin.__name__ == 'UnionType':+ args = get_args(python_type)+ # Filter out NoneType for Optional handling+ non_none_args = [a for a in args if a is not type(None)]+ if len(non_none_args) == 1:+ return python_type_to_dspy_type(non_none_args[0])+ return python_type++ # Basic types pass through+ if python_type in (str, int, float, bool, list, dict):+ return python_type++ return str # Default to string for complex types+++def pydantic_to_dspy_fields(+ schema: Type[BaseModel],+ field_type: str = "input"+) -> Dict[str, tuple]:+ """+ Convert Pydantic schema fields to DSPy field definitions.++ Args:+ schema: A Pydantic BaseModel class+ field_type: Either "input" or "output" to determine DSPy field type++ Returns:+ Dictionary mapping field names to (DSPyField, type) tuples+ """+ fields = {}++ for field_name, field_info in schema.model_fields.items():+ description = field_info.description or f"{field_name} field"++ # Get the field's Python type+ field_annotation = field_info.annotation+ dspy_type = python_type_to_dspy_type(field_annotation)++ # Create DSPy field+ if field_type == "input":+ dspy_field = dspy.InputField(desc=description)+ else:+ dspy_field = dspy.OutputField(desc=description)++ fields[field_name] = (dspy_field, dspy_type)++ return fields+++def create_dspy_signature_from_schemas(+ input_schema: Type[BaseIOSchema],+ output_schema: Type[BaseIOSchema],+ instructions: Optional[str] = None,+) -> Type[dspy.Signature]:+ """+ Create a DSPy Signature class from Pydantic input/output schemas.++ This bridges Atomic Agents' schema-first design with DSPy's signature system,+ enabling optimization of prompts while maintaining type safety.++ Args:+ input_schema: Pydantic schema for inputs+ output_schema: Pydantic schema for outputs+ instructions: Optional task instructions for the signature++ Returns:+ A DSPy Signature class that can be used with DSPy modules+ """+ # Build field definitions+ field_definitions = {}++ # Add input fields+ input_fields = pydantic_to_dspy_fields(input_schema, "input")+ for name, (field, field_type) in input_fields.items():+ field_definitions[name] = (field_type, field)++ # Add output fields+ output_fields = pydantic_to_dspy_fields(output_schema, "output")+ for name, (field, field_type) in output_fields.items():+ field_definitions[name] = (field_type, field)++ # Generate instructions from schema docstrings if not provided+ if instructions is None:+ input_desc = input_schema.__doc__ or "Process the input"+ output_desc = output_schema.__doc__ or "Generate the output"+ instructions = f"{input_desc.strip()} {output_desc.strip()}"++ # Create the signature class dynamically+ signature_class = dspy.Signature(field_definitions, instructions)++ return signature_class+++class DSPyAtomicModule(dspy.Module):+ """+ A DSPy module that bridges Atomic Agents schemas with DSPy's optimization framework.++ This module allows you to:+ 1. Define tasks using Pydantic schemas (Atomic Agents style)+ 2. Optimize prompts using DSPy optimizers (BootstrapFewShot, MIPROv2, etc.)+ 3. Get type-safe structured outputs validated by Pydantic++ Example:+ ```python+ module = DSPyAtomicModule(+ input_schema=SentimentInputSchema,+ output_schema=SentimentOutputSchema,+ use_chain_of_thought=True+ )++ # Use directly+ result = module(text="I love this product!")++ # Or optimize with DSPy+ optimizer = dspy.BootstrapFewShot(metric=my_metric)+ optimized = optimizer.compile(module, trainset=examples)+ ```+ """++ def __init__(+ self,+ input_schema: Type[BaseIOSchema],+ output_schema: Type[BaseIOSchema],+ instructions: Optional[str] = None,+ use_chain_of_thought: bool = True,+ ):+ """+ Initialize the DSPy-Atomic bridge module.++ Args:+ input_schema: Pydantic schema class for input validation+ output_schema: Pydantic schema class for output structure+ instructions: Optional custom instructions for the task+ use_chain_of_thought: Whether to use ChainOfThought (recommended for complex tasks)+ """+ super().__init__()++ self.input_schema = input_schema+ self.output_schema = output_schema++ # Create DSPy signature from schemas+ self.signature = create_dspy_signature_from_schemas(+ input_schema,+ output_schema,+ instructions+ )++ # Create the predictor+ if use_chain_of_thought:+ self.predictor = dspy.ChainOfThought(self.signature)+ else:+ self.predictor = dspy.Predict(self.signature)++ def forward(self, **kwargs) -> dspy.Prediction:+ """+ Execute the module with given inputs.++ Args:+ **kwargs: Input fields matching the input_schema++ Returns:+ DSPy Prediction object with validated outputs+ """+ # Validate inputs using Pydantic schema+ try:+ validated_input = self.input_schema(**kwargs)+ # Convert back to dict for DSPy+ input_dict = validated_input.model_dump()+ except Exception as e:+ raise ValueError(f"Input validation failed: {e}")++ # Run prediction+ prediction = self.predictor(**input_dict)++ return prediction++ def run_validated(self, **kwargs) -> BaseIOSchema:+ """+ Execute and return a validated Pydantic output schema instance.++ This provides the full type-safety of Atomic Agents while leveraging+ DSPy's optimization capabilities.++ Args:+ **kwargs: Input fields matching the input_schema++ Returns:+ Validated output schema instance+ """+ # Call self() which invokes __call__ -> forward properly+ prediction = self(**kwargs)++ # Extract output fields from prediction+ output_dict = {}+ for field_name in self.output_schema.model_fields.keys():+ if hasattr(prediction, field_name):+ output_dict[field_name] = getattr(prediction, field_name)++ # Validate and return as Pydantic model+ return self.output_schema(**output_dict)+++class DSPyAtomicPipeline(dspy.Module):+ """+ A pipeline module that chains multiple DSPyAtomicModules together.++ This enables building complex multi-step workflows that can be+ optimized end-to-end by DSPy.++ Example:+ ```python+ pipeline = DSPyAtomicPipeline([+ ("extract", extraction_module),+ ("analyze", analysis_module),+ ("summarize", summary_module),+ ])++ # Optimize entire pipeline+ optimized = optimizer.compile(pipeline, trainset=examples)+ ```+ """++ def __init__(self, steps: List[tuple]):+ """+ Initialize the pipeline with named steps.++ Args:+ steps: List of (name, DSPyAtomicModule) tuples+ """+ super().__init__()+ self.step_names = []++ for name, module in steps:+ self.step_names.append(name)+ setattr(self, name, module)++ def forward(self, **kwargs) -> Dict[str, Any]:+ """+ Execute all pipeline steps in sequence.++ Args:+ **kwargs: Initial inputs for the first step++ Returns:+ Dictionary with results from each step+ """+ results = {}+ current_input = kwargs++ for name in self.step_names:+ module = getattr(self, name)+ prediction = module(**current_input)+ results[name] = prediction++ # Prepare input for next step (using all prediction fields)+ current_input = {+ k: getattr(prediction, k)+ for k in dir(prediction)+ if not k.startswith('_') and not callable(getattr(prediction, k))+ }++ return results+++def create_dspy_example(+ input_schema: Type[BaseIOSchema],+ output_schema: Type[BaseIOSchema],+ input_data: Dict[str, Any],+ output_data: Dict[str, Any],+) -> dspy.Example:+ """+ Create a DSPy Example from Pydantic schema instances.++ This is useful for creating training sets for optimization.++ Args:+ input_schema: Input schema class for validation+ output_schema: Output schema class for validation+ input_data: Dictionary of input values+ output_data: Dictionary of expected output values++ Returns:+ A DSPy Example that can be used for training+ """+ # Validate data+ validated_input = input_schema(**input_data)+ validated_output = output_schema(**output_data)++ # Combine into single dict+ example_data = {+ **validated_input.model_dump(),+ **validated_output.model_dump(),+ }++ # Create DSPy example with output fields marked+ output_keys = list(output_schema.model_fields.keys())+ example = dspy.Example(**example_data).with_inputs(+ *list(input_schema.model_fields.keys())+ )++ return examplediff --git a/atomic-examples/dspy-integration/dspy_integration/main.py b/atomic-examples/dspy-integration/dspy_integration/main.pynew file mode 100644index 0000000..3ea4b47--- /dev/null+++ b/atomic-examples/dspy-integration/dspy_integration/main.py@@ -0,0 +1,1170 @@+"""+DSPy + Atomic Agents Integration: A Comprehensive Didactic Example++This example teaches you WHY combining DSPy with Atomic Agents is powerful+by walking through three stages with a large, challenging benchmark:++┌─────────────────────────────────────────────────────────────────────────────┐+│ STAGE 1: Raw DSPy (Properly Implemented with Typed Signatures) │+│ ✓ Automatic prompt optimization │+│ ✓ Typed signatures with Literal constraints │+│ ✗ No Pydantic validation ecosystem │+│ ✗ Limited integration with structured output tools │+├─────────────────────────────────────────────────────────────────────────────┤+│ STAGE 2: Raw Atomic Agents │+│ ✓ Type-safe structured outputs (Pydantic) │+│ ✓ Guaranteed schema compliance │+│ ✗ Manual prompt engineering - guesswork │+│ ✗ No systematic way to improve │+├─────────────────────────────────────────────────────────────────────────────┤+│ STAGE 3: DSPy + Atomic Agents (The Best of Both) │+│ ✓ Automatic prompt optimization │+│ ✓ Type-safe structured outputs │+│ ✓ Measurable, reproducible improvements │+│ ✓ Full Pydantic ecosystem integration │+└─────────────────────────────────────────────────────────────────────────────┘++Run: uv run python -m dspy_integration.main+"""++import os+import json+import time+import random+from typing import List, Literal, Optional, Dict, Any+from dataclasses import dataclass+from dotenv import load_dotenv++import dspy+import instructor+import openai+from pydantic import Field+from rich.console import Console+from rich.panel import Panel+from rich.table import Table+from rich.syntax import Syntax+from rich.progress import Progress, SpinnerColumn, TextColumn+from rich.columns import Columns+from rich.text import Text+from rich.rule import Rule+from rich.tree import Tree+from rich import box++from atomic_agents.base.base_io_schema import BaseIOSchema+from atomic_agents.agents.atomic_agent import AtomicAgent, AgentConfig+from atomic_agents.context.system_prompt_generator import SystemPromptGenerator++load_dotenv()+console = Console()++# Set random seed for reproducibility+random.seed(42)++# ============================================================================+# THE TASK: Movie Review Classification+# ============================================================================+# We'll classify movie reviews into genres based on the review text.+# This is intentionally tricky - reviews often mention multiple genres,+# use sarcasm, or have ambiguous language.+#+# LARGE BENCHMARK: 60 training examples, 30 test examples+# ============================================================================++GENRES = ["action", "comedy", "drama", "horror", "sci-fi", "romance"]+GenreType = Literal["action", "comedy", "drama", "horror", "sci-fi", "romance"]++# ============================================================================+# TRAINING DATASET (60 examples)+# ============================================================================+# Mixed difficulty: clear examples for learning, nuanced examples for teaching+DATASET = [+ # === ACTION (10 examples) ===+ {"review": "Non-stop car chases and explosions! The hero single-handedly took down an army.", "genre": "action"},+ {"review": "Martial arts sequences were incredible. The final fight scene was epic!", "genre": "action"},+ {"review": "She trained for 10 years to avenge her family. The fight choreography was poetry in motion.", "genre": "action"},+ {"review": "Bullets flying, buildings exploding, and our hero diving through glass windows. Peak adrenaline.", "genre": "action"},+ {"review": "The heist sequence had me on the edge of my seat. Tension and gunfights galore.", "genre": "action"},+ {"review": "Wow, another chosen one saving the world with a magic sword. Groundbreaking. Still epic though.", "genre": "action"},+ {"review": "This action film broke my heart. The hero's best friend didn't make it.", "genre": "action"},+ {"review": "High-octane from start to finish. The stunt work deserves every award.", "genre": "action"},+ {"review": "A revenge thriller with some of the best choreographed fights I've ever seen.", "genre": "action"},+ {"review": "Explosions, car chases, and a hero who refuses to give up. Classic action fare done right.", "genre": "action"},++ # === COMEDY (10 examples) ===+ {"review": "I couldn't stop laughing! The jokes were hilarious and the timing was perfect.", "genre": "comedy"},+ {"review": "Witty dialogue and absurd situations had the whole theater in stitches.", "genre": "comedy"},+ {"review": "The jokes were so bad they were good. I hate that I loved this stupid movie.", "genre": "comedy"},+ {"review": "I cried watching this comedy because I related too much to the sad clown.", "genre": "comedy"},+ {"review": "A romantic comedy set during a zombie apocalypse. The jokes land even when heads don't.", "genre": "comedy"},+ {"review": "Slapstick humor meets clever wordplay. My cheeks hurt from laughing.", "genre": "comedy"},+ {"review": "The funniest movie I've seen all year. Every scene had at least one great gag.", "genre": "comedy"},+ {"review": "Dark comedy at its finest - you'll feel guilty for laughing but won't be able to stop.", "genre": "comedy"},+ {"review": "The comedic timing of the leads is impeccable. Chemistry-driven hilarity.", "genre": "comedy"},+ {"review": "Satirical genius. It skewers modern society while making you snort-laugh.", "genre": "comedy"},++ # === DRAMA (10 examples) ===+ {"review": "A heart-wrenching story of loss and redemption. I cried for hours.", "genre": "drama"},+ {"review": "A slow burn exploration of grief and family dysfunction. Beautifully acted.", "genre": "drama"},+ {"review": "Yes there's a spaceship, but this is really about the captain dealing with his father's death.", "genre": "drama"},+ {"review": "It's set in space but it's really a courtroom drama about intergalactic law.", "genre": "drama"},+ {"review": "The performances were raw and honest. A meditation on what it means to be human.", "genre": "drama"},+ {"review": "Devastating. The final scene left me emotionally wrecked for days.", "genre": "drama"},+ {"review": "A character study that unfolds like a novel. Patient storytelling at its best.", "genre": "drama"},+ {"review": "The immigrant experience portrayed with such authenticity and grace.", "genre": "drama"},+ {"review": "Three generations of trauma, finally addressed. Cathartic and powerful.", "genre": "drama"},+ {"review": "Oscar-worthy performances in a story about ordinary people facing extraordinary circumstances.", "genre": "drama"},++ # === HORROR (10 examples) ===+ {"review": "Terrifying! I slept with the lights on for a week after watching this.", "genre": "horror"},+ {"review": "Jump scares galore! The monster design was genuinely creepy.", "genre": "horror"},+ {"review": "Zombies attack! But the real horror is the breakdown of society and trust.", "genre": "horror"},+ {"review": "The horror movie made me laugh - those deaths were so creative!", "genre": "horror"},+ {"review": "Psychological terror that gets under your skin. No cheap scares, just dread.", "genre": "horror"},+ {"review": "The creature was nightmare fuel. I'm still seeing it when I close my eyes.", "genre": "horror"},+ {"review": "A haunted house movie that actually delivers. Genuinely unsettling atmosphere.", "genre": "horror"},+ {"review": "Gore-fest with a surprising amount of social commentary. Brutal and smart.", "genre": "horror"},+ {"review": "The slow build of dread was masterful. When it finally hit, I screamed.", "genre": "horror"},+ {"review": "Found footage done right. I had to keep reminding myself it wasn't real.", "genre": "horror"},++ # === SCI-FI (10 examples) ===+ {"review": "Set in 2150, the space battles and alien technology were mind-blowing.", "genre": "sci-fi"},+ {"review": "Time travel paradoxes and quantum physics made this a thinker.", "genre": "sci-fi"},+ {"review": "The robot fell in love with a human. Surprisingly touching for a sci-fi.", "genre": "sci-fi"},+ {"review": "The sci-fi premise was just an excuse for philosophical debates. Loved every second.", "genre": "sci-fi"},+ {"review": "Cyberpunk aesthetic meets thought-provoking questions about consciousness.", "genre": "sci-fi"},+ {"review": "The worldbuilding is incredible. Every detail of this future feels plausible.", "genre": "sci-fi"},+ {"review": "First contact done differently. The aliens were truly alien, not just humans with makeup.", "genre": "sci-fi"},+ {"review": "Hard sci-fi that doesn't dumb down the science. Refreshingly intelligent.", "genre": "sci-fi"},+ {"review": "Dystopian future that feels uncomfortably close to our present. Chilling and prescient.", "genre": "sci-fi"},+ {"review": "Space exploration with a philosophical bent. What does it mean to be alone in the universe?", "genre": "sci-fi"},++ # === ROMANCE (10 examples) ===+ {"review": "The chemistry between the leads was electric. A beautiful love story.", "genre": "romance"},+ {"review": "Swoon-worthy moments and a happily ever after. Pure romantic bliss.", "genre": "romance"},+ {"review": "They met during an alien invasion. The world was ending but love found a way.", "genre": "romance"},+ {"review": "Enemies to lovers done perfectly. The tension was delicious.", "genre": "romance"},+ {"review": "A sweeping love story across decades. Their connection transcended time.", "genre": "romance"},+ {"review": "Second chance romance that made me believe in love again. Tissues required.", "genre": "romance"},+ {"review": "The slow burn was worth the wait. When they finally kissed, I cheered.", "genre": "romance"},+ {"review": "A meet-cute for the ages. Charming leads and witty banter throughout.", "genre": "romance"},+ {"review": "Forbidden love with actual stakes. Their sacrifice at the end broke me.", "genre": "romance"},+ {"review": "Holiday romance that's predictable but perfectly executed. Feel-good viewing.", "genre": "romance"},+]++# ============================================================================+# TEST DATASET (30 examples)+# ============================================================================+# INTENTIONALLY CHALLENGING: sarcasm, multi-genre, misleading language,+# subverted expectations, subtle signals, cultural references+TEST_SET = [+ # === SARCASM & IRONY (5 examples) ===+ {"review": "Oh great, another movie where the hero walks away from explosions in slow motion. How original. Still watched it twice though.", "genre": "action"},+ {"review": "Groundbreaking stuff: man punches bad guys, gets the girl, saves the day. Revolutionary cinema. Loved every predictable second.", "genre": "action"},+ {"review": "I laughed so hard I cried. Then I just cried. Then I laughed again. What even was this movie?", "genre": "comedy"},+ {"review": "Wow, they really subverted my expectations by doing exactly what I expected. The jokes were so obvious they circled back to funny.", "genre": "comedy"},+ {"review": "Another 'scary' movie where the characters make terrible decisions. At least the kills were creative. Actually terrifying creature design though.", "genre": "horror"},++ # === MULTI-GENRE / PRIMARY GENRE DETECTION (6 examples) ===+ {"review": "The robot's sacrifice to save humanity made me sob uncontrollably. Beautiful storytelling set against a dystopian future.", "genre": "sci-fi"},+ {"review": "A serial killer falls in love with his next victim, but she's also a serial killer. Bloody and romantic.", "genre": "horror"},+ {"review": "Two detectives solve crimes while slowly falling for each other. The mystery was okay but I shipped them so hard.", "genre": "romance"},+ {"review": "It's technically a war movie but really it's about two soldiers finding love in the trenches. The battle scenes support the love story.", "genre": "romance"},+ {"review": "Space opera with a love triangle at its core. The laser battles are cool but I'm here for the drama between the three leads.", "genre": "sci-fi"},+ {"review": "Post-apocalyptic survival with a found family. The zombies are almost secondary to the human connections.", "genre": "drama"},++ # === MISLEADING GENRE SIGNALS (5 examples) ===+ {"review": "My heart was RACING the entire time! The courtroom scenes were absolutely EXPLOSIVE! Justice was served!", "genre": "drama"},+ {"review": "The alien invasion was just a backdrop for the family reconciliation story. Dad finally said he was proud.", "genre": "drama"},+ {"review": "Terrifyingly funny. The ghost just wanted to do stand-up comedy but kept accidentally scaring people.", "genre": "comedy"},+ {"review": "Action-packed emotional journey! By action I mean arguments, and by packed I mean I cried the whole time.", "genre": "drama"},+ {"review": "A thriller where the biggest twist was how much I ended up caring about these characters' relationships.", "genre": "romance"},++ # === SUBVERTED EXPECTATIONS (5 examples) ===+ {"review": "Everyone dies at the end. Like, EVERYONE. But somehow it was the most romantic film I've ever seen.", "genre": "romance"},+ {"review": "The monster wasn't scary at all - it just wanted friends. I cried when they finally accepted it.", "genre": "drama"},+ {"review": "Started as a slasher, ended as a meditation on trauma and healing. The horror serves the character development.", "genre": "horror"},+ {"review": "What seemed like a rom-com setup became a profound exploration of self-love and independence. She didn't need him after all.", "genre": "drama"},+ {"review": "The funniest parts were unintentional. This action movie's dialogue is so bad it's become a comedy classic in my friend group.", "genre": "action"},++ # === SUBTLE / AMBIGUOUS (5 examples) ===+ {"review": "Set in 2087, but really it's about loneliness. The AI companion understood him better than any human ever did.", "genre": "sci-fi"},+ {"review": "Quiet film about two people sharing a meal. Nothing happens and everything happens. Deeply moving.", "genre": "drama"},+ {"review": "The laughs come from pain, the pain comes from truth. A comedy that understands sadness intimately.", "genre": "comedy"},+ {"review": "Is it a horror movie if the monster is capitalism? Genuinely unsettling corporate satire.", "genre": "horror"},+ {"review": "They never say 'I love you' but every frame screams it. Visual storytelling at its most romantic.", "genre": "romance"},++ # === CULTURAL CONTEXT / SPECIFIC REFERENCES (4 examples) ===+ {"review": "John Wick energy but make it about a retired chef defending his restaurant. Knife fights choreographed like ballet.", "genre": "action"},+ {"review": "Hereditary meets Little Miss Sunshine. Family dysfunction with supernatural undertones played for dark laughs.", "genre": "comedy"},+ {"review": "Blade Runner questions wrapped in a Her-style relationship. What is real, and does it matter?", "genre": "sci-fi"},+ {"review": "Pride and Prejudice but in space. The Darcy character is an alien prince and it absolutely works.", "genre": "romance"},+]+++# ============================================================================+# SCHEMA DEFINITIONS+# ============================================================================++class MovieGenreOutput(BaseIOSchema):+ """Output schema for movie genre classification with structured results."""++ genre: Literal["action", "comedy", "drama", "horror", "sci-fi", "romance"] = Field(+ ...,+ description="The primary genre of the movie based on the review.",+ )+ confidence: float = Field(+ ...,+ description="Confidence score between 0.0 and 1.0",+ ge=0.0,+ le=1.0,+ )+ reasoning: str = Field(+ ...,+ description="Brief explanation for why this genre was chosen.",+ )+++class MovieReviewInput(BaseIOSchema):+ """Input schema for movie review classification."""++ review: str = Field(+ ...,+ description="The movie review text to classify.",+ )+++# ============================================================================+# EVALUATION UTILITIES+# ============================================================================++@dataclass+class EvalResult:+ """Stores evaluation results for comparison."""+ correct: int+ total: int+ accuracy: float+ predictions: List[Dict[str, Any]]+ avg_time: float+++def evaluate_predictions(predictions: List[Dict], test_set: List[Dict]) -> EvalResult:+ """Calculate accuracy and gather stats."""+ correct = 0+ results = []++ for pred, truth in zip(predictions, test_set):+ is_correct = pred.get("genre", "").lower() == truth["genre"].lower()+ if is_correct:+ correct += 1+ results.append({+ "review": truth["review"][:50] + "...",+ "expected": truth["genre"],+ "predicted": pred.get("genre", "ERROR"),+ "correct": is_correct,+ "confidence": pred.get("confidence", 0),+ "reasoning": pred.get("reasoning", "N/A")[:60],+ })++ return EvalResult(+ correct=correct,+ total=len(test_set),+ accuracy=correct / len(test_set) if test_set else 0,+ predictions=results,+ avg_time=0,+ )+++# ============================================================================+# STAGE 1: RAW DSPy (Properly Implemented with Typed Signatures)+# ============================================================================++# Define a proper typed DSPy signature with Literal constraints+class MovieGenreSignature(dspy.Signature):+ """Classify a movie review into its primary genre based on the review text.++ Consider the overall focus and tone of the review, not just individual keywords.+ A review mentioning 'explosions' might be a drama if the focus is on characters.+ A 'scary' movie might be a comedy if played for laughs.+ """++ review: str = dspy.InputField(desc="The movie review text to classify")+ genre: GenreType = dspy.OutputField(desc="The primary genre: action, comedy, drama, horror, sci-fi, or romance")+ confidence: float = dspy.OutputField(desc="Confidence score between 0.0 and 1.0")+ reasoning: str = dspy.OutputField(desc="Brief explanation for the classification")+++def stage1_raw_dspy(api_key: str) -> tuple[EvalResult, dict]:+ """+ Demonstrate raw DSPy with PROPER typed signatures.++ This shows DSPy at its best: typed signatures with Literal constraints,+ automatic optimization, and chain-of-thought reasoning.+ """+ console.print(Rule("[bold blue]STAGE 1: Raw DSPy (Properly Implemented)[/bold blue]", style="blue"))++ console.print(Panel(+ "[green]DSPy STRENGTHS:[/green]\n"+ "• Typed signatures with Literal constraints (genre MUST be valid)\n"+ "• Automatic prompt optimization via BootstrapFewShot\n"+ "• Chain-of-thought reasoning for complex decisions\n"+ "• Systematic few-shot example selection\n\n"+ "[yellow]LIMITATIONS vs Atomic Agents:[/yellow]\n"+ "• No Pydantic ecosystem (validators, serializers, etc.)\n"+ "• Less integration with structured output tools like Instructor\n"+ "• Type hints are enforced by DSPy, not Python runtime",+ title="Stage 1 Overview",+ border_style="blue"+ ))++ # Configure DSPy+ lm = dspy.LM("openai/gpt-4o-mini", api_key=api_key)+ dspy.configure(lm=lm)++ # Show the proper typed signature+ console.print("\n[bold]Step 1.1: Define Typed DSPy Signature[/bold]")+ console.print("DSPy supports class-based signatures with Python type hints:\n")++ signature_code = '''from typing import Literal++# DSPy Signature WITH proper type constraints+class MovieGenreSignature(dspy.Signature):+ """Classify a movie review into its primary genre."""++ review: str = dspy.InputField(desc="The movie review text")++ # Literal type constrains output to valid genres only!+ genre: Literal["action", "comedy", "drama", "horror", "sci-fi", "romance"] = \\+ dspy.OutputField(desc="The primary genre")++ confidence: float = dspy.OutputField(desc="Confidence 0.0-1.0")+ reasoning: str = dspy.OutputField(desc="Brief explanation")++# DSPy enforces the Literal constraint - no more "dramedy" or "thriller"!+classify = dspy.ChainOfThought(MovieGenreSignature)'''++ console.print(Syntax(signature_code, "python", theme="monokai", line_numbers=True))++ # Create the classifier with typed signature+ classify = dspy.ChainOfThought(MovieGenreSignature)++ # Show what the UNOPTIMIZED prompt looks like+ console.print("\n[bold]Step 1.2: Unoptimized Prompt (What DSPy Generates)[/bold]")++ # Run once to see the prompt+ with dspy.context(lm=lm):+ _ = classify(review=DATASET[0]["review"])++ # Get the last prompt from history+ unoptimized_prompt = None+ if lm.history:+ last_call = lm.history[-1]+ unoptimized_prompt = last_call.get("messages", [{}])++ console.print(Panel(+ "[dim]Notice how DSPy includes the Literal type constraint in the prompt:[/dim]\n\n" ++ json.dumps(unoptimized_prompt, indent=2)[:2000] + "...",+ title="Unoptimized DSPy Prompt (With Type Constraints)",+ border_style="yellow"+ ))++ # Now let's OPTIMIZE with BootstrapFewShot+ console.print("\n[bold]Step 1.3: DSPy Optimization (BootstrapFewShot)[/bold]")+ console.print(Panel(+ "[cyan]What BootstrapFewShot does:[/cyan]\n\n"+ "1. Takes your labeled training examples\n"+ "2. Runs the LLM on each to generate 'traces' (reasoning chains)\n"+ "3. Filters traces that produce correct answers\n"+ "4. Selects the best traces as few-shot demonstrations\n"+ "5. Injects these into future prompts automatically\n\n"+ "[yellow]Key insight:[/yellow] DSPy doesn't just use your examples verbatim.\n"+ "It generates NEW reasoning and picks what actually works!",+ title="How DSPy Optimization Works",+ border_style="cyan"+ ))++ # Create training set from our larger dataset+ # Use 30 examples for training (half the dataset)+ train_examples = DATASET[:30]+ trainset = [+ dspy.Example(+ review=ex["review"],+ genre=ex["genre"],+ confidence=0.85, # Reasonable default+ reasoning=f"This review demonstrates typical {ex['genre']} characteristics."+ ).with_inputs("review")+ for ex in train_examples+ ]++ # Define metric for optimization+ def genre_match(example, prediction, trace=None):+ pred_genre = str(prediction.genre).lower().strip()+ expected_genre = str(example.genre).lower().strip()+ return pred_genre == expected_genre++ # Optimize with more demos for better learning+ with Progress(+ SpinnerColumn(),+ TextColumn("[progress.description]{task.description}"),+ console=console,+ ) as progress:+ task = progress.add_task("[cyan]Running DSPy optimization (30 training examples)...", total=None)++ optimizer = dspy.BootstrapFewShot(+ metric=genre_match,+ max_bootstrapped_demos=4,+ max_labeled_demos=4,+ max_rounds=1,+ )+ optimized_classify = optimizer.compile(classify, trainset=trainset)+ progress.remove_task(task)++ console.print("[green]✓ Optimization complete![/green]\n")++ # Show what the OPTIMIZED prompt looks like+ console.print("[bold]Step 1.4: Optimized Prompt (After DSPy Magic)[/bold]")++ with dspy.context(lm=lm):+ _ = optimized_classify(review=TEST_SET[0]["review"])++ optimized_prompt = None+ if lm.history:+ last_call = lm.history[-1]+ optimized_prompt = last_call.get("messages", [{}])++ # Show the prompt+ prompt_str = json.dumps(optimized_prompt, indent=2)++ console.print(Panel(+ "[dim]Notice the auto-selected few-shot examples with reasoning:[/dim]\n\n" ++ prompt_str[:3500] + ("\n..." if len(prompt_str) > 3500 else ""),+ title="Optimized DSPy Prompt (With Auto-Selected Examples)",+ border_style="green"+ ))++ # Show which demos were selected+ console.print("\n[bold]Step 1.5: Few-Shot Examples DSPy Selected[/bold]")++ if hasattr(optimized_classify, 'demos') and optimized_classify.demos:+ tree = Tree("[bold]Selected Demonstrations[/bold]")+ for i, demo in enumerate(optimized_classify.demos[:4]):+ demo_branch = tree.add(f"[cyan]Example {i+1}[/cyan]")+ review_text = str(getattr(demo, 'review', 'N/A'))+ demo_branch.add(f"Review: {review_text[:70]}...")+ demo_branch.add(f"Genre: [green]{getattr(demo, 'genre', 'N/A')}[/green]")+ if hasattr(demo, 'reasoning'):+ reasoning = str(getattr(demo, 'reasoning', ''))[:80]+ demo_branch.add(f"Reasoning: [dim]{reasoning}...[/dim]")+ console.print(tree)+ else:+ console.print("[dim]Demo inspection not available for this predictor type[/dim]")++ # Evaluate on test set+ console.print(f"\n[bold]Step 1.6: Evaluation on Test Set ({len(TEST_SET)} challenging examples)[/bold]")++ predictions = []+ start_time = time.time()++ with Progress(+ SpinnerColumn(),+ TextColumn("[progress.description]{task.description}"),+ console=console,+ ) as progress:+ task = progress.add_task("[cyan]Running predictions...", total=len(TEST_SET))++ for test_ex in TEST_SET:+ try:+ result = optimized_classify(review=test_ex["review"])+ # DSPy with typed signatures should return valid genres+ genre_val = str(result.genre).strip().lower()+ # Normalize any edge cases+ if genre_val not in GENRES:+ genre_val = "error" # Mark invalid outputs++ predictions.append({+ "genre": genre_val,+ "confidence": float(result.confidence) if hasattr(result, 'confidence') else 0.5,+ "reasoning": str(result.reasoning) if hasattr(result, 'reasoning') else "N/A",+ })+ except Exception as e:+ predictions.append({+ "genre": "error",+ "confidence": 0,+ "reasoning": str(e),+ })+ progress.advance(task)++ elapsed = time.time() - start_time++ eval_result = evaluate_predictions(predictions, TEST_SET)+ eval_result.avg_time = elapsed / len(TEST_SET)++ # Show results+ console.print("\n[bold]Step 1.7: Results[/bold]")++ # Show DSPy's strengths AND remaining limitations+ invalid_genres = [p["genre"] for p in predictions if p["genre"] not in GENRES]++ console.print(Panel(+ "[green]DSPy TYPED SIGNATURE BENEFITS:[/green]\n"+ f"• Genre constrained to valid options (invalid outputs: {len(invalid_genres)})\n"+ "• Automatic few-shot example selection\n"+ "• Chain-of-thought reasoning included\n\n"+ "[yellow]REMAINING LIMITATIONS:[/yellow]\n"+ "• No Pydantic validation ecosystem\n"+ "• Confidence not guaranteed to be 0-1 (no ge/le constraints)\n"+ "• Can't use Instructor's retry mechanisms\n"+ "• Type enforcement is DSPy-specific, not Python-native",+ title="DSPy Typed Signatures Assessment",+ border_style="blue"+ ))++ # Results table+ table = Table(title=f"Stage 1 Results: {eval_result.accuracy:.1%} Accuracy ({eval_result.correct}/{eval_result.total})", box=box.ROUNDED)+ table.add_column("Review", style="cyan", max_width=40)+ table.add_column("Expected", style="green")+ table.add_column("Predicted", style="yellow")+ table.add_column("✓/✗", justify="center")++ for pred in eval_result.predictions:+ table.add_row(+ pred["review"],+ pred["expected"],+ pred["predicted"],+ "[green]✓[/green]" if pred["correct"] else "[red]✗[/red]"+ )++ console.print(table)++ behind_scenes = {+ "unoptimized_prompt_sample": str(unoptimized_prompt)[:500] if unoptimized_prompt else "N/A",+ "optimized_prompt_sample": str(optimized_prompt)[:500] if optimized_prompt else "N/A",+ "num_demos_selected": len(optimized_classify.demos) if hasattr(optimized_classify, 'demos') else "N/A",+ "training_examples": len(trainset),+ "invalid_genre_outputs": len(invalid_genres),+ }++ return eval_result, behind_scenes+++# ============================================================================+# STAGE 2: RAW ATOMIC AGENTS+# ============================================================================++def stage2_raw_atomic_agents(api_key: str) -> tuple[EvalResult, dict]:+ """+ Demonstrate raw Atomic Agents: beautiful structured outputs, but manual prompts.+ """+ console.print(Rule("[bold magenta]STAGE 2: Raw Atomic Agents[/bold magenta]", style="magenta"))++ console.print(Panel(+ "[green]ATOMIC AGENTS STRENGTHS:[/green]\n"+ "• Full Pydantic ecosystem (validators, serializers, Field constraints)\n"+ "• Instructor integration for robust structured output\n"+ "• Python-native type safety with runtime validation\n"+ "• ge/le constraints on confidence (guaranteed 0-1)\n\n"+ "[yellow]LIMITATIONS:[/yellow]\n"+ "• Manual prompt engineering - no automatic optimization\n"+ "• No systematic few-shot example selection\n"+ "• Prompt improvements require guesswork and iteration",+ title="Stage 2 Overview",+ border_style="magenta"+ ))++ console.print("\n[bold]Step 2.1: Define Pydantic Schema[/bold]")+ console.print("Atomic Agents uses Pydantic for type-safe outputs:\n")++ schema_code = '''class MovieGenreOutput(BaseIOSchema):+ """Output schema for movie genre classification."""++ genre: Literal["action", "comedy", "drama", "horror", "sci-fi", "romance"] = Field(+ ...,+ description="The primary genre of the movie.",+ )+ confidence: float = Field(+ ...,+ ge=0.0, le=1.0, # VALIDATED! Must be between 0 and 1+ description="Confidence score between 0.0 and 1.0",+ )+ reasoning: str = Field(+ ...,+ description="Brief explanation for the classification.",+ )++# The LLM output MUST match this schema or it fails validation.+# No more parsing "high" vs "0.85" vs "85%" - it's always a float!'''++ console.print(Syntax(schema_code, "python", theme="monokai", line_numbers=True))++ console.print("\n[bold]Step 2.2: Manual System Prompt (The Guesswork)[/bold]")++ # This is our manually crafted prompt - we're guessing what works!+ manual_system_prompt = SystemPromptGenerator(+ background=[+ "You are a movie genre classification expert.",+ "You analyze movie reviews and determine the primary genre.",+ f"Valid genres are: {', '.join(GENRES)}",+ ],+ steps=[+ "Read the review carefully.",+ "Identify key genre indicators (action words, emotional language, etc.).",+ "Consider the overall tone and subject matter.",+ "Select the single most appropriate genre.",+ "Provide a confidence score based on how clear the genre signals are.",+ ],+ output_instructions=[+ "Be decisive - pick ONE primary genre even if multiple could apply.",+ "Confidence should be 0.7-1.0 for clear cases, 0.5-0.7 for ambiguous ones.",+ "Keep reasoning brief but specific to the review.",+ ],+ )++ generated_prompt = manual_system_prompt.generate_prompt()++ console.print(Panel(+ "[dim]This is the system prompt WE WROTE BY HAND:[/dim]\n\n" ++ generated_prompt,+ title="Manual System Prompt (Our Best Guess)",+ border_style="yellow"+ ))++ console.print(Panel(+ "[red]THE PROBLEM:[/red]\n\n"+ "We wrote this prompt based on intuition. Questions we can't answer:\n\n"+ "• Is 'Be decisive' helping or hurting accuracy?\n"+ "• Should we add few-shot examples? Which ones?\n"+ "• Is the step-by-step instruction actually useful?\n"+ "• Would different wording improve results?\n\n"+ "[yellow]Without DSPy, we're just guessing![/yellow]",+ title="The Manual Prompt Engineering Problem",+ border_style="red"+ ))++ # Create Atomic Agent+ console.print("\n[bold]Step 2.3: Create Atomic Agent[/bold]")++ client = instructor.from_openai(openai.OpenAI(api_key=api_key))++ agent = AtomicAgent[MovieReviewInput, MovieGenreOutput](+ config=AgentConfig(+ client=client,+ model="gpt-4o-mini",+ system_prompt_generator=manual_system_prompt,+ )+ )++ console.print("[green]✓ Agent created with schema validation[/green]")++ # Show how Instructor enforces the schema+ console.print("\n[bold]Step 2.4: Schema Enforcement in Action[/bold]")++ console.print(Panel(+ "[cyan]What happens under the hood:[/cyan]\n\n"+ "1. Atomic Agents sends your prompt + Pydantic schema to the LLM\n"+ "2. Instructor (the library) converts schema to JSON Schema for the LLM\n"+ "3. LLM generates output attempting to match the schema\n"+ "4. Instructor validates the response against Pydantic\n"+ "5. If validation fails, Instructor retries with error feedback\n"+ "6. You get a guaranteed-valid Pydantic object or an exception\n\n"+ "[green]Result:[/green] genre is ALWAYS one of our 6 options,\n"+ "confidence is ALWAYS a float between 0 and 1!",+ title="How Schema Enforcement Works",+ border_style="cyan"+ ))++ # Evaluate+ console.print("\n[bold]Step 2.5: Evaluation on Test Set[/bold]")++ predictions = []+ start_time = time.time()++ with Progress(+ SpinnerColumn(),+ TextColumn("[progress.description]{task.description}"),+ console=console,+ ) as progress:+ task = progress.add_task("[magenta]Running predictions...", total=len(TEST_SET))++ for test_ex in TEST_SET:+ try:+ result = agent.run(MovieReviewInput(review=test_ex["review"]))+ predictions.append({+ "genre": result.genre, # Already validated!+ "confidence": result.confidence, # Already a float!+ "reasoning": result.reasoning,+ })+ except Exception as e:+ predictions.append({+ "genre": "error",+ "confidence": 0,+ "reasoning": str(e),+ })+ progress.advance(task)++ elapsed = time.time() - start_time++ eval_result = evaluate_predictions(predictions, TEST_SET)+ eval_result.avg_time = elapsed / len(TEST_SET)++ # Show the BENEFIT - structured outputs+ console.print("\n[bold]Step 2.6: The Benefit - Type-Safe Outputs[/bold]")++ console.print(Panel(+ "[green]ATOMIC AGENTS ADVANTAGE:[/green]\n\n"+ "Look at these outputs - perfectly structured:\n" ++ "\n".join([+ f" • genre='{predictions[i]['genre']}' (Literal) confidence={predictions[i]['confidence']:.2f} (float)"+ for i in range(min(3, len(predictions)))+ ]) + "\n\n"+ "[cyan]Benefits:[/cyan]\n"+ "• genre is guaranteed to be one of our 6 valid options\n"+ "• confidence is always a float between 0.0 and 1.0\n"+ "• No parsing needed - direct attribute access\n"+ "• IDE autocomplete works perfectly\n"+ "• Downstream code can trust the types",+ title="Structured Output Benefits",+ border_style="green"+ ))++ # Results table+ table = Table(title=f"Stage 2 Results: {eval_result.accuracy:.1%} Accuracy", box=box.ROUNDED)+ table.add_column("Review", style="cyan", max_width=35)+ table.add_column("Expected", style="green")+ table.add_column("Predicted", style="yellow")+ table.add_column("Confidence", justify="right")+ table.add_column("✓/✗", justify="center")++ for pred in eval_result.predictions:+ table.add_row(+ pred["review"],+ pred["expected"],+ pred["predicted"],+ f"{pred['confidence']:.2f}",+ "[green]✓[/green]" if pred["correct"] else "[red]✗[/red]"+ )++ console.print(table)++ behind_scenes = {+ "system_prompt": generated_prompt,+ "schema_enforced": True,+ "manual_engineering": True,+ }++ return eval_result, behind_scenes+++# ============================================================================+# STAGE 3: DSPy + ATOMIC AGENTS (THE BEST OF BOTH)+# ============================================================================++def stage3_combined(api_key: str) -> tuple[EvalResult, dict]:+ """+ Demonstrate the combined approach: DSPy optimization + Atomic Agents structure.+ """+ console.print(Rule("[bold green]STAGE 3: DSPy + Atomic Agents[/bold green]", style="green"))++ console.print(Panel(+ "[green]THE SOLUTION:[/green]\n"+ "Combine DSPy's automatic optimization with Atomic Agents' type safety!\n\n"+ "[cyan]WHAT WE GET:[/cyan]\n"+ "• DSPy automatically finds the best prompts and examples\n"+ "• Atomic Agents guarantees output structure\n"+ "• Measurable improvements through optimization\n"+ "• Production-ready typed outputs\n\n"+ "[yellow]THE BEST OF BOTH WORLDS[/yellow]",+ title="Stage 3 Overview",+ border_style="green"+ ))++ # Import our bridge+ from dspy_integration.bridge import (+ DSPyAtomicModule,+ create_dspy_example,+ create_dspy_signature_from_schemas,+ )++ console.print("\n[bold]Step 3.1: The Bridge - DSPyAtomicModule[/bold]")++ bridge_code = '''# The bridge combines both frameworks:+module = DSPyAtomicModule(+ input_schema=MovieReviewInput, # Pydantic input validation+ output_schema=MovieGenreOutput, # Pydantic output structure+ instructions="Classify the movie review into a genre.",+ use_chain_of_thought=True, # DSPy's reasoning capability+)++# Behind the scenes:+# 1. Pydantic schemas are converted to DSPy signatures+# 2. DSPy handles prompt construction and optimization+# 3. Outputs are validated against Pydantic schemas+# 4. You get type-safe results that DSPy optimized!'''++ console.print(Syntax(bridge_code, "python", theme="monokai", line_numbers=True))++ # Configure DSPy+ lm = dspy.LM("openai/gpt-4o-mini", api_key=api_key)+ dspy.configure(lm=lm)++ # Create the module+ module = DSPyAtomicModule(+ input_schema=MovieReviewInput,+ output_schema=MovieGenreOutput,+ instructions="Classify the movie review into its primary genre. Be accurate and provide reasoning.",+ use_chain_of_thought=True,+ )++ console.print("\n[bold]Step 3.2: Schema-to-Signature Conversion[/bold]")++ # Show the generated signature+ console.print(Panel(+ f"[cyan]Pydantic Schema → DSPy Signature:[/cyan]\n\n"+ f"Input fields: review (str)\n"+ f"Output fields: genre (Literal), confidence (float), reasoning (str)\n\n"+ f"[dim]The bridge automatically converts Pydantic field descriptions\n"+ f"into DSPy field descriptors, preserving all metadata.[/dim]",+ title="Automatic Conversion",+ border_style="cyan"+ ))++ # Create typed training examples+ console.print("\n[bold]Step 3.3: Type-Safe Training Examples[/bold]")++ console.print(Panel(+ "[cyan]Creating training examples with validation:[/cyan]\n\n"+ "Each example is validated against our Pydantic schemas!\n"+ "If you accidentally put confidence=1.5 or genre='thriller',\n"+ "you get an immediate error - not a silent failure later.",+ title="Validated Training Data",+ border_style="cyan"+ ))++ # Create training set with our helper - use more examples for better optimization+ train_examples = DATASET[:40] # Use 40 examples for training+ trainset = []+ for ex in train_examples:+ trainset.append(+ create_dspy_example(+ MovieReviewInput,+ MovieGenreOutput,+ {"review": ex["review"]},+ {+ "genre": ex["genre"],+ "confidence": 0.85, # Reasonable default+ "reasoning": f"The review shows typical {ex['genre']} characteristics.",+ },+ )+ )++ console.print(f"[green]✓ Created {len(trainset)} validated training examples[/green]")++ # Define metric+ def typed_genre_match(example, prediction, trace=None):+ """Metric that works with our typed outputs."""+ pred_genre = str(prediction.genre).lower().strip()+ expected_genre = str(example.genre).lower().strip()+ return pred_genre == expected_genre++ # Optimize+ console.print("\n[bold]Step 3.4: DSPy Optimization (With Schema Awareness)[/bold]")++ with Progress(+ SpinnerColumn(),+ TextColumn("[progress.description]{task.description}"),+ console=console,+ ) as progress:+ task = progress.add_task(f"[green]Running optimization ({len(trainset)} training examples)...", total=None)++ optimizer = dspy.BootstrapFewShot(+ metric=typed_genre_match,+ max_bootstrapped_demos=4,+ max_labeled_demos=4,+ max_rounds=1,+ )+ optimized_module = optimizer.compile(module, trainset=trainset)+ progress.remove_task(task)++ console.print("[green]✓ Optimization complete![/green]")++ # Show the optimized prompt+ console.print("\n[bold]Step 3.5: The Optimized Prompt (Exposed!)[/bold]")++ # Run once to capture the prompt+ with dspy.context(lm=lm):+ _ = optimized_module(review=TEST_SET[0]["review"])++ if lm.history:+ last_call = lm.history[-1]+ optimized_prompt = last_call.get("messages", [{}])+ prompt_str = json.dumps(optimized_prompt, indent=2)++ console.print(Panel(+ "[dim]This is what DSPy + Atomic Agents sends to the LLM:[/dim]\n\n" ++ prompt_str[:2500] + ("\n..." if len(prompt_str) > 2500 else ""),+ title="Final Optimized Prompt",+ border_style="green"+ ))++ # Evaluate with type-safe outputs+ console.print("\n[bold]Step 3.6: Evaluation with Type-Safe Outputs[/bold]")++ predictions = []+ raw_outputs = []+ start_time = time.time()++ with Progress(+ SpinnerColumn(),+ TextColumn("[progress.description]{task.description}"),+ console=console,+ ) as progress:+ task = progress.add_task("[green]Running predictions...", total=len(TEST_SET))++ for test_ex in TEST_SET:+ try:+ # Get raw DSPy output+ raw_result = optimized_module(review=test_ex["review"])++ # Convert to validated Pydantic+ validated_result = optimized_module.run_validated(review=test_ex["review"])++ predictions.append({+ "genre": validated_result.genre, # Guaranteed Literal type!+ "confidence": validated_result.confidence, # Guaranteed 0-1 float!+ "reasoning": validated_result.reasoning,+ })+ raw_outputs.append({+ "raw_genre": str(raw_result.genre),+ "validated_genre": validated_result.genre,+ })+ except Exception as e:+ predictions.append({+ "genre": "error",+ "confidence": 0,+ "reasoning": str(e),+ })+ progress.advance(task)++ elapsed = time.time() - start_time++ eval_result = evaluate_predictions(predictions, TEST_SET)+ eval_result.avg_time = elapsed / len(TEST_SET)++ # Show the combined benefits+ console.print("\n[bold]Step 3.7: The Combined Benefits[/bold]")++ console.print(Panel(+ "[green]✓ DSPy BENEFITS:[/green]\n"+ "• Automatic few-shot example selection\n"+ "• Optimized prompt instructions\n"+ "• Chain-of-thought reasoning\n"+ "• Measurable improvement through metrics\n\n"+ "[green]✓ ATOMIC AGENTS BENEFITS:[/green]\n"+ "• genre is Literal['action','comedy',...] - always valid\n"+ "• confidence is float with ge=0, le=1 - always in range\n"+ "• Full IDE autocomplete and type checking\n"+ "• Pydantic validation catches any LLM mistakes\n\n"+ "[yellow]COMBINED:[/yellow] Optimized prompts + Guaranteed structure!",+ title="The Best of Both Worlds",+ border_style="green"+ ))++ # Results table+ table = Table(title=f"Stage 3 Results: {eval_result.accuracy:.1%} Accuracy", box=box.ROUNDED)+ table.add_column("Review", style="cyan", max_width=35)+ table.add_column("Expected", style="green")+ table.add_column("Predicted", style="yellow")+ table.add_column("Confidence", justify="right")+ table.add_column("✓/✗", justify="center")++ for pred in eval_result.predictions:+ table.add_row(+ pred["review"],+ pred["expected"],+ pred["predicted"],+ f"{pred['confidence']:.2f}",+ "[green]✓[/green]" if pred["correct"] else "[red]✗[/red]"+ )++ console.print(table)++ behind_scenes = {+ "optimized_prompt_sample": prompt_str[:1000] if 'prompt_str' in dir() else "N/A",+ "schema_enforced": True,+ "dspy_optimized": True,+ }++ return eval_result, behind_scenes+++# ============================================================================+# FINAL COMPARISON+# ============================================================================++def show_final_comparison(+ stage1_result: EvalResult,+ stage2_result: EvalResult,+ stage3_result: EvalResult,+):+ """Show side-by-side comparison of all three approaches."""++ console.print(Rule("[bold yellow]FINAL COMPARISON[/bold yellow]", style="yellow"))++ # Summary table+ table = Table(title="Approach Comparison", box=box.DOUBLE_EDGE)+ table.add_column("Metric", style="bold")+ table.add_column("Stage 1\nRaw DSPy", justify="center", style="blue")+ table.add_column("Stage 2\nRaw Atomic Agents", justify="center", style="magenta")+ table.add_column("Stage 3\nDSPy + Atomic", justify="center", style="green")++ table.add_row(+ "Accuracy",+ f"{stage1_result.accuracy:.1%}",+ f"{stage2_result.accuracy:.1%}",+ f"[bold]{stage3_result.accuracy:.1%}[/bold]",+ )+ table.add_row(+ "Correct / Total",+ f"{stage1_result.correct}/{stage1_result.total}",+ f"{stage2_result.correct}/{stage2_result.total}",+ f"[bold]{stage3_result.correct}/{stage3_result.total}[/bold]",+ )+ table.add_row(+ "Avg Time/Query",+ f"{stage1_result.avg_time:.2f}s",+ f"{stage2_result.avg_time:.2f}s",+ f"{stage3_result.avg_time:.2f}s",+ )+ table.add_row(+ "Prompt Optimization",+ "[green]✓ Auto[/green]",+ "[red]✗ Manual[/red]",+ "[green]✓ Auto[/green]",+ )+ table.add_row(+ "Type Safety",+ "[yellow]~ DSPy Literal[/yellow]",+ "[green]✓ Pydantic[/green]",+ "[green]✓ Pydantic[/green]",+ )+ table.add_row(+ "Output Validation",+ "[yellow]~ Basic[/yellow]",+ "[green]✓ Full[/green]",+ "[green]✓ Full[/green]",+ )+ table.add_row(+ "Pydantic Ecosystem",+ "[red]✗ No[/red]",+ "[green]✓ Full[/green]",+ "[green]✓ Full[/green]",+ )+ table.add_row(+ "Few-Shot Selection",+ "[green]✓ Auto[/green]",+ "[red]✗ Manual[/red]",+ "[green]✓ Auto[/green]",+ )+ table.add_row(+ "IDE Support",+ "[yellow]~ Partial[/yellow]",+ "[green]✓ Full[/green]",+ "[green]✓ Full[/green]",+ )++ console.print(table)++ # Key takeaways+ console.print(Panel(+ "[bold yellow]KEY TAKEAWAYS[/bold yellow]\n\n"++ "[blue]RAW DSPy (with typed signatures):[/blue]\n"+ "• Excellent optimization with Literal type constraints\n"+ "• Great for experimentation and iteration\n"+ "• Missing Pydantic ecosystem (validators, Field constraints)\n\n"++ "[magenta]RAW ATOMIC AGENTS:[/magenta]\n"+ "• Full Pydantic ecosystem with runtime validation\n"+ "• Instructor integration for robust outputs\n"+ "• Manual prompt engineering limits optimization\n\n"++ "[green]DSPy + ATOMIC AGENTS:[/green]\n"+ "• Automatic optimization finds the best prompts\n"+ "• Full Pydantic validation and serialization\n"+ "• Measurable improvements + production-ready types\n"+ "• [bold]The best of both worlds![/bold]",+ title="Summary",+ border_style="yellow"+ ))++ # When to use what+ console.print(Panel(+ "[bold]WHEN TO USE EACH APPROACH[/bold]\n\n"++ "[blue]Use Raw DSPy when:[/blue]\n"+ "• Quick prototyping and experimentation\n"+ "• Output format doesn't matter much\n"+ "• You'll post-process outputs anyway\n\n"++ "[magenta]Use Raw Atomic Agents when:[/magenta]\n"+ "• You need guaranteed output structure NOW\n"+ "• You don't have training data for optimization\n"+ "• The task is simple enough that manual prompts work\n\n"++ "[green]Use DSPy + Atomic Agents when:[/green]\n"+ "• You have labeled data and want to optimize\n"+ "• Production systems need type-safe outputs\n"+ "• You want measurable, reproducible improvements\n"+ "• Both accuracy AND structure matter",+ title="Decision Guide",+ border_style="cyan"+ ))+++# ============================================================================+# MAIN+# ============================================================================++def main():+ """Run the complete didactic example with a comprehensive benchmark."""++ console.print(Panel.fit(+ "[bold]DSPy + Atomic Agents: A Comprehensive Didactic Example[/bold]\n\n"+ "This example teaches you WHY combining these frameworks is powerful\n"+ "by walking through three stages with full transparency.\n\n"+ "[dim]Large benchmark: 60 training examples, 30 challenging test cases\n"+ "We'll expose the prompts, show the optimizations,\n"+ "and compare measurable results.[/dim]",+ border_style="bold white",+ ))++ # Check API key+ api_key = os.getenv("OPENAI_API_KEY")+ if not api_key:+ console.print("[red]Error: OPENAI_API_KEY environment variable required[/red]")+ return++ console.print(f"\n[dim]Using model: gpt-4o-mini[/dim]")+ console.print(f"[dim]Training set: {len(DATASET)} examples (balanced across 6 genres)[/dim]")+ console.print(f"[dim]Test set: {len(TEST_SET)} challenging examples (sarcasm, multi-genre, etc.)[/dim]\n")++ # Run all three stages+ try:+ stage1_result, stage1_behind = stage1_raw_dspy(api_key)+ console.print("\n")++ stage2_result, stage2_behind = stage2_raw_atomic_agents(api_key)+ console.print("\n")++ stage3_result, stage3_behind = stage3_combined(api_key)+ console.print("\n")++ # Final comparison+ show_final_comparison(stage1_result, stage2_result, stage3_result)++ except Exception as e:+ console.print(f"[red]Error: {e}[/red]")+ import traceback+ console.print(traceback.format_exc())+++if __name__ == "__main__":+ main()diff --git a/atomic-examples/dspy-integration/dspy_integration/schemas.py b/atomic-examples/dspy-integration/dspy_integration/schemas.pynew file mode 100644index 0000000..d59dadb--- /dev/null+++ b/atomic-examples/dspy-integration/dspy_integration/schemas.py@@ -0,0 +1,138 @@+"""+Pydantic schemas for DSPy + Atomic Agents integration examples.++These schemas demonstrate how to define type-safe input/output contracts+that can be used with both Atomic Agents and DSPy optimization.+"""++from typing import Literal, List, Optional+from pydantic import Field+from atomic_agents.base.base_io_schema import BaseIOSchema+++class SentimentInputSchema(BaseIOSchema):+ """Input schema for sentiment analysis task."""++ text: str = Field(+ ...,+ description="The text to analyze for sentiment.",+ min_length=1,+ )+++class SentimentOutputSchema(BaseIOSchema):+ """Output schema for sentiment analysis with structured results."""++ sentiment: Literal["positive", "negative", "neutral"] = Field(+ ...,+ description="The overall sentiment of the text.",+ )+ confidence: float = Field(+ ...,+ description="Confidence score between 0 and 1.",+ ge=0.0,+ le=1.0,+ )+ reasoning: str = Field(+ ...,+ description="Brief explanation for the sentiment classification.",+ )+++class QuestionInputSchema(BaseIOSchema):+ """Input schema for question answering task."""++ question: str = Field(+ ...,+ description="The question to answer.",+ )+ context: Optional[str] = Field(+ default=None,+ description="Optional context to help answer the question.",+ )+++class AnswerOutputSchema(BaseIOSchema):+ """Output schema for question answering with structured response."""++ answer: str = Field(+ ...,+ description="The answer to the question.",+ )+ confidence: float = Field(+ ...,+ description="Confidence score for the answer between 0 and 1.",+ ge=0.0,+ le=1.0,+ )+ sources: List[str] = Field(+ default_factory=list,+ description="List of sources or references used to derive the answer.",+ )+++class SummaryInputSchema(BaseIOSchema):+ """Input schema for text summarization task."""++ text: str = Field(+ ...,+ description="The text to summarize.",+ )+ max_sentences: int = Field(+ default=3,+ description="Maximum number of sentences in the summary.",+ ge=1,+ le=10,+ )+++class SummaryOutputSchema(BaseIOSchema):+ """Output schema for text summarization with structured results."""++ summary: str = Field(+ ...,+ description="The summarized text.",+ )+ key_points: List[str] = Field(+ ...,+ description="List of key points extracted from the text.",+ )+ word_count: int = Field(+ ...,+ description="Word count of the summary.",+ ge=0,+ )+++class ClassificationInputSchema(BaseIOSchema):+ """Input schema for multi-label text classification."""++ text: str = Field(+ ...,+ description="The text to classify.",+ )+ categories: List[str] = Field(+ ...,+ description="Available categories to classify into.",+ )+++class ClassificationOutputSchema(BaseIOSchema):+ """Output schema for multi-label classification with confidence scores."""++ labels: List[str] = Field(+ ...,+ description="Assigned labels/categories.",+ )+ label_scores: List[float] = Field(+ ...,+ description="Confidence scores for each assigned label.",+ )+ primary_label: str = Field(+ ...,+ description="The most confident label assignment.",+ )+ reasoning: str = Field(+ ...,+ description="Explanation for the classification decision.",+ )diff --git a/atomic-examples/dspy-integration/pyproject.toml b/atomic-examples/dspy-integration/pyproject.tomlnew file mode 100644index 0000000..655dde6--- /dev/null+++ b/atomic-examples/dspy-integration/pyproject.toml@@ -0,0 +1,28 @@+[build-system]+requires = ["hatchling"]+build-backend = "hatchling.build"++[tool.hatch.build.targets.wheel]+packages = ["dspy_integration"]++[project]+name = "dspy-integration"+version = "1.0.0"+description = "DSPy + Atomic Agents integration example - combining prompt optimization with type-safe structured outputs"+readme = "README.md"+authors = [+ { name = "BrainBlend AI", email = "[email protected]" }+]+requires-python = ">=3.12"+dependencies = [+ "atomic-agents",+ "dspy>=2.5.0",+ "instructor>=1.7.0",+ "openai>=1.50.0",+ "python-dotenv>=1.0.1",+ "rich>=13.7.0",+ "pydantic>=2.0.0",+]++[tool.uv.sources]+atomic-agents = { workspace = true }diff --git a/atomic-examples/progressive-disclosure/README.md b/atomic-examples/progressive-disclosure/README.mdnew file mode 100644index 0000000..8181069--- /dev/null+++ b/atomic-examples/progressive-disclosure/README.md@@ -0,0 +1,284 @@+# Progressive Disclosure Example++This example demonstrates **Anthropic's "progressive disclosure" pattern** for efficient MCP tool loading using the Atomic Agents framework with **three MCP servers** and **24 total tools**.++## The Problem++As documented by [Anthropic's Engineering Blog](https://www.anthropic.com/engineering/code-execution-with-mcp):++- **Context window bloat**: Loading all tool definitions upfront consumes massive context space+- **Performance degradation**: Agents connecting to 2-3+ MCP servers see significant accuracy drops+- **Cost inefficiency**: Traditional approach for multi-server setup: ~25,000+ tokens just for tool schemas++## The Solution: Progressive Disclosure++Instead of loading all 24 tool definitions upfront, a **sub-agent discovers relevant tools on-demand**:++```+┌─────────────────────────────────────────────────────────────────┐+│ WITHOUT Progressive Disclosure │+│ │+│ Agent Context Window: │+│ ┌─────────────────────────────────────────────────────────────┐│+│ │ math-server: 8 tools × ~500 tokens = 4,000 tokens ││+│ │ text-server: 8 tools × ~500 tokens = 4,000 tokens ││+│ │ data-server: 8 tools × ~500 tokens = 4,000 tokens ││+│ │ ───────────────────────────────────────────────── ││+│ │ Total: ~12,000 tokens just for tool definitions! ││+│ └─────────────────────────────────────────────────────────────┘│+└─────────────────────────────────────────────────────────────────┘++┌─────────────────────────────────────────────────────────────────┐+│ WITH Progressive Disclosure │+│ │+│ Agent Context Window: │+│ ┌─────────────────────────────────────────────────────────────┐│+│ │ add_numbers (500 tokens) ││+│ │ multiply_numbers (500 tokens) ││+│ │ ───────────────────────────────────────────────── ││+│ │ Total: ~1,000 tokens (92% reduction!) ││+│ └─────────────────────────────────────────────────────────────┘│+└─────────────────────────────────────────────────────────────────┘+```++## Project Structure++```+progressive-disclosure/+├── pyproject.toml+├── README.md+├── servers/ # Three MCP servers+│ ├── math_server/ # 8 arithmetic tools+│ │ ├── pyproject.toml+│ │ └── math_server/+│ │ ├── __init__.py+│ │ └── server.py # FastMCP server+│ ├── text_server/ # 8 text manipulation tools+│ │ ├── pyproject.toml+│ │ └── text_server/+│ │ ├── __init__.py+│ │ └── server.py+│ └── data_server/ # 8 list/data tools+│ ├── pyproject.toml+│ └── data_server/+│ ├── __init__.py+│ └── server.py+└── progressive_disclosure/ # Client with progressive disclosure+ ├── __init__.py+ ├── main.py # Entry point+ ├── registry/+ │ └── tool_registry.py # Lightweight tool metadata+ ├── tools/+ │ └── search_tools.py # Tool search functionality+ └── agents/+ ├── tool_finder_agent.py # Sub-agent for discovery+ └── orchestrator_agent.py # Dynamic orchestrator factory+```++## Available Tools (24 Total)++### math-server (8 tools)+| Tool | Description |+|------|-------------|+| `add_numbers` | Add two numbers (a + b) |+| `subtract_numbers` | Subtract b from a (a - b) |+| `multiply_numbers` | Multiply two numbers (a * b) |+| `divide_numbers` | Divide a by b (a / b) |+| `power` | Raise base to exponent |+| `square_root` | Calculate square root |+| `modulo` | Calculate remainder (a % b) |+| `absolute_value` | Get absolute value |++### text-server (8 tools)+| Tool | Description |+|------|-------------|+| `uppercase` | Convert to UPPERCASE |+| `lowercase` | Convert to lowercase |+| `reverse_text` | Reverse character order |+| `word_count` | Count words in text |+| `char_count` | Count characters |+| `concatenate` | Join two strings |+| `replace_text` | Find and replace |+| `split_text` | Split by delimiter |++### data-server (8 tools)+| Tool | Description |+|------|-------------|+| `sort_list` | Sort numbers in a list |+| `filter_greater_than` | Filter values > threshold |+| `filter_less_than` | Filter values < threshold |+| `sum_list` | Sum all values |+| `average_list` | Calculate average |+| `min_value` | Find minimum |+| `max_value` | Find maximum |+| `unique_values` | Remove duplicates |++## Architecture++```+User Query: "Calculate (5 + 3) * 2 and reverse 'hello'"+ │+ ▼+┌─────────────────────────────────────────────────────┐+│ Phase 1: Tool Discovery │+│ ───────────────────────── │+│ Tool Finder Agent (gpt-4o-mini) │+│ - Searches lightweight registry │+│ - Registry has 24 tool names + descriptions │+│ - Returns: ["add_numbers", "multiply_numbers", │+│ "reverse_text"] │+└─────────────┬───────────────────────────────────────┘+ │+ ▼+┌─────────────────────────────────────────────────────┐+│ Phase 2: Dynamic Orchestrator Creation │+│ ───────────────────────── │+│ OrchestratorFactory │+│ - Loads ONLY 3 tool schemas (not 24!) │+│ - Creates Union type dynamically │+│ - 92% context reduction achieved │+└─────────────┬───────────────────────────────────────┘+ │+ ▼+┌─────────────────────────────────────────────────────┐+│ Phase 3: Query Execution │+│ ───────────────────────── │+│ Main Orchestrator Agent (gpt-4o) │+│ - Executes add_numbers(5, 3) → 8 │+│ - Executes multiply_numbers(8, 2) → 16 │+│ - Executes reverse_text("hello") → "olleh" │+│ - Returns final response │+└─────────────────────────────────────────────────────┘+```++## Getting Started++### Prerequisites++- Python 3.12++- OpenAI API key+- uv package manager++### Installation++```bash+# Clone the repository+git clone https://github.com/BrainBlend-AI/atomic-agents+cd atomic-agents/atomic-examples/progressive-disclosure++# Install dependencies+uv sync+```++### Configuration++Create a `.env` file:+```bash+OPENAI_API_KEY=your-api-key-here+```++### Running the Demo++```bash+uv run python -m progressive_disclosure.main+```++## Example Session++```+╭──────────────────────────────────────────────────────╮+│ Progressive Disclosure Demo │+│ Demonstrating Anthropic's pattern with 3 MCP servers │+╰──────────────────────────────────────────────────────╯++Connecting to MCP servers...+Connecting to math-server...+ Connected: 8 tools+Connecting to text-server...+ Connected: 8 tools+Connecting to data-server...+ Connected: 8 tools++Total: 24 tools across 3 servers++Ready! Type '/exit' to quit, '/stats' for statistics.+Example queries:+ - 'Calculate (5 + 3) * 2' (math tools)+ - 'Convert HELLO WORLD to lowercase' (text tools)+ - 'Find the average of [1,2,3,4,5]' (data tools)+ - 'Reverse the text ABC and add 10+5' (multi-server!)++You: Calculate (5 + 3) * 2++Phase 1: Tool Discovery+Sub-agent searching 24 tools across 3 servers...+Selected 2 tools: ['add_numbers', 'multiply_numbers']+Reasoning: The query requires addition and multiplication operations++Phase 2: Creating Focused Orchestrator+Orchestrator context: 2 tools (filtered 92% = saved ~11000 tokens)++Phase 3: Query Execution+Executing: add_numbers+Parameters: {'a': 5, 'b': 3}+Executing: multiply_numbers+Parameters: {'a': 8, 'b': 2}++Response: The result of (5 + 3) * 2 is 16.++╭──────────────────────────────────────────────────────╮+│ Progressive Disclosure: 2/24 tools loaded (92%) │+╰──────────────────────────────────────────────────────╯+```++## Key Benefits++| Metric | Without PD | With PD | Improvement |+|--------|-----------|---------|-------------|+| Tools in context | 24 | 2-5 | 90%+ reduction |+| Token usage | ~12,000 | ~1,000 | 92% savings |+| Tool accuracy | Lower | Higher | Better focus |+| Scalability | Limited | Excellent | Many servers |++## How Atomic Agents Enables This++This example demonstrates several Atomic Agents patterns:++1. **Sub-Agent Pattern**: Tool Finder as specialized discovery agent+2. **Dynamic Schema Creation**: `Union` types built at runtime from selected tools+3. **Multi-Server MCP**: Connecting to multiple MCP servers simultaneously+4. **Tool Registry**: Lightweight metadata storage without full schemas+5. **Context Efficiency**: Only relevant information loaded++## The FastMCP Servers++Each server is a simple FastMCP application:++```python+from fastmcp import FastMCP++mcp = FastMCP("math-server")++def add_numbers(a: float, b: float) -> float:+ """Add two numbers together (a + b)."""+ return a + b++# ... more tools ...++if __name__ == "__main__":+ mcp.run()+```++## References++- [Anthropic: Code Execution with MCP](https://www.anthropic.com/engineering/code-execution-with-mcp)+- [FastMCP Documentation](https://gofastmcp.com)+- [Model Context Protocol](https://modelcontextprotocol.io/)+- [Atomic Agents Documentation](https://github.com/BrainBlend-AI/atomic-agents)++## See Also++- [MCP Agent Example](../mcp-agent/) - Basic single-server MCP integration+- [Orchestration Agent Example](../orchestration-agent/) - Tool orchestration patterns+- [Deep Research Example](../deep-research/) - Multi-agent pipelinesdiff --git a/atomic-examples/progressive-disclosure/progressive_disclosure/__init__.py b/atomic-examples/progressive-disclosure/progressive_disclosure/__init__.pynew file mode 100644index 0000000..0e66f89--- /dev/null+++ b/atomic-examples/progressive-disclosure/progressive_disclosure/__init__.py@@ -0,0 +1,8 @@+"""Progressive Disclosure example for Atomic Agents.++This module demonstrates Anthropic's "progressive disclosure" pattern where+MCP tools are discovered on-demand rather than loaded all at once, significantly+reducing context window usage and improving tool selection accuracy.+"""++__version__ = "0.1.0"diff --git a/atomic-examples/progressive-disclosure/progressive_disclosure/agents/__init__.py b/atomic-examples/progressive-disclosure/progressive_disclosure/agents/__init__.pynew file mode 100644index 0000000..ac9e498--- /dev/null+++ b/atomic-examples/progressive-disclosure/progressive_disclosure/agents/__init__.py@@ -0,0 +1,21 @@+"""Agents module for progressive disclosure."""++from progressive_disclosure.agents.tool_finder_agent import (+ ToolFinderInputSchema,+ ToolFinderOutputSchema,+ create_tool_finder_agent,+)+from progressive_disclosure.agents.orchestrator_agent import (+ OrchestratorFactory,+ OrchestratorInputSchema,+ FinalResponseSchema,+)++__all__ = [+ "ToolFinderInputSchema",+ "ToolFinderOutputSchema",+ "create_tool_finder_agent",+ "OrchestratorFactory",+ "OrchestratorInputSchema",+ "FinalResponseSchema",+]diff --git a/atomic-examples/progressive-disclosure/progressive_disclosure/agents/orchestrator_agent.py b/atomic-examples/progressive-disclosure/progressive_disclosure/agents/orchestrator_agent.pynew file mode 100644index 0000000..2052a25--- /dev/null+++ b/atomic-examples/progressive-disclosure/progressive_disclosure/agents/orchestrator_agent.py@@ -0,0 +1,556 @@+# pyright: reportInvalidTypeForm=false+"""Dynamic Orchestrator Factory for progressive disclosure.++This module provides a factory for creating orchestrator agents with+dynamically filtered tool sets. Instead of loading all available MCP tools,+the orchestrator is created with only the tools selected by the Tool Finder Agent.++This is the key component that achieves context window efficiency through+progressive disclosure.++Supports both sequential and parallel tool execution modes.+"""++from typing import List, Type, Dict, Union, Optional, Any, Callable+from pydantic import Field+import instructor+import asyncio+from concurrent.futures import ThreadPoolExecutor, as_completed++from atomic_agents import AtomicAgent, AgentConfig, BaseIOSchema+from atomic_agents.context import ChatHistory, SystemPromptGenerator+from atomic_agents.base.base_tool import BaseTool+from atomic_agents.connectors.mcp import (+ fetch_mcp_tools,+ MCPTransportType,+)+++########################+# INPUT/OUTPUT SCHEMAS #+########################+class OrchestratorInputSchema(BaseIOSchema):+ """Input schema for the orchestrator agent."""++ query: str = Field(+ ...,+ description="The user's query to process using the available tools.",+ )+++class FinalResponseSchema(BaseIOSchema):+ """Schema for the final response to the user."""++ response_text: str = Field(+ ...,+ description="The final text response to the user's query.",+ )+++class MCPToolOutputSchema(BaseIOSchema):+ """Generic output schema for MCP tool execution."""++ result: Any = Field(..., description="The result from the tool execution.")+++#######################+# ORCHESTRATOR OUTPUT #+#######################+def create_orchestrator_output_schema(+ tool_schemas: tuple[Type[BaseIOSchema], ...],+ parallel: bool = False,+) -> Type[BaseIOSchema]:+ """Dynamically create an orchestrator output schema with the given tools.++ Args:+ tool_schemas: Tuple of tool input schema classes.+ parallel: If True, creates schema supporting multiple parallel actions.++ Returns:+ A new BaseIOSchema class with the dynamic action field(s).+ """+ # Create the union of all schemas+ all_schemas = tool_schemas + (FinalResponseSchema,)+ ActionUnion = Union[all_schemas] # type: ignore[valid-type]++ if parallel:+ class ParallelOrchestratorOutputSchema(BaseIOSchema):+ """Orchestrator output schema supporting parallel tool execution."""++ reasoning: str = Field(+ ...,+ description="Explanation of why these tools are needed and how they work together.",+ )+ actions: List[ActionUnion] = Field( # type: ignore[valid-type]+ ...,+ description="List of tool executions. Independent tools will run in parallel. Include FinalResponseSchema when done.",+ )++ model_config = {"arbitrary_types_allowed": True}++ return ParallelOrchestratorOutputSchema+ else:+ class DynamicOrchestratorOutputSchema(BaseIOSchema):+ """Dynamically generated orchestrator output schema."""++ reasoning: str = Field(+ ...,+ description="Detailed explanation of why this action was chosen and how it addresses the user's query.",+ )+ action: ActionUnion = Field( # type: ignore[valid-type]+ ...,+ description="The chosen action: either a tool's input schema instance or a final response.",+ )++ model_config = {"arbitrary_types_allowed": True}++ return DynamicOrchestratorOutputSchema+++######################+# ORCHESTRATOR CLASS #+######################+class OrchestratorFactory:+ """Factory for creating orchestrator agents with filtered tool sets.++ This factory creates orchestrator agents that only have access to+ the specific tools selected by the Tool Finder Agent, implementing+ the progressive disclosure pattern.++ Supports both sequential (one tool at a time) and parallel execution modes.++ Example:+ >>> factory = OrchestratorFactory(+ ... mcp_endpoint="http://localhost:6969",+ ... transport_type=MCPTransportType.HTTP_STREAM,+ ... client=instructor.from_openai(openai.OpenAI()),+ ... parallel_execution=True, # Enable parallel mode+ ... )+ >>> orchestrator, tool_map = factory.create_with_tools(+ ... ["AddNumbers", "SubtractNumbers"],+ ... all_tools=all_mcp_tools,+ ... )+ """++ def __init__(+ self,+ mcp_endpoint: Optional[str],+ transport_type: MCPTransportType,+ client: instructor.Instructor,+ model: str = "gpt-5.1",+ client_session: Optional[Any] = None,+ event_loop: Optional[asyncio.AbstractEventLoop] = None,+ parallel_execution: bool = True,+ ):+ """Initialize the orchestrator factory.++ Args:+ mcp_endpoint: MCP server endpoint URL (None for STDIO).+ transport_type: MCP transport type (HTTP_STREAM, SSE, STDIO).+ client: Instructor-wrapped LLM client.+ model: Model to use for orchestration.+ client_session: Optional MCP client session for STDIO transport.+ event_loop: Optional event loop for STDIO transport.+ parallel_execution: If True, enables parallel tool execution mode.+ """+ self.mcp_endpoint = mcp_endpoint+ self.transport_type = transport_type+ self.client = client+ self.model = model+ self.client_session = client_session+ self.event_loop = event_loop+ self.parallel_execution = parallel_execution++ def create_with_tools(+ self,+ tool_names: List[str],+ all_tools: Optional[List[Type[BaseTool]]] = None,+ ) -> tuple[AtomicAgent, Dict[Type[BaseIOSchema], Type[BaseTool]]]:+ """Create an orchestrator with only the specified tools.++ This is the core method that achieves progressive disclosure:+ only the selected tools are included in the orchestrator's schema,+ keeping the context window lean and focused.++ Args:+ tool_names: Names of tools to include (from Tool Finder Agent).+ all_tools: Optional pre-fetched list of all MCP tools. If not provided,+ tools will be fetched from the MCP server.++ Returns:+ Tuple of (orchestrator_agent, tool_schema_to_class_map).++ Raises:+ ValueError: If no matching tools are found.+ """+ # Get all tools if not provided+ if all_tools is None:+ all_tools = fetch_mcp_tools(+ mcp_endpoint=self.mcp_endpoint,+ transport_type=self.transport_type,+ client_session=self.client_session,+ event_loop=self.event_loop,+ )++ # Filter to only the requested tools+ filtered_tools = [+ tool for tool in all_tools+ if getattr(tool, "mcp_tool_name", None) in tool_names+ ]++ if not filtered_tools:+ # If no MCP tools match, create a minimal orchestrator+ return self._create_minimal_orchestrator(), {}++ # Build schema-to-class mapping for execution+ tool_schema_to_class: Dict[Type[BaseIOSchema], Type[BaseTool]] = {+ tool.input_schema: tool for tool in filtered_tools+ }++ # Create the dynamic output schema with only filtered tools+ tool_input_schemas = tuple(tool.input_schema for tool in filtered_tools)+ output_schema = create_orchestrator_output_schema(+ tool_input_schemas,+ parallel=self.parallel_execution+ )++ # Build tool descriptions for the system prompt+ tool_descriptions = []+ for tool in filtered_tools:+ tool_name = getattr(tool, "mcp_tool_name", tool.__name__)+ tool_desc = tool.__doc__ or "No description available"+ tool_descriptions.append(f"- {tool_name}: {tool_desc}")++ # Create system prompt based on execution mode+ if self.parallel_execution:+ background = [+ "You are an Orchestrator Agent that MUST use the provided tools.",+ "You have a FOCUSED set of tools for this task.",+ "",+ "Available tools:",+ *tool_descriptions,+ "",+ "CRITICAL: You MUST call tools - never compute results yourself!",+ "PARALLEL MODE: Batch independent tool calls together for speed.",+ ]+ steps = [+ "1. Identify ALL tool calls needed for the query",+ "2. Batch 1: Call ALL tools whose inputs are already known",+ "3. Wait for results, then Batch 2: Call tools using those results",+ "4. Only return FinalResponseSchema AFTER all tools have been called",+ ]+ output_instructions = [+ "MANDATORY: Use tools for ALL calculations - never compute in your head",+ "BATCH independent calls: char_count('a'), char_count('b') → 2 actions together",+ "NEVER skip tools - even for simple math like sqrt or counting",+ "FinalResponseSchema: Only after ALL required tools have returned results",+ ]+ else:+ background = [+ "You are an Orchestrator Agent that processes user queries using available tools.",+ "You have been given a FOCUSED set of tools relevant to the current task.",+ "",+ "Available tools:",+ *tool_descriptions,+ "",+ "SEQUENTIAL MODE: Execute ONE tool per turn.",+ "You will be called multiple times, receiving tool results after each execution.",+ ]+ steps = [+ "1. Analyze what needs to be done next (considering previous results if any)",+ "2. Choose exactly ONE tool to execute, or provide the final response",+ "3. Fill in the tool's parameters directly in the action field",+ "4. After receiving results, continue with the next tool or finalize",+ ]+ output_instructions = [+ "Execute exactly ONE tool per turn",+ "The 'action' field must contain a SINGLE tool's input schema directly",+ "When all tools have been executed, use FinalResponseSchema with the complete answer",+ ]++ # Create the orchestrator agent+ orchestrator = AtomicAgent[OrchestratorInputSchema, output_schema](+ config=AgentConfig(+ client=self.client,+ model=self.model,+ history=ChatHistory(),+ system_prompt_generator=SystemPromptGenerator(+ background=background,+ steps=steps,+ output_instructions=output_instructions,+ ),+ )+ )++ return orchestrator, tool_schema_to_class++ def _create_minimal_orchestrator(self) -> AtomicAgent:+ """Create a minimal orchestrator with no tools (for conversation only)."""+ output_schema = create_orchestrator_output_schema(tuple(), parallel=self.parallel_execution)++ if self.parallel_execution:+ output_instructions = [+ "Provide clear, helpful responses",+ "Use FinalResponseSchema in the actions list for your response",+ ]+ else:+ output_instructions = [+ "Provide clear, helpful responses",+ "Use FinalResponseSchema for your response",+ ]++ return AtomicAgent[OrchestratorInputSchema, output_schema](+ config=AgentConfig(+ client=self.client,+ model=self.model,+ history=ChatHistory(),+ system_prompt_generator=SystemPromptGenerator(+ background=[+ "You are an assistant that responds to user queries.",+ "No tools are currently available for this query.",+ ],+ steps=[+ "1. Analyze the user's query",+ "2. Provide a helpful response based on your knowledge",+ ],+ output_instructions=output_instructions,+ ),+ )+ )+++##################################+# SEQUENTIAL EXECUTION (LEGACY) #+##################################+def execute_orchestrator_loop(+ orchestrator: AtomicAgent,+ tool_schema_to_class: Dict[Type[BaseIOSchema], Type[BaseTool]],+ initial_query: str,+ max_iterations: int = 10,+ on_tool_execution: Optional[Callable] = None,+) -> str:+ """Execute the orchestrator loop sequentially (one tool at a time).++ This function handles the multi-turn interaction where the orchestrator+ selects and executes tools until it produces a final response.++ Args:+ orchestrator: The orchestrator agent.+ tool_schema_to_class: Mapping from input schemas to tool classes.+ initial_query: The user's initial query.+ max_iterations: Maximum number of tool executions.+ on_tool_execution: Optional callback for tool execution events.++ Returns:+ The final response text.+ """+ # Initial run with user query+ output = orchestrator.run(OrchestratorInputSchema(query=initial_query))+ action = output.action++ iteration = 0+ while not isinstance(action, FinalResponseSchema) and iteration < max_iterations:+ iteration += 1+ schema_type = type(action)++ # Find and execute the matching tool+ tool_class = tool_schema_to_class.get(schema_type)+ if tool_class is None:+ raise ValueError(f"Unknown action schema: {schema_type.__name__}")++ # Execute the tool+ tool_instance = tool_class()+ tool_name = getattr(tool_class, "mcp_tool_name", tool_class.__name__)++ if on_tool_execution:+ on_tool_execution(tool_name, action.model_dump())++ tool_output = tool_instance.run(action)++ # Add result to history+ result_message = OrchestratorInputSchema(+ query=f"Tool '{tool_name}' executed. Result: {tool_output.result}"+ )+ orchestrator.history.add_message("system", result_message)++ # Continue the loop+ output = orchestrator.run()+ action = output.action++ if isinstance(action, FinalResponseSchema):+ return action.response_text+ else:+ return "Maximum iterations reached. Please try a simpler query."+++##################################+# PARALLEL EXECUTION #+##################################+def execute_orchestrator_loop_parallel(+ orchestrator: AtomicAgent,+ tool_schema_to_class: Dict[Type[BaseIOSchema], Type[BaseTool]],+ initial_query: str,+ max_iterations: int = 10,+ on_tool_execution: Optional[Callable] = None,+ on_parallel_batch: Optional[Callable] = None,+ max_parallel_workers: int = 5,+) -> str:+ """Execute the orchestrator loop with parallel tool execution.++ When the orchestrator returns multiple independent tools in its 'actions' list,+ they are executed concurrently using a thread pool for maximum efficiency.++ Args:+ orchestrator: The orchestrator agent (must be created with parallel_execution=True).+ tool_schema_to_class: Mapping from input schemas to tool classes.+ initial_query: The user's initial query.+ max_iterations: Maximum number of execution rounds (not individual tools).+ on_tool_execution: Optional callback for each tool execution.+ on_parallel_batch: Optional callback when a parallel batch starts, receives count.+ max_parallel_workers: Maximum concurrent tool executions.++ Returns:+ The final response text.+ """+ # Initial run with user query+ output = orchestrator.run(OrchestratorInputSchema(query=initial_query))+ actions = output.actions # List of actions in parallel mode++ # Track executed tool calls to prevent duplicates+ executed_calls: set[str] = set()++ def get_call_signature(action) -> str:+ """Create a unique signature for a tool call."""+ tool_class = tool_schema_to_class.get(type(action))+ if tool_class is None:+ return ""+ tool_name = getattr(tool_class, "mcp_tool_name", tool_class.__name__)+ # Create signature from tool name + sorted params+ params = action.model_dump()+ params.pop("tool_name", None) # Remove tool_name from params+ param_str = str(sorted(params.items()))+ return f"{tool_name}:{param_str}"++ iteration = 0+ while iteration < max_iterations:+ iteration += 1++ # Separate final response from tool actions+ final_responses = [a for a in actions if isinstance(a, FinalResponseSchema)]+ tool_actions = [a for a in actions if not isinstance(a, FinalResponseSchema)]++ # Filter out duplicate tool calls+ unique_tool_actions = []+ skipped_duplicates = 0+ for action in tool_actions:+ sig = get_call_signature(action)+ if sig and sig not in executed_calls:+ unique_tool_actions.append(action)+ executed_calls.add(sig)+ else:+ skipped_duplicates += 1++ tool_actions = unique_tool_actions++ # If no tool actions, we're done - return final response or error+ if not tool_actions:+ if final_responses:+ return final_responses[0].response_text+ # If we skipped duplicates, prompt model for final answer+ if skipped_duplicates > 0:+ prompt_msg = OrchestratorInputSchema(+ query="All tool results are now available. Please provide your final answer using FinalResponseSchema."+ )+ orchestrator.history.add_message("system", prompt_msg)+ output = orchestrator.run()+ actions = output.actions+ continue # Re-check for FinalResponseSchema+ return "No actions returned by orchestrator."++ # Notify about parallel batch+ if on_parallel_batch and len(tool_actions) > 1:+ on_parallel_batch(len(tool_actions))++ # Execute tools in parallel using ThreadPoolExecutor+ def execute_single_tool(action):+ schema_type = type(action)+ tool_class = tool_schema_to_class.get(schema_type)+ if tool_class is None:+ return {"error": f"Unknown action schema: {schema_type.__name__}"}++ tool_instance = tool_class()+ tool_name = getattr(tool_class, "mcp_tool_name", tool_class.__name__)++ if on_tool_execution:+ on_tool_execution(tool_name, action.model_dump())++ try:+ # Use sync run method - it handles async internally for MCP tools+ import warnings+ with warnings.catch_warnings():+ warnings.simplefilter("ignore", RuntimeWarning)+ tool_output = tool_instance.run(action)+ return {+ "tool_name": tool_name,+ "result": tool_output.result,+ "success": True,+ }+ except Exception as e:+ return {+ "tool_name": tool_name,+ "error": str(e),+ "success": False,+ }++ # Execute all tools in parallel+ results = []+ with ThreadPoolExecutor(max_workers=max_parallel_workers) as executor:+ future_to_action = {+ executor.submit(execute_single_tool, action): action+ for action in tool_actions+ }+ for future in as_completed(future_to_action):+ results.append(future.result())++ # Build result message for history+ if len(results) == 1:+ r = results[0]+ if r.get("success"):+ result_text = f"Tool '{r['tool_name']}' executed. Result: {r['result']}"+ else:+ result_text = f"Tool '{r['tool_name']}' failed. Error: {r.get('error')}"+ else:+ result_lines = ["Tools executed in parallel:"]+ for r in results:+ if r.get("success"):+ result_lines.append(f" - {r['tool_name']}: {r['result']}")+ else:+ result_lines.append(f" - {r['tool_name']}: ERROR - {r.get('error')}")+ result_text = "\n".join(result_lines)++ # Add results to history+ result_message = OrchestratorInputSchema(query=result_text)+ orchestrator.history.add_message("system", result_message)++ # Continue the loop+ output = orchestrator.run()+ actions = output.actions++ return "Maximum iterations reached. Please try a simpler query."+++#################+# EXAMPLE USAGE #+#################+if __name__ == "__main__":+ from rich.console import Console++ console = Console()+ console.print("[bold]Orchestrator Factory Demo[/bold]")+ console.print("This module is typically used via main.py")+ console.print("See main.py for a complete example of progressive disclosure in action.")+ console.print("")+ console.print("[cyan]Parallel Execution Mode:[/cyan]")+ console.print(" - Multiple independent tools execute concurrently")+ console.print(" - Example: sqrt(14) + sqrt(10) runs both sqrt calls in parallel")+ console.print(" - Reduces latency by ~50% for independent operations")diff --git a/atomic-examples/progressive-disclosure/progressive_disclosure/agents/tool_finder_agent.py b/atomic-examples/progressive-disclosure/progressive_disclosure/agents/tool_finder_agent.pynew file mode 100644index 0000000..7aeeb65--- /dev/null+++ b/atomic-examples/progressive-disclosure/progressive_disclosure/agents/tool_finder_agent.py@@ -0,0 +1,263 @@+"""Tool Finder Agent for progressive disclosure.++This agent is responsible for discovering relevant tools for a given user query.+It analyzes the lightweight tool registry to find the most appropriate tools,+allowing the main orchestrator to be created with only the necessary tools+loaded into its context window.++This implements the "search_tools" pattern from Anthropic's progressive disclosure.+"""++from typing import List, Optional+from pydantic import Field+import instructor++from atomic_agents import AtomicAgent, AgentConfig, BaseIOSchema+from atomic_agents.context import SystemPromptGenerator, BaseDynamicContextProvider++from progressive_disclosure.registry.tool_registry import ToolRegistry+++########################+# INPUT/OUTPUT SCHEMAS #+########################+class ToolFinderInputSchema(BaseIOSchema):+ """Input for the tool finder agent."""++ user_query: str = Field(+ ...,+ description="The user's original query that needs to be analyzed to determine required tools.",+ )+ task_context: Optional[str] = Field(+ default=None,+ description="Additional context about the task that might help with tool selection.",+ )+++class ToolFinderOutputSchema(BaseIOSchema):+ """Output containing selected tools for the main orchestrator."""++ reasoning: str = Field(+ ...,+ description="Detailed explanation of why these specific tools were selected and how they relate to the user's query.",+ )+ selected_tools: List[str] = Field(+ ...,+ description="Names of tools that should be loaded for the main orchestrator. Keep this list minimal.",+ )+ search_queries_used: List[str] = Field(+ default_factory=list,+ description="Keywords or concepts used to identify these tools.",+ )+ confidence: str = Field(+ default="high",+ description="Confidence level in tool selection: 'high', 'medium', or 'low'.",+ )+++#####################+# CONTEXT PROVIDERS #+#####################+class ToolRegistryProvider(BaseDynamicContextProvider):+ """Provides the full tool registry to the finder agent."""++ def __init__(self, registry: ToolRegistry, title: str = "Available Tools"):+ super().__init__(title)+ self._registry = registry++ def get_info(self) -> str:+ """Get all available tools with descriptions."""+ tools = self._registry.get_all_tools()+ if not tools:+ return "No tools available in registry."++ lines = ["The following tools are available:\n"]+ for tool in tools:+ lines.append(f"- **{tool.name}**: {tool.description}")++ lines.append("\nSelect ONLY the tools needed to complete the user's query.")+ return "\n".join(lines)+++#############################+# TOOL FINDER AGENT FACTORY #+#############################+def create_tool_finder_agent(+ registry: ToolRegistry,+ client: instructor.Instructor,+ model: str = "gpt-4o-mini",+) -> tuple[AtomicAgent, None, None]:+ """Create a tool finder agent with access to tool metadata.++ The tool finder agent uses a lightweight model to analyze user queries+ and determine which MCP tools should be loaded for the main orchestrator.++ Args:+ registry: Tool registry containing metadata about available tools.+ client: Instructor-wrapped LLM client.+ model: Model to use for the finder agent. Default is gpt-4o-mini+ for cost efficiency since this is a discovery task.++ Returns:+ Tuple of (agent, None, None) - the None values maintain API compatibility.++ Example:+ >>> registry = ToolRegistry()+ >>> registry.register_from_mcp(mcp_definitions)+ >>> client = instructor.from_openai(openai.OpenAI())+ >>> agent, _, _ = create_tool_finder_agent(registry, client)+ >>> result = run_tool_finder(agent, None, None, "Calculate 2+2")+ >>> print(result.selected_tools)+ ['add_numbers']+ """+ # Create the agent+ agent = AtomicAgent[ToolFinderInputSchema, ToolFinderOutputSchema](+ config=AgentConfig(+ client=client,+ model=model,+ system_prompt_generator=SystemPromptGenerator(+ background=[+ "You are a Tool Finder Agent specialized in discovering relevant tools for user queries.",+ "Your role is to analyze user queries and find the MINIMUM set of tools needed to accomplish the task.",+ "You have access to a list of available MCP tools with their descriptions.",+ "",+ "IMPORTANT: Your goal is CONTEXT EFFICIENCY - select only the tools that are directly needed.",+ "The tools you select will be loaded into another agent's context window.",+ "Loading unnecessary tools wastes context space and reduces accuracy.",+ ],+ steps=[+ "1. Analyze the user's query to understand what capabilities are needed",+ "2. Review the available tools list provided in your context",+ "3. Select ONLY the tools that are necessary for this specific query",+ "4. Provide your selection with clear reasoning",+ ],+ output_instructions=[+ "Select the MINIMUM number of tools needed - prefer fewer tools over more",+ "Only include tools that are directly relevant to accomplishing the user's task",+ "If no tools are needed (e.g., general conversation), return an empty list",+ "Include clear reasoning for each selected tool",+ "Rate your confidence: 'high' if certain, 'medium' if tools might work, 'low' if unsure",+ "Use the exact tool names as they appear in the available tools list",+ ],+ ),+ )+ )++ # Register context provider with full tool list+ agent.register_context_provider(+ "tool_registry",+ ToolRegistryProvider(registry, "Available Tools"),+ )++ return agent, None, None+++def run_tool_finder(+ agent: AtomicAgent,+ search_tool, # Not used, kept for API compatibility+ list_tool, # Not used, kept for API compatibility+ user_query: str,+ task_context: Optional[str] = None,+ max_iterations: int = 5, # Not used, kept for API compatibility+) -> ToolFinderOutputSchema:+ """Run the tool finder agent to discover relevant tools.++ This is a single-pass approach - the agent sees all tool metadata+ and selects the relevant tools in one call.++ Args:+ agent: The tool finder agent.+ search_tool: Not used (kept for API compatibility).+ list_tool: Not used (kept for API compatibility).+ user_query: The user's query to analyze.+ task_context: Optional additional context.+ max_iterations: Not used (kept for API compatibility).++ Returns:+ ToolFinderOutputSchema with the selected tools.+ """+ input_schema = ToolFinderInputSchema(+ user_query=user_query,+ task_context=task_context,+ )++ # Single-pass tool selection+ result = agent.run(input_schema)+ return result+++#################+# EXAMPLE USAGE #+#################+if __name__ == "__main__":+ import os+ from dotenv import load_dotenv+ from rich.console import Console+ import openai+ from progressive_disclosure.registry.tool_registry import ToolMetadata++ load_dotenv()+ console = Console()++ # Create a test registry+ registry = ToolRegistry()+ registry.register(ToolMetadata(+ name="add_numbers",+ description="Add two numbers together",+ keywords=["add", "sum", "plus", "arithmetic"],+ category="math",+ ))+ registry.register(ToolMetadata(+ name="subtract_numbers",+ description="Subtract one number from another",+ keywords=["subtract", "minus", "difference", "arithmetic"],+ category="math",+ ))+ registry.register(ToolMetadata(+ name="multiply_numbers",+ description="Multiply two numbers together",+ keywords=["multiply", "times", "product", "arithmetic"],+ category="math",+ ))+ registry.register(ToolMetadata(+ name="divide_numbers",+ description="Divide one number by another",+ keywords=["divide", "quotient", "arithmetic"],+ category="math",+ ))+ registry.register(ToolMetadata(+ name="uppercase",+ description="Convert text to uppercase",+ keywords=["upper", "capitalize", "text"],+ category="text",+ ))+ registry.register(ToolMetadata(+ name="reverse_text",+ description="Reverse the characters in text",+ keywords=["reverse", "backwards", "text"],+ category="text",+ ))++ # Create client+ client = instructor.from_openai(openai.OpenAI(api_key=os.getenv("OPENAI_API_KEY")))++ # Create finder agent+ agent, _, _ = create_tool_finder_agent(registry, client)++ # Test queries+ test_queries = [+ "What is 5 plus 3?",+ "Calculate (10 - 4) * 2",+ "Reverse the word HELLO and convert ABC to uppercase",+ ]++ for query in test_queries:+ console.print(f"\n[bold cyan]Query:[/bold cyan] {query}")+ result = run_tool_finder(agent, None, None, query)+ console.print(f"[bold green]Selected tools:[/bold green] {result.selected_tools}")+ console.print(f"[dim]Reasoning: {result.reasoning}[/dim]")+ console.print(f"[dim]Confidence: {result.confidence}[/dim]")++ # Reset history for next query+ agent.history.history = []+ agent.history.current_turn_id = Nonediff --git a/atomic-examples/progressive-disclosure/progressive_disclosure/main.py b/atomic-examples/progressive-disclosure/progressive_disclosure/main.pynew file mode 100644index 0000000..3eba6f4--- /dev/null+++ b/atomic-examples/progressive-disclosure/progressive_disclosure/main.py@@ -0,0 +1,416 @@+# pyright: reportInvalidTypeForm=false+"""Progressive Disclosure Demo with Multiple MCP Servers.++This script demonstrates Anthropic's "progressive disclosure" pattern where+MCP tools are discovered on-demand rather than loaded all at once.++We have THREE MCP servers:+- math-server: 8 arithmetic tools (add, subtract, multiply, divide, power, sqrt, modulo, abs)+- text-server: 8 text manipulation tools (uppercase, lowercase, reverse, word_count, etc.)+- data-server: 8 list/data tools (sort, filter, sum, average, min, max, unique)++Total: 24 tools across 3 servers.++The progressive disclosure pattern:+1. Tool Finder Agent searches for relevant tools based on user query+2. Only selected tools (typically 2-5) are loaded into the Main Orchestrator+3. Result: ~90% reduction in context window usage++Without progressive disclosure: All 24 tool schemas in context (~12,000 tokens)+With progressive disclosure: Only 2-5 relevant tools (~1,000 tokens)+"""++import asyncio+import os+import shlex+from contextlib import AsyncExitStack+from dataclasses import dataclass, field+from typing import Optional, List, Type, Dict++import instructor+import openai+from dotenv import load_dotenv+from rich.console import Console+from rich.panel import Panel+from rich.table import Table+from mcp import ClientSession, StdioServerParameters+from mcp.client.stdio import stdio_client++from atomic_agents.connectors.mcp import (+ fetch_mcp_tools,+ MCPTransportType,+)+from atomic_agents.base.base_tool import BaseTool++from progressive_disclosure.registry.tool_registry import ToolRegistry, MCPToolDefinition+from progressive_disclosure.agents.tool_finder_agent import (+ create_tool_finder_agent,+ run_tool_finder,+)+from progressive_disclosure.agents.orchestrator_agent import (+ OrchestratorFactory,+ FinalResponseSchema,+ execute_orchestrator_loop,+ execute_orchestrator_loop_parallel,+)+++########################+# CONFIGURATION #+########################+@dataclass+class ServerConfig:+ """Configuration for an MCP server."""+ name: str+ command: str+ category: str # For tool categorization+++@dataclass+class ProgressiveDisclosureConfig:+ """Configuration for the Progressive Disclosure demo."""++ openai_api_key: str = field(default_factory=lambda: os.getenv("OPENAI_API_KEY", ""))+ finder_model: str = "gpt-4o-mini" # Lightweight model for tool discovery+ orchestrator_model: str = "gpt-5.1" # More capable model for execution+ parallel_execution: bool = True # Enable parallel tool execution++ # Three MCP servers demonstrating multi-server progressive disclosure+ servers: List[ServerConfig] = field(default_factory=lambda: [+ ServerConfig(+ name="math-server",+ command="uv run pd-math-server",+ category="math"+ ),+ ServerConfig(+ name="text-server",+ command="uv run pd-text-server",+ category="text"+ ),+ ServerConfig(+ name="data-server",+ command="uv run pd-data-server",+ category="data"+ ),+ ])++ def __post_init__(self):+ if not self.openai_api_key:+ raise ValueError("OPENAI_API_KEY environment variable is not set")+++########################+# SERVER SESSION MGR #+########################+class MCPServerManager:+ """Manages connections to multiple MCP servers."""++ def __init__(self, server_configs: List[ServerConfig]):+ self.server_configs = server_configs+ self.sessions: Dict[str, ClientSession] = {}+ self.loops: Dict[str, asyncio.AbstractEventLoop] = {}+ self.exit_stacks: Dict[str, AsyncExitStack] = {}+ self.tools_by_server: Dict[str, List[Type[BaseTool]]] = {}+ self.all_tools: List[Type[BaseTool]] = []++ async def _connect_server(self, config: ServerConfig) -> ClientSession:+ """Connect to a single MCP server."""+ exit_stack = AsyncExitStack()+ self.exit_stacks[config.name] = exit_stack++ command_parts = shlex.split(config.command)+ server_params = StdioServerParameters(+ command=command_parts[0],+ args=command_parts[1:],+ env=None+ )++ read_stream, write_stream = await exit_stack.enter_async_context(+ stdio_client(server_params)+ )+ session = await exit_stack.enter_async_context(+ ClientSession(read_stream, write_stream)+ )+ await session.initialize()+ return session++ def connect_all(self, console: Console) -> None:+ """Connect to all configured MCP servers."""+ for config in self.server_configs:+ console.print(f"[dim]Connecting to {config.name}...[/dim]")++ # Create event loop for this server+ loop = asyncio.new_event_loop()+ self.loops[config.name] = loop++ # Connect+ session = loop.run_until_complete(self._connect_server(config))+ self.sessions[config.name] = session++ # Fetch tools+ tools = fetch_mcp_tools(+ mcp_endpoint=None,+ transport_type=MCPTransportType.STDIO,+ client_session=session,+ event_loop=loop,+ )++ self.tools_by_server[config.name] = tools+ self.all_tools.extend(tools)++ console.print(f"[green] Connected: {len(tools)} tools[/green]")++ def close_all(self, console: Console) -> None:+ """Close all server connections."""+ for name in list(self.sessions.keys()):+ console.print(f"[dim]Closing {name}...[/dim]")+ try:+ loop = self.loops.get(name)+ exit_stack = self.exit_stacks.get(name)+ if loop and exit_stack:+ loop.run_until_complete(exit_stack.aclose())+ loop.close()+ except Exception as e:+ console.print(f"[red]Error closing {name}: {e}[/red]")+++########################+# STATISTICS TRACKING #+########################+@dataclass+class DisclosureStats:+ """Track statistics to demonstrate progressive disclosure benefits."""++ total_tools_available: int = 0+ tools_selected: int = 0+ servers_with_selected_tools: int = 0+ search_queries_made: int = 0+ tool_executions: int = 0+ parallel_batches: int = 0+ tools_in_parallel: int = 0++ @property+ def tools_filtered_percentage(self) -> float:+ """Percentage of tools that were NOT loaded."""+ if self.total_tools_available == 0:+ return 0.0+ return ((self.total_tools_available - self.tools_selected) / self.total_tools_available) * 100++ def display(self, console: Console) -> None:+ """Display statistics."""+ table = Table(title="Progressive Disclosure Statistics", box=None)+ table.add_column("Metric", style="cyan")+ table.add_column("Value", style="green")++ table.add_row("Total tools (3 servers)", str(self.total_tools_available))+ table.add_row("Tools selected for query", str(self.tools_selected))+ table.add_row("Context reduction", f"{self.tools_filtered_percentage:.1f}%")+ table.add_row("Search queries made", str(self.search_queries_made))+ table.add_row("Tool executions", str(self.tool_executions))+ if self.parallel_batches > 0:+ table.add_row("Parallel batches", str(self.parallel_batches))+ table.add_row("Tools run in parallel", str(self.tools_in_parallel))++ console.print(table)+++########################+# MAIN DEMO FUNCTION #+########################+def main():+ """Run the progressive disclosure demonstration with multiple MCP servers."""+ load_dotenv()+ console = Console()+ config = ProgressiveDisclosureConfig()++ console.print(Panel.fit(+ "[bold cyan]Progressive Disclosure Demo[/bold cyan]\n"+ "[dim]Demonstrating Anthropic's pattern with 3 MCP servers (24 total tools)[/dim]",+ border_style="cyan"+ ))++ # Initialize instructor client+ client = instructor.from_openai(openai.OpenAI(api_key=config.openai_api_key))++ # Initialize server manager+ server_manager = MCPServerManager(config.servers)++ try:+ # Connect to all servers+ console.print("\n[bold]Connecting to MCP servers...[/bold]")+ server_manager.connect_all(console)++ all_tools = server_manager.all_tools+ if not all_tools:+ console.print("[red]No tools found across any server.[/red]")+ return++ # Display all available tools by server+ for server_config in config.servers:+ server_tools = server_manager.tools_by_server.get(server_config.name, [])+ table = Table(title=f"{server_config.name} Tools", box=None)+ table.add_column("Tool", style="cyan")+ table.add_column("Description", style="dim", max_width=50)++ for tool in server_tools:+ name = getattr(tool, "mcp_tool_name", tool.__name__)+ desc = (tool.__doc__ or "")[:50]+ table.add_row(name, desc)+ console.print(table)++ console.print(f"\n[bold green]Total: {len(all_tools)} tools across {len(config.servers)} servers[/bold green]")++ # Create lightweight tool registry+ console.print("\n[dim]Building lightweight tool registry (metadata only)...[/dim]")+ registry = ToolRegistry()++ mcp_definitions = []+ for server_config in config.servers:+ for tool in server_manager.tools_by_server.get(server_config.name, []):+ name = getattr(tool, "mcp_tool_name", tool.__name__)+ description = tool.__doc__ or ""+ mcp_definitions.append(MCPToolDefinition(+ name=name,+ description=description,+ input_schema={},+ ))++ registry.register_from_mcp(mcp_definitions)++ # Create Tool Finder Agent+ console.print("[dim]Creating Tool Finder Agent (sub-agent)...[/dim]")+ finder_agent, search_tool, list_tool = create_tool_finder_agent(+ registry=registry,+ client=client,+ model=config.finder_model,+ )+ console.print(f"[green]Tool Finder ready (using {config.finder_model})[/green]")++ # Create Orchestrator Factory+ # We'll pass all tools and let the factory filter+ orchestrator_factory = OrchestratorFactory(+ mcp_endpoint=None,+ transport_type=MCPTransportType.STDIO,+ client=client,+ model=config.orchestrator_model,+ parallel_execution=config.parallel_execution,+ # We don't pass session/loop since tools already have them bound+ )++ # Interactive loop+ console.print("\n[bold green]Ready! Type '/exit' to quit, '/stats' for statistics.[/bold green]")+ console.print("[dim]Example queries:[/dim]")+ console.print("[dim] - 'Calculate (5 + 3) * 2' (math tools)[/dim]")+ console.print("[dim] - 'Convert HELLO WORLD to lowercase' (text tools)[/dim]")+ console.print("[dim] - 'Find the average of [1,2,3,4,5]' (data tools)[/dim]")+ console.print("[dim] - 'Reverse the text ABC and add 10+5' (multi-server!)[/dim]\n")++ stats = DisclosureStats(total_tools_available=len(all_tools))++ while True:+ query = console.input("[bold yellow]You:[/bold yellow] ").strip()++ if query.lower() in {"/exit", "/quit"}:+ console.print("[bold red]Exiting. Goodbye![/bold red]")+ break++ if query.lower() == "/stats":+ stats.display(console)+ continue++ if not query:+ continue++ try:+ # Phase 1: Tool Discovery (Progressive Disclosure)+ console.print("\n[bold cyan]Phase 1: Tool Discovery[/bold cyan]")+ console.print(f"[dim]Sub-agent searching {len(all_tools)} tools across {len(config.servers)} servers...[/dim]")++ finder_result = run_tool_finder(+ agent=finder_agent,+ search_tool=search_tool,+ list_tool=list_tool,+ user_query=query,+ )++ stats.search_queries_made += len(finder_result.search_queries_used)+ stats.tools_selected = len(finder_result.selected_tools)++ console.print(f"[green]Selected {len(finder_result.selected_tools)} tools:[/green] {finder_result.selected_tools}")+ console.print(f"[dim]Reasoning: {finder_result.reasoning}[/dim]")++ # Phase 2: Dynamic Orchestrator Creation+ console.print("\n[bold cyan]Phase 2: Creating Focused Orchestrator[/bold cyan]")++ orchestrator, tool_map = orchestrator_factory.create_with_tools(+ tool_names=finder_result.selected_tools,+ all_tools=all_tools,+ )++ if finder_result.selected_tools:+ console.print(+ f"[green]Orchestrator context: {len(finder_result.selected_tools)} tools "+ f"(filtered {stats.tools_filtered_percentage:.0f}% = saved ~{(len(all_tools) - len(finder_result.selected_tools)) * 500} tokens)[/green]"+ )+ else:+ console.print("[yellow]No tools needed - conversational response[/yellow]")++ # Phase 3: Query Execution+ console.print("\n[bold cyan]Phase 3: Query Execution[/bold cyan]")++ def on_tool_execution(tool_name: str, params: dict):+ stats.tool_executions += 1+ console.print(f"[blue]Executing:[/blue] {tool_name}")+ console.print(f"[dim]Parameters: {params}[/dim]")++ def on_parallel_batch(count: int):+ stats.parallel_batches += 1+ stats.tools_in_parallel += count+ console.print(f"[magenta]⚡ Parallel batch:[/magenta] {count} tools executing simultaneously")++ if config.parallel_execution:+ response = execute_orchestrator_loop_parallel(+ orchestrator=orchestrator,+ tool_schema_to_class=tool_map,+ initial_query=query,+ on_tool_execution=on_tool_execution,+ on_parallel_batch=on_parallel_batch,+ )+ else:+ response = execute_orchestrator_loop(+ orchestrator=orchestrator,+ tool_schema_to_class=tool_map,+ initial_query=query,+ on_tool_execution=on_tool_execution,+ )++ console.print(f"\n[bold green]Response:[/bold green] {response}")++ # Show savings summary+ savings_pct = stats.tools_filtered_percentage+ parallel_info = " | ⚡ Parallel mode" if config.parallel_execution else ""+ console.print(Panel(+ f"[dim]Progressive Disclosure: {len(finder_result.selected_tools)}/{len(all_tools)} tools loaded "+ f"({savings_pct:.0f}% context reduction){parallel_info}[/dim]",+ border_style="dim",+ ))++ # Reset histories for next query+ finder_agent.history.history = []+ finder_agent.history.current_turn_id = None+ orchestrator.history.history = []+ orchestrator.history.current_turn_id = None++ except Exception as e:+ console.print(f"[red]Error:[/red] {str(e)}")+ import traceback+ console.print(f"[dim]{traceback.format_exc()}[/dim]")++ finally:+ # Cleanup all servers+ console.print("\n[dim]Cleaning up server connections...[/dim]")+ server_manager.close_all(console)+++if __name__ == "__main__":+ main()diff --git a/atomic-examples/progressive-disclosure/progressive_disclosure/registry/__init__.py b/atomic-examples/progressive-disclosure/progressive_disclosure/registry/__init__.pynew file mode 100644index 0000000..1b828fb--- /dev/null+++ b/atomic-examples/progressive-disclosure/progressive_disclosure/registry/__init__.py@@ -0,0 +1,5 @@+"""Tool registry module for progressive disclosure."""++from progressive_disclosure.registry.tool_registry import ToolRegistry, ToolMetadata++__all__ = ["ToolRegistry", "ToolMetadata"]diff --git a/atomic-examples/progressive-disclosure/progressive_disclosure/registry/tool_registry.py b/atomic-examples/progressive-disclosure/progressive_disclosure/registry/tool_registry.pynew file mode 100644index 0000000..02334d3--- /dev/null+++ b/atomic-examples/progressive-disclosure/progressive_disclosure/registry/tool_registry.py@@ -0,0 +1,239 @@+"""Lightweight tool registry for progressive disclosure.++This module provides a registry that holds tool metadata (name, description, keywords)+without loading the full schema definitions. This enables efficient tool discovery+where the sub-agent can search through available tools without incurring the context+window cost of full schema definitions.+"""++import re+from dataclasses import dataclass, field+from typing import Dict, List, Optional, Any, NamedTuple+++class MCPToolDefinition(NamedTuple):+ """Definition of an MCP tool (matching atomic-agents structure)."""++ name: str+ description: Optional[str]+ input_schema: Dict[str, Any]+++@dataclass+class ToolMetadata:+ """Lightweight tool representation for search.++ This stores only the essential metadata needed for tool discovery,+ avoiding the full JSON schema that would bloat the context window.+ """++ name: str+ description: str+ keywords: List[str] = field(default_factory=list)+ category: Optional[str] = None++ def to_search_string(self) -> str:+ """Create a searchable string representation."""+ parts = [self.name, self.description]+ if self.keywords:+ parts.extend(self.keywords)+ if self.category:+ parts.append(self.category)+ return " ".join(parts).lower()+++class ToolRegistry:+ """Registry that holds tool metadata for progressive discovery.++ The registry stores lightweight metadata about available tools,+ enabling efficient search without loading full schema definitions.+ This is a key component of the progressive disclosure pattern.++ Example:+ >>> registry = ToolRegistry()+ >>> registry.register_from_mcp(mcp_definitions)+ >>> results = registry.search("calculate numbers", max_results=3)+ >>> for tool in results:+ ... print(f"{tool.name}: {tool.description}")+ """++ def __init__(self):+ self._tools: Dict[str, ToolMetadata] = {}++ def register(self, metadata: ToolMetadata) -> None:+ """Register a single tool's metadata."""+ self._tools[metadata.name] = metadata++ def register_from_mcp(self, mcp_definitions: List[MCPToolDefinition]) -> None:+ """Register tools from MCP definitions (metadata only, no schemas).++ Args:+ mcp_definitions: List of MCP tool definitions to register.+ Only name and description are stored.+ """+ for defn in mcp_definitions:+ keywords = self._extract_keywords(defn.description)+ category = self._infer_category(defn.name, defn.description)++ self._tools[defn.name] = ToolMetadata(+ name=defn.name,+ description=defn.description or "",+ keywords=keywords,+ category=category,+ )++ def _extract_keywords(self, description: Optional[str]) -> List[str]:+ """Extract keywords from a tool description.++ Uses simple heuristics to identify important terms:+ - Words longer than 3 characters+ - Words not in common stop words+ - Capitalized words (likely proper nouns or technical terms)+ """+ if not description:+ return []++ # Common stop words to filter out+ stop_words = {+ "the", "a", "an", "and", "or", "but", "in", "on", "at", "to", "for",+ "of", "with", "by", "from", "as", "is", "was", "are", "were", "been",+ "be", "have", "has", "had", "do", "does", "did", "will", "would",+ "could", "should", "may", "might", "must", "shall", "can", "this",+ "that", "these", "those", "it", "its", "they", "them", "their",+ "we", "us", "our", "you", "your", "i", "me", "my", "he", "she",+ "his", "her", "which", "who", "whom", "what", "when", "where",+ "why", "how", "all", "each", "every", "both", "few", "more",+ "most", "other", "some", "such", "no", "not", "only", "own",+ "same", "so", "than", "too", "very", "just", "also", "now",+ }++ # Extract words+ words = re.findall(r'\b[a-zA-Z]+\b', description.lower())++ # Filter and deduplicate+ keywords = []+ seen = set()+ for word in words:+ if len(word) > 3 and word not in stop_words and word not in seen:+ keywords.append(word)+ seen.add(word)++ return keywords[:10] # Limit to top 10 keywords++ def _infer_category(self, name: str, description: Optional[str]) -> Optional[str]:+ """Infer a category for the tool based on name and description.++ Categories help with broad filtering before detailed search.+ """+ text = f"{name} {description or ''}".lower()++ categories = {+ "math": ["add", "subtract", "multiply", "divide", "calculate", "math", "number", "arithmetic"],+ "search": ["search", "find", "query", "lookup", "fetch"],+ "file": ["file", "read", "write", "save", "load", "open", "close"],+ "data": ["data", "database", "sql", "json", "xml", "csv"],+ "web": ["http", "api", "request", "url", "web", "download", "upload"],+ "text": ["text", "string", "parse", "format", "convert"],+ }++ for category, keywords in categories.items():+ if any(kw in text for kw in keywords):+ return category++ return None++ def search(self, query: str, max_results: int = 5, category: Optional[str] = None) -> List[ToolMetadata]:+ """Search for tools matching the query.++ Uses a simple relevance scoring based on:+ - Exact name match (highest weight)+ - Name contains query terms+ - Description contains query terms+ - Keyword matches++ Args:+ query: Search query string+ max_results: Maximum number of results to return+ category: Optional category filter++ Returns:+ List of ToolMetadata sorted by relevance+ """+ query_terms = set(query.lower().split())+ scored_results: List[tuple[float, ToolMetadata]] = []++ for metadata in self._tools.values():+ # Apply category filter if specified+ if category and metadata.category != category:+ continue++ score = self._calculate_relevance(metadata, query_terms)+ if score > 0:+ scored_results.append((score, metadata))++ # Sort by score descending+ scored_results.sort(key=lambda x: x[0], reverse=True)++ return [metadata for _, metadata in scored_results[:max_results]]++ def _calculate_relevance(self, metadata: ToolMetadata, query_terms: set[str]) -> float:+ """Calculate relevance score for a tool against query terms."""+ score = 0.0+ name_lower = metadata.name.lower()+ search_string = metadata.to_search_string()++ for term in query_terms:+ # Exact name match - highest weight+ if term == name_lower:+ score += 10.0++ # Name contains term+ elif term in name_lower:+ score += 5.0++ # Term in description/keywords+ if term in search_string:+ score += 2.0++ # Partial match in keywords+ for keyword in metadata.keywords:+ if term in keyword or keyword in term:+ score += 1.0++ return score++ def get_all_metadata(self) -> List[ToolMetadata]:+ """Get all tool metadata (for context provider listing)."""+ return list(self._tools.values())++ def get_all_tools(self) -> List[ToolMetadata]:+ """Get all tool metadata (alias for get_all_metadata)."""+ return self.get_all_metadata()++ def get_tool(self, name: str) -> Optional[ToolMetadata]:+ """Get metadata for a specific tool by name."""+ return self._tools.get(name)++ def get_tool_names(self) -> List[str]:+ """Get list of all registered tool names."""+ return list(self._tools.keys())++ def __len__(self) -> int:+ """Return the number of registered tools."""+ return len(self._tools)++ def __contains__(self, name: str) -> bool:+ """Check if a tool is registered."""+ return name in self._tools++ def get_summary(self) -> str:+ """Get a summary string of all tools for context injection.++ This provides a lightweight overview suitable for the tool finder agent's+ context, listing all available tools without full schema definitions.+ """+ lines = ["Available tools:"]+ for metadata in self._tools.values():+ category_str = f" [{metadata.category}]" if metadata.category else ""+ lines.append(f"- {metadata.name}{category_str}: {metadata.description}")+ return "\n".join(lines)diff --git a/atomic-examples/progressive-disclosure/progressive_disclosure/tools/__init__.py b/atomic-examples/progressive-disclosure/progressive_disclosure/tools/__init__.pynew file mode 100644index 0000000..a1cdbe9--- /dev/null+++ b/atomic-examples/progressive-disclosure/progressive_disclosure/tools/__init__.py@@ -0,0 +1,21 @@+"""Tools module for progressive disclosure."""++from progressive_disclosure.tools.search_tools import (+ SearchToolsTool,+ SearchToolsInputSchema,+ SearchToolsOutputSchema,+ SearchToolsConfig,+ ListAllToolsTool,+ ListAllToolsInputSchema,+ ListAllToolsOutputSchema,+)++__all__ = [+ "SearchToolsTool",+ "SearchToolsInputSchema",+ "SearchToolsOutputSchema",+ "SearchToolsConfig",+ "ListAllToolsTool",+ "ListAllToolsInputSchema",+ "ListAllToolsOutputSchema",+]diff --git a/atomic-examples/progressive-disclosure/progressive_disclosure/tools/search_tools.py b/atomic-examples/progressive-disclosure/progressive_disclosure/tools/search_tools.pynew file mode 100644index 0000000..e074d3f--- /dev/null+++ b/atomic-examples/progressive-disclosure/progressive_disclosure/tools/search_tools.py@@ -0,0 +1,261 @@+"""Tool for searching available MCP tools.++This tool enables the Tool Finder Agent to search through the registry+of available tools without loading their full schemas into context.+"""++from typing import Dict, List, Optional+from pydantic import Field++from atomic_agents import BaseIOSchema, BaseTool, BaseToolConfig+from progressive_disclosure.registry.tool_registry import ToolRegistry+++################+# INPUT SCHEMA #+################+class SearchToolsInputSchema(BaseIOSchema):+ """Search for available tools that match a query.++ Use this tool to find relevant MCP tools for a given task.+ The search looks at tool names, descriptions, and keywords.+ """++ search_query: str = Field(+ ...,+ description="Search query to find relevant tools. Can include keywords describing the desired functionality.",+ )+ max_results: int = Field(+ default=5,+ description="Maximum number of results to return. Use fewer for focused tasks, more for exploratory searches.",+ ge=1,+ le=20,+ )+ category: Optional[str] = Field(+ default=None,+ description="Optional category filter (e.g., 'math', 'search', 'file', 'data', 'web', 'text').",+ )+++#################+# OUTPUT SCHEMA #+#################+class SearchToolsOutputSchema(BaseIOSchema):+ """Results from searching available tools."""++ matched_tools: List[str] = Field(+ ...,+ description="List of tool names that matched the search query, ordered by relevance.",+ )+ tool_descriptions: Dict[str, str] = Field(+ ...,+ description="Mapping of tool name to description for each matched tool.",+ )+ total_tools_available: int = Field(+ ...,+ description="Total number of tools available in the registry.",+ )+ search_query_used: str = Field(+ ...,+ description="The search query that was used.",+ )+++#################+# CONFIGURATION #+#################+class SearchToolsConfig(BaseToolConfig):+ """Configuration for the SearchToolsTool."""++ registry: Optional[ToolRegistry] = None++ model_config = {"arbitrary_types_allowed": True}+++#####################+# MAIN TOOL & LOGIC #+#####################+class SearchToolsTool(BaseTool[SearchToolsInputSchema, SearchToolsOutputSchema]):+ """Tool for searching available MCP tools by query.++ This is a key component of the progressive disclosure pattern,+ allowing the Tool Finder Agent to discover relevant tools without+ having all tool schemas in its context window.++ Example:+ >>> registry = ToolRegistry()+ >>> registry.register_from_mcp(mcp_definitions)+ >>> tool = SearchToolsTool(SearchToolsConfig(registry=registry))+ >>> result = tool.run(SearchToolsInputSchema(search_query="calculate math"))+ >>> print(result.matched_tools)+ ['AddNumbers', 'SubtractNumbers', 'MultiplyNumbers']+ """++ input_schema = SearchToolsInputSchema+ output_schema = SearchToolsOutputSchema++ def __init__(self, config: SearchToolsConfig = SearchToolsConfig()):+ """Initialize the SearchToolsTool.++ Args:+ config: Configuration containing the tool registry.+ """+ super().__init__(config)+ self._registry = config.registry++ @property+ def registry(self) -> ToolRegistry:+ """Get the tool registry."""+ if self._registry is None:+ raise ValueError("Tool registry not configured. Pass a registry via SearchToolsConfig.")+ return self._registry++ def run(self, params: SearchToolsInputSchema) -> SearchToolsOutputSchema:+ """Execute the search and return matching tools.++ Args:+ params: Search parameters including query and optional filters.++ Returns:+ SearchToolsOutputSchema containing matched tools and their descriptions.+ """+ results = self.registry.search(+ query=params.search_query,+ max_results=params.max_results,+ category=params.category,+ )++ return SearchToolsOutputSchema(+ matched_tools=[tool.name for tool in results],+ tool_descriptions={tool.name: tool.description for tool in results},+ total_tools_available=len(self.registry),+ search_query_used=params.search_query,+ )+++class ListAllToolsInputSchema(BaseIOSchema):+ """List all available tools in the registry.++ Use this to get an overview of all tools when you need to understand+ the full capabilities available.+ """++ include_categories: bool = Field(+ default=True,+ description="Whether to include category information for each tool.",+ )+++class ListAllToolsOutputSchema(BaseIOSchema):+ """List of all available tools."""++ tools: List[Dict[str, str]] = Field(+ ...,+ description="List of tools with their name, description, and optionally category.",+ )+ total_count: int = Field(+ ...,+ description="Total number of tools available.",+ )+ categories_found: List[str] = Field(+ ...,+ description="List of unique categories found among the tools.",+ )+++class ListAllToolsTool(BaseTool[ListAllToolsInputSchema, ListAllToolsOutputSchema]):+ """Tool for listing all available tools.++ Useful when the Tool Finder Agent needs to see the complete+ set of available capabilities.+ """++ input_schema = ListAllToolsInputSchema+ output_schema = ListAllToolsOutputSchema++ def __init__(self, config: SearchToolsConfig = SearchToolsConfig()):+ """Initialize the ListAllToolsTool.++ Args:+ config: Configuration containing the tool registry.+ """+ super().__init__(config)+ self._registry = config.registry++ @property+ def registry(self) -> ToolRegistry:+ """Get the tool registry."""+ if self._registry is None:+ raise ValueError("Tool registry not configured. Pass a registry via SearchToolsConfig.")+ return self._registry++ def run(self, params: ListAllToolsInputSchema) -> ListAllToolsOutputSchema:+ """List all available tools.++ Args:+ params: Parameters for listing tools.++ Returns:+ ListAllToolsOutputSchema containing all tools.+ """+ all_tools = self.registry.get_all_metadata()+ categories = set()++ tools_list = []+ for tool in all_tools:+ tool_info = {+ "name": tool.name,+ "description": tool.description,+ }+ if params.include_categories and tool.category:+ tool_info["category"] = tool.category+ categories.add(tool.category)+ tools_list.append(tool_info)++ return ListAllToolsOutputSchema(+ tools=tools_list,+ total_count=len(all_tools),+ categories_found=sorted(list(categories)),+ )+++#################+# EXAMPLE USAGE #+#################+if __name__ == "__main__":+ from progressive_disclosure.registry.tool_registry import ToolMetadata++ # Create a test registry+ registry = ToolRegistry()+ registry.register(ToolMetadata(+ name="AddNumbers",+ description="Add two numbers together",+ keywords=["add", "sum", "plus", "arithmetic"],+ category="math",+ ))+ registry.register(ToolMetadata(+ name="SubtractNumbers",+ description="Subtract one number from another",+ keywords=["subtract", "minus", "difference", "arithmetic"],+ category="math",+ ))+ registry.register(ToolMetadata(+ name="SearchWeb",+ description="Search the web for information",+ keywords=["search", "web", "query", "find"],+ category="search",+ ))++ # Test search+ search_tool = SearchToolsTool(SearchToolsConfig(registry=registry))+ result = search_tool.run(SearchToolsInputSchema(search_query="add numbers math"))+ print("Search results:")+ print(f" Matched: {result.matched_tools}")+ print(f" Descriptions: {result.tool_descriptions}")++ # Test list all+ list_tool = ListAllToolsTool(SearchToolsConfig(registry=registry))+ all_result = list_tool.run(ListAllToolsInputSchema())+ print(f"\nAll tools ({all_result.total_count}):")+ for tool in all_result.tools:+ print(f" - {tool['name']}: {tool['description']}")diff --git a/atomic-examples/progressive-disclosure/pyproject.toml b/atomic-examples/progressive-disclosure/pyproject.tomlnew file mode 100644index 0000000..81aca1c--- /dev/null+++ b/atomic-examples/progressive-disclosure/pyproject.toml@@ -0,0 +1,35 @@+[build-system]+requires = ["hatchling"]+build-backend = "hatchling.build"++[tool.hatch.build.targets.wheel]+packages = ["progressive_disclosure"]++[project]+name = "progressive-disclosure"+version = "0.1.0"+description = "Progressive Disclosure example for Atomic Agents - demonstrating Anthropic's pattern for efficient MCP tool loading"+readme = "README.md"+authors = [+ { name = "KennyVaneetvelde", email = "[email protected]" }+]+requires-python = ">=3.12"+dependencies = [+ "atomic-agents",+ "pd-math-server",+ "pd-text-server",+ "pd-data-server",+ "instructor==1.13.0",+ "pydantic>=2.10.3,<3.0.0",+ "rich>=13.0.0",+ "openai>=2.0.0,<3.0.0",+ "mcp[cli]>=1.9.4",+ "fastmcp>=2.0.0",+ "python-dotenv>=1.0.1,<2.0.0",+]++[tool.uv.sources]+atomic-agents = { workspace = true }+pd-math-server = { path = "servers/math_server" }+pd-text-server = { path = "servers/text_server" }+pd-data-server = { path = "servers/data_server" }diff --git a/atomic-examples/progressive-disclosure/servers/data_server/data_server/__init__.py b/atomic-examples/progressive-disclosure/servers/data_server/data_server/__init__.pynew file mode 100644index 0000000..c60954d--- /dev/null+++ b/atomic-examples/progressive-disclosure/servers/data_server/data_server/__init__.py@@ -0,0 +1 @@+"""Data MCP Server - list/data operations for progressive disclosure demo."""diff --git a/atomic-examples/progressive-disclosure/servers/data_server/data_server/server.py b/atomic-examples/progressive-disclosure/servers/data_server/data_server/server.pynew file mode 100644index 0000000..2f2249f--- /dev/null+++ b/atomic-examples/progressive-disclosure/servers/data_server/data_server/server.py@@ -0,0 +1,80 @@+"""Data MCP Server with list/data manipulation tools.++This server provides 8 data/list operations to demonstrate+progressive disclosure - when combined with other servers,+the agent will select only the relevant data tools.+"""++from typing import List+from fastmcp import FastMCP++mcp = FastMCP("data-server")+++def sort_list(items: List[float], descending: bool = False) -> List[float]:+ """Sort a list of numbers. Use ascending=True for descending order."""+ return sorted(items, reverse=descending)+++def filter_greater_than(items: List[float], threshold: float) -> List[float]:+ """Filter list to only include items greater than the threshold."""+ return [x for x in items if x > threshold]+++def filter_less_than(items: List[float], threshold: float) -> List[float]:+ """Filter list to only include items less than the threshold."""+ return [x for x in items if x < threshold]+++def sum_list(items: List[float]) -> float:+ """Calculate the sum of all numbers in a list. Use for totaling values."""+ return sum(items)+++def average_list(items: List[float]) -> float:+ """Calculate the average (mean) of all numbers in a list."""+ if not items:+ return 0.0+ return sum(items) / len(items)+++def min_value(items: List[float]) -> float:+ """Find the minimum value in a list. Use to find smallest number."""+ if not items:+ raise ValueError("Cannot find minimum of empty list")+ return min(items)+++def max_value(items: List[float]) -> float:+ """Find the maximum value in a list. Use to find largest number."""+ if not items:+ raise ValueError("Cannot find maximum of empty list")+ return max(items)+++def unique_values(items: List[float]) -> List[float]:+ """Remove duplicate values from a list, preserving order."""+ seen = set()+ result = []+ for item in items:+ if item not in seen:+ seen.add(item)+ result.append(item)+ return result+++def main():+ """Run the data server."""+ mcp.run()+++if __name__ == "__main__":+ main()diff --git a/atomic-examples/progressive-disclosure/servers/data_server/pyproject.toml b/atomic-examples/progressive-disclosure/servers/data_server/pyproject.tomlnew file mode 100644index 0000000..619ef89--- /dev/null+++ b/atomic-examples/progressive-disclosure/servers/data_server/pyproject.toml@@ -0,0 +1,21 @@+[build-system]+requires = ["hatchling"]+build-backend = "hatchling.build"++[tool.hatch.build.targets.wheel]+packages = ["data_server"]++[project]+name = "pd-data-server"+version = "0.1.0"+description = "MCP server with data/list tools for progressive disclosure demo"+authors = [+ { name = "KennyVaneetvelde", email = "[email protected]" }+]+requires-python = ">=3.12"+dependencies = [+ "fastmcp>=2.0.0",+]++[project.scripts]+pd-data-server = "data_server.server:main"diff --git a/atomic-examples/progressive-disclosure/servers/math_server/math_server/__init__.py b/atomic-examples/progressive-disclosure/servers/math_server/math_server/__init__.pynew file mode 100644index 0000000..fef2b15--- /dev/null+++ b/atomic-examples/progressive-disclosure/servers/math_server/math_server/__init__.py@@ -0,0 +1 @@+"""Math MCP Server - arithmetic operations for progressive disclosure demo."""diff --git a/atomic-examples/progressive-disclosure/servers/math_server/math_server/server.py b/atomic-examples/progressive-disclosure/servers/math_server/math_server/server.pynew file mode 100644index 0000000..b647f13--- /dev/null+++ b/atomic-examples/progressive-disclosure/servers/math_server/math_server/server.py@@ -0,0 +1,72 @@+"""Math MCP Server with arithmetic tools.++This server provides 8 arithmetic operations to demonstrate+progressive disclosure - when combined with other servers,+the agent will select only the relevant math tools.+"""++import math+from fastmcp import FastMCP++mcp = FastMCP("math-server")+++def add_numbers(a: float, b: float) -> float:+ """Add two numbers together (a + b). Use for addition operations."""+ return a + b+++def subtract_numbers(a: float, b: float) -> float:+ """Subtract b from a (a - b). Use for subtraction operations."""+ return a - b+++def multiply_numbers(a: float, b: float) -> float:+ """Multiply two numbers (a * b). Use for multiplication operations."""+ return a * b+++def divide_numbers(a: float, b: float) -> float:+ """Divide a by b (a / b). Use for division operations. Returns error message if b is 0."""+ if b == 0:+ raise ValueError("Cannot divide by zero")+ return a / b+++def power(base: float, exponent: float) -> float:+ """Raise base to the power of exponent (base ** exponent). Use for exponentiation."""+ return base ** exponent+++def square_root(number: float) -> float:+ """Calculate the square root of a number. Use for sqrt operations."""+ if number < 0:+ raise ValueError("Cannot calculate square root of negative number")+ return math.sqrt(number)+++def modulo(a: float, b: float) -> float:+ """Calculate the remainder of a divided by b (a % b). Use for modulo operations."""+ return a % b+++def absolute_value(number: float) -> float:+ """Return the absolute value of a number. Use to remove negative signs."""+ return abs(number)+++def main():+ """Run the math server."""+ mcp.run()+++if __name__ == "__main__":+ main()diff --git a/atomic-examples/progressive-disclosure/servers/math_server/pyproject.toml b/atomic-examples/progressive-disclosure/servers/math_server/pyproject.tomlnew file mode 100644index 0000000..aad9b9d--- /dev/null+++ b/atomic-examples/progressive-disclosure/servers/math_server/pyproject.toml@@ -0,0 +1,21 @@+[build-system]+requires = ["hatchling"]+build-backend = "hatchling.build"++[tool.hatch.build.targets.wheel]+packages = ["math_server"]++[project]+name = "pd-math-server"+version = "0.1.0"+description = "MCP server with arithmetic tools for progressive disclosure demo"+authors = [+ { name = "KennyVaneetvelde", email = "[email protected]" }+]+requires-python = ">=3.12"+dependencies = [+ "fastmcp>=2.0.0",+]++[project.scripts]+pd-math-server = "math_server.server:main"diff --git a/atomic-examples/progressive-disclosure/servers/text_server/pyproject.toml b/atomic-examples/progressive-disclosure/servers/text_server/pyproject.tomlnew file mode 100644index 0000000..a8f611e--- /dev/null+++ b/atomic-examples/progressive-disclosure/servers/text_server/pyproject.toml@@ -0,0 +1,21 @@+[build-system]+requires = ["hatchling"]+build-backend = "hatchling.build"++[tool.hatch.build.targets.wheel]+packages = ["text_server"]++[project]+name = "pd-text-server"+version = "0.1.0"+description = "MCP server with text manipulation tools for progressive disclosure demo"+authors = [+ { name = "KennyVaneetvelde", email = "[email protected]" }+]+requires-python = ">=3.12"+dependencies = [+ "fastmcp>=2.0.0",+]++[project.scripts]+pd-text-server = "text_server.server:main"diff --git a/atomic-examples/progressive-disclosure/servers/text_server/text_server/__init__.py b/atomic-examples/progressive-disclosure/servers/text_server/text_server/__init__.pynew file mode 100644index 0000000..1e653ec--- /dev/null+++ b/atomic-examples/progressive-disclosure/servers/text_server/text_server/__init__.py@@ -0,0 +1 @@+"""Text MCP Server - text manipulation operations for progressive disclosure demo."""diff --git a/atomic-examples/progressive-disclosure/servers/text_server/text_server/server.py b/atomic-examples/progressive-disclosure/servers/text_server/text_server/server.pynew file mode 100644index 0000000..aaf23fb--- /dev/null+++ b/atomic-examples/progressive-disclosure/servers/text_server/text_server/server.py@@ -0,0 +1,70 @@+"""Text MCP Server with text manipulation tools.++This server provides 8 text operations to demonstrate+progressive disclosure - when combined with other servers,+the agent will select only the relevant text tools.+"""++from typing import List+from fastmcp import FastMCP++mcp = FastMCP("text-server")+++def uppercase(text: str) -> str:+ """Convert text to all uppercase letters. Use for capitalizing text."""+ return text.upper()+++def lowercase(text: str) -> str:+ """Convert text to all lowercase letters. Use for lowercasing text."""+ return text.lower()+++def reverse_text(text: str) -> str:+ """Reverse the order of characters in text. Use to flip text backwards."""+ return text[::-1]+++def word_count(text: str) -> int:+ """Count the number of words in text. Use to count words."""+ return len(text.split())+++def char_count(text: str, include_spaces: bool = True) -> int:+ """Count the number of characters in text. Can optionally exclude spaces."""+ if not include_spaces:+ text = text.replace(" ", "")+ return len(text)+++def concatenate(text1: str, text2: str, separator: str = "") -> str:+ """Join two texts together with an optional separator. Use for combining strings."""+ return text1 + separator + text2+++def replace_text(text: str, search: str, replacement: str) -> str:+ """Replace all occurrences of search string with replacement. Use for find-and-replace."""+ return text.replace(search, replacement)+++def split_text(text: str, delimiter: str = " ") -> List[str]:+ """Split text into parts using a delimiter. Use to break text into pieces."""+ return text.split(delimiter)+++def main():+ """Run the text server."""+ mcp.run()+++if __name__ == "__main__":+ main()diff --git a/uv.lock b/uv.lockindex 59af908..be329ff 100644--- a/uv.lock+++ b/uv.lock@@ -13,11 +13,13 @@ members = ["basic-pdf-analysis","calculator","deep-research",+ "dspy-integration","example-client","example-mcp-server","fastapi-memory","hooks-example","orchestration-agent",+ "progressive-disclosure","quickstart","rag-chatbot","searxng-search",@@ -111,6 +113,20 @@ wheels = [{ url = "https://files.pythonhosted.org/packages/32/34/d4e1c02d3bee589efb5dfa17f88ea08bdb3e3eac12bc475462aec52ed223/alabaster-0.7.16-py3-none-any.whl", hash = "sha256:b46733c07dce03ae4e150330b975c75737fa60f0a7c591b6c8bf4928a28e2c92", size = 13511, upload-time = "2024-01-10T00:56:08.388Z" },]+[[package]]+name = "alembic"+version = "1.17.2"+source = { registry = "https://pypi.org/simple" }+dependencies = [+ { name = "mako" },+ { name = "sqlalchemy" },+ { name = "typing-extensions" },+]+sdist = { url = "https://files.pythonhosted.org/packages/02/a6/74c8cadc2882977d80ad756a13857857dbcf9bd405bc80b662eb10651282/alembic-1.17.2.tar.gz", hash = "sha256:bbe9751705c5e0f14877f02d46c53d10885e377e3d90eda810a016f9baa19e8e", size = 1988064, upload-time = "2025-11-14T20:35:04.057Z" }+wheels = [+ { url = "https://files.pythonhosted.org/packages/ba/88/6237e97e3385b57b5f1528647addea5cc03d4d65d5979ab24327d41fb00d/alembic-1.17.2-py3-none-any.whl", hash = "sha256:f483dd1fe93f6c5d49217055e4d15b905b425b6af906746abb35b69c1996c4e6", size = 248554, upload-time = "2025-11-14T20:35:05.699Z" },+]+[[package]]name = "annotated-doc"version = "0.0.4"@@ -162,6 +178,18 @@ wheels = [{ url = "https://files.pythonhosted.org/packages/15/b3/9b1a8074496371342ec1e796a96f99c82c945a339cd81a8e73de28b4cf9e/anyio-4.11.0-py3-none-any.whl", hash = "sha256:0287e96f4d26d4149305414d4e3bc32f0dcd0862365a4bddea19d7a1ec38c4fc", size = 109097, upload-time = "2025-09-23T09:19:10.601Z" },]+[[package]]+name = "asyncer"+version = "0.0.8"+source = { registry = "https://pypi.org/simple" }+dependencies = [+ { name = "anyio" },+]+sdist = { url = "https://files.pythonhosted.org/packages/ff/67/7ea59c3e69eaeee42e7fc91a5be67ca5849c8979acac2b920249760c6af2/asyncer-0.0.8.tar.gz", hash = "sha256:a589d980f57e20efb07ed91d0dbe67f1d2fd343e7142c66d3a099f05c620739c", size = 18217, upload-time = "2024-08-24T23:15:36.449Z" }+wheels = [+ { url = "https://files.pythonhosted.org/packages/8a/04/15b6ca6b7842eda2748bda0a0af73f2d054e9344320f8bba01f994294bcb/asyncer-0.0.8-py3-none-any.whl", hash = "sha256:5920d48fc99c8f8f0f1576e1882f5022885589c5fcbc46ce4224ec3e53776eeb", size = 9209, upload-time = "2024-08-24T23:15:35.317Z" },+]+[[package]]name = "atomic-agents"version = "2.3.0"@@ -238,6 +266,18 @@ wheels = [{ url = "https://files.pythonhosted.org/packages/3a/2a/7cc015f5b9f5db42b7d48157e23356022889fc354a2813c15934b7cb5c0e/attrs-25.4.0-py3-none-any.whl", hash = "sha256:adcf7e2a1fb3b36ac48d97835bb6d8ade15b8dcce26aba8bf1d14847b57a3373", size = 67615, upload-time = "2025-10-06T13:54:43.17Z" },]+[[package]]+name = "authlib"+version = "1.6.5"+source = { registry = "https://pypi.org/simple" }+dependencies = [+ { name = "cryptography" },+]+sdist = { url = "https://files.pythonhosted.org/packages/cd/3f/1d3bbd0bf23bdd99276d4def22f29c27a914067b4cf66f753ff9b8bbd0f3/authlib-1.6.5.tar.gz", hash = "sha256:6aaf9c79b7cc96c900f0b284061691c5d4e61221640a948fe690b556a6d6d10b", size = 164553, upload-time = "2025-10-02T13:36:09.489Z" }+wheels = [+ { url = "https://files.pythonhosted.org/packages/f8/aa/5082412d1ee302e9e7d80b6949bc4d2a8fa1149aaab610c5fc24709605d6/authlib-1.6.5-py2.py3-none-any.whl", hash = "sha256:3e0e0507807f842b02175507bdee8957a1d5707fd4afb17c32fb43fee90b6e3a", size = 243608, upload-time = "2025-10-02T13:36:07.637Z" },+]+[[package]]name = "babel"version = "2.17.0"@@ -351,6 +391,15 @@ wheels = [{ url = "https://files.pythonhosted.org/packages/27/44/d2ef5e87509158ad2187f4dd0852df80695bb1ee0cfe0a684727b01a69e0/bcrypt-5.0.0-cp39-abi3-win_arm64.whl", hash = "sha256:f2347d3534e76bf50bca5500989d6c1d05ed64b440408057a37673282c654927", size = 144953, upload-time = "2025-09-25T19:50:37.32Z" },]+[[package]]+name = "beartype"+version = "0.22.8"+source = { registry = "https://pypi.org/simple" }+sdist = { url = "https://files.pythonhosted.org/packages/8c/1d/794ae2acaa67c8b216d91d5919da2606c2bb14086849ffde7f5555f3a3a5/beartype-0.22.8.tar.gz", hash = "sha256:b19b21c9359722ee3f7cc433f063b3e13997b27ae8226551ea5062e621f61165", size = 1602262, upload-time = "2025-12-03T05:11:10.766Z" }+wheels = [+ { url = "https://files.pythonhosted.org/packages/14/2a/fbcbf5a025d3e71ddafad7efd43e34ec4362f4d523c3c471b457148fb211/beartype-0.22.8-py3-none-any.whl", hash = "sha256:b832882d04e41a4097bab9f63e6992bc6de58c414ee84cba9b45b67314f5ab2e", size = 1331895, upload-time = "2025-12-03T05:11:08.373Z" },+]+[[package]]name = "beautifulsoup4"version = "4.14.2"@@ -599,6 +648,15 @@ wheels = [{ url = "https://files.pythonhosted.org/packages/98/78/01c019cdb5d6498122777c1a43056ebb3ebfeef2076d9d026bfe15583b2b/click-8.3.1-py3-none-any.whl", hash = "sha256:981153a64e25f12d547d3426c367a4857371575ee7ad18df2a6183ab0545b2a6", size = 108274, upload-time = "2025-11-15T20:45:41.139Z" },]+[[package]]+name = "cloudpickle"+version = "3.1.2"+source = { registry = "https://pypi.org/simple" }+sdist = { url = "https://files.pythonhosted.org/packages/27/fb/576f067976d320f5f0114a8d9fa1215425441bb35627b1993e5afd8111e5/cloudpickle-3.1.2.tar.gz", hash = "sha256:7fda9eb655c9c230dab534f1983763de5835249750e85fbcef43aaa30a9a2414", size = 22330, upload-time = "2025-11-03T09:25:26.604Z" }+wheels = [+ { url = "https://files.pythonhosted.org/packages/88/39/799be3f2f0f38cc727ee3b4f1445fe6d5e4133064ec2e4115069418a5bb6/cloudpickle-3.1.2-py3-none-any.whl", hash = "sha256:9acb47f6afd73f60dc1df93bb801b472f05ff42fa6c84167d25cb206be1fbf4a", size = 22228, upload-time = "2025-11-03T09:25:25.534Z" },+]+[[package]]name = "colorama"version = "0.4.6"@@ -620,6 +678,18 @@ wheels = [{ url = "https://files.pythonhosted.org/packages/a7/06/3d6badcf13db419e25b07041d9c7b4a2c331d3f4e7134445ec5df57714cd/coloredlogs-15.0.1-py2.py3-none-any.whl", hash = "sha256:612ee75c546f53e92e70049c9dbfcc18c935a2b9a53b66085ce9ef6a6e5c0934", size = 46018, upload-time = "2021-06-11T10:22:42.561Z" },]+[[package]]+name = "colorlog"+version = "6.10.1"+source = { registry = "https://pypi.org/simple" }+dependencies = [+ { name = "colorama", marker = "sys_platform == 'win32'" },+]+sdist = { url = "https://files.pythonhosted.org/packages/a2/61/f083b5ac52e505dfc1c624eafbf8c7589a0d7f32daa398d2e7590efa5fda/colorlog-6.10.1.tar.gz", hash = "sha256:eb4ae5cb65fe7fec7773c2306061a8e63e02efc2c72eba9d27b0fa23c94f1321", size = 17162, upload-time = "2025-10-16T16:14:11.978Z" }+wheels = [+ { url = "https://files.pythonhosted.org/packages/6d/c1/e419ef3723a074172b68aaa89c9f3de486ed4c2399e2dbd8113a4fdcaf9e/colorlog-6.10.1-py3-none-any.whl", hash = "sha256:2d7e8348291948af66122cff006c9f8da6255d224e7cf8e37d8de2df3bad8c9c", size = 11743, upload-time = "2025-10-16T16:14:10.512Z" },+]+[[package]]name = "courlan"version = "1.3.2"@@ -732,6 +802,21 @@ wheels = [{ url = "https://files.pythonhosted.org/packages/ee/58/257350f7db99b4ae12b614a36256d9cc870d71d9e451e79c2dc3b23d7c3c/cssselect-1.3.0-py3-none-any.whl", hash = "sha256:56d1bf3e198080cc1667e137bc51de9cadfca259f03c2d4e09037b3e01e30f0d", size = 18786, upload-time = "2025-03-10T09:30:28.048Z" },]+[[package]]+name = "cyclopts"+version = "4.3.0"+source = { registry = "https://pypi.org/simple" }+dependencies = [+ { name = "attrs" },+ { name = "docstring-parser" },+ { name = "rich" },+ { name = "rich-rst" },+]+sdist = { url = "https://files.pythonhosted.org/packages/1b/0f/fe026df2ab8301e30a2b0bd425ff1462ad858fd4f991c1ac0389c2059c24/cyclopts-4.3.0.tar.gz", hash = "sha256:e95179cd0a959ce250ecfb2f0262a5996a92c1f9467bccad2f3d829e6833cef5", size = 151411, upload-time = "2025-11-25T02:59:33.572Z" }+wheels = [+ { url = "https://files.pythonhosted.org/packages/7a/e8/77a231ae531cf38765b75ddf27dae28bb5f70b41d8bb4f15ce1650e93f57/cyclopts-4.3.0-py3-none-any.whl", hash = "sha256:91a30b69faf128ada7cfeaefd7d9649dc222e8b2a8697f1fc99e4ee7b7ca44f3", size = 187184, upload-time = "2025-11-25T02:59:32.21Z" },+]+[[package]]name = "dateparser"version = "1.2.2"@@ -814,6 +899,15 @@ wheels = [{ url = "https://files.pythonhosted.org/packages/12/b3/231ffd4ab1fc9d679809f356cebee130ac7daa00d6d6f3206dd4fd137e9e/distro-1.9.0-py3-none-any.whl", hash = "sha256:7bffd925d65168f85027d8da9af6bddab658135b840670a223589bc0c8ef02b2", size = 20277, upload-time = "2023-12-24T09:54:30.421Z" },]+[[package]]+name = "dnspython"+version = "2.8.0"+source = { registry = "https://pypi.org/simple" }+sdist = { url = "https://files.pythonhosted.org/packages/8c/8b/57666417c0f90f08bcafa776861060426765fdb422eb10212086fb811d26/dnspython-2.8.0.tar.gz", hash = "sha256:181d3c6996452cb1189c4046c61599b84a5a86e099562ffde77d26984ff26d0f", size = 368251, upload-time = "2025-09-07T18:58:00.022Z" }+wheels = [+ { url = "https://files.pythonhosted.org/packages/ba/5a/18ad964b0086c6e62e2e7500f7edc89e3faa45033c71c1893d34eed2b2de/dnspython-2.8.0-py3-none-any.whl", hash = "sha256:01d9bbc4a2d76bf0db7c1f729812ded6d912bd318d3b1cf81d30c0f845dbf3af", size = 331094, upload-time = "2025-09-07T18:57:58.071Z" },+]+[[package]]name = "docstring-parser"version = "0.17.0"@@ -832,6 +926,65 @@ wheels = [{ url = "https://files.pythonhosted.org/packages/26/87/f238c0670b94533ac0353a4e2a1a771a0cc73277b88bff23d3ae35a256c1/docutils-0.20.1-py3-none-any.whl", hash = "sha256:96f387a2c5562db4476f09f13bbab2192e764cac08ebbf3a34a95d9b1e4a59d6", size = 572666, upload-time = "2023-05-16T23:39:15.976Z" },]+[[package]]+name = "dspy"+version = "3.0.4"+source = { registry = "https://pypi.org/simple" }+dependencies = [+ { name = "anyio" },+ { name = "asyncer" },+ { name = "backoff" },+ { name = "cachetools" },+ { name = "cloudpickle" },+ { name = "diskcache" },+ { name = "gepa" },+ { name = "joblib" },+ { name = "json-repair" },+ { name = "litellm" },+ { name = "magicattr" },+ { name = "numpy" },+ { name = "openai" },+ { name = "optuna" },+ { name = "orjson" },+ { name = "pillow" },+ { name = "pydantic" },+ { name = "regex" },+ { name = "requests" },+ { name = "rich" },+ { name = "tenacity" },+ { name = "tqdm" },+ { name = "xxhash" },+]+sdist = { url = "https://files.pythonhosted.org/packages/8e/18/0042d299cd5e85fdb381568f0cfcc7769122e8f70ea0a2d33e12fd63e705/dspy-3.0.4.tar.gz", hash = "sha256:cb4529df9a91353a16144d9d94ba6ff25f36fc5adfd921f127f4c49d0e309fb8", size = 236376, upload-time = "2025-11-10T17:43:37.619Z" }+wheels = [+ { url = "https://files.pythonhosted.org/packages/94/52/56eed4828175f48f712a50a994293065afa7cc98cb112992a0b071179b6c/dspy-3.0.4-py3-none-any.whl", hash = "sha256:c0a88c7936f41f6f613ee6ca8cd92e63746ff2bd780e3896615ade7628eb6a6a", size = 285224, upload-time = "2025-11-10T17:43:36.263Z" },+]++[[package]]+name = "dspy-integration"+version = "1.0.0"+source = { editable = "atomic-examples/dspy-integration" }+dependencies = [+ { name = "atomic-agents" },+ { name = "dspy" },+ { name = "instructor" },+ { name = "openai" },+ { name = "pydantic" },+ { name = "python-dotenv" },+ { name = "rich" },+]++[package.metadata]+requires-dist = [+ { name = "atomic-agents", editable = "." },+ { name = "dspy", specifier = ">=2.5.0" },+ { name = "instructor", specifier = ">=1.7.0" },+ { name = "openai", specifier = ">=1.50.0" },+ { name = "pydantic", specifier = ">=2.0.0" },+ { name = "python-dotenv", specifier = ">=1.0.1" },+ { name = "rich", specifier = ">=13.7.0" },+]+[[package]]name = "durationpy"version = "0.10"@@ -841,6 +994,19 @@ wheels = [{ url = "https://files.pythonhosted.org/packages/b0/0d/9feae160378a3553fa9a339b0e9c1a048e147a4127210e286ef18b730f03/durationpy-0.10-py3-none-any.whl", hash = "sha256:3b41e1b601234296b4fb368338fdcd3e13e0b4fb5b67345948f4f2bf9868b286", size = 3922, upload-time = "2025-05-17T13:52:36.463Z" },]+[[package]]+name = "email-validator"+version = "2.3.0"+source = { registry = "https://pypi.org/simple" }+dependencies = [+ { name = "dnspython" },+ { name = "idna" },+]+sdist = { url = "https://files.pythonhosted.org/packages/f5/22/900cb125c76b7aaa450ce02fd727f452243f2e91a61af068b40adba60ea9/email_validator-2.3.0.tar.gz", hash = "sha256:9fc05c37f2f6cf439ff414f8fc46d917929974a82244c20eb10231ba60c54426", size = 51238, upload-time = "2025-08-26T13:09:06.831Z" }+wheels = [+ { url = "https://files.pythonhosted.org/packages/de/15/545e2b6cf2e3be84bc1ed85613edd75b8aea69807a71c26f4ca6a9258e82/email_validator-2.3.0-py3-none-any.whl", hash = "sha256:80f13f623413e6b197ae73bb10bf4eb0908faf509ad8362c5edeb0be7fd450b4", size = 35604, upload-time = "2025-08-26T13:09:05.858Z" },+]+[[package]]name = "eval-type-backport"version = "0.3.0"@@ -894,6 +1060,18 @@ requires-dist = [{ name = "uvicorn", specifier = ">=0.15.0" },]+[[package]]+name = "exceptiongroup"+version = "1.3.1"+source = { registry = "https://pypi.org/simple" }+dependencies = [+ { name = "typing-extensions", marker = "python_full_version < '3.13'" },+]+sdist = { url = "https://files.pythonhosted.org/packages/50/79/66800aadf48771f6b62f7eb014e352e5d06856655206165d775e675a02c9/exceptiongroup-1.3.1.tar.gz", hash = "sha256:8b412432c6055b0b7d14c310000ae93352ed6754f70fa8f7c34141f91c4e3219", size = 30371, upload-time = "2025-11-21T23:01:54.787Z" }+wheels = [+ { url = "https://files.pythonhosted.org/packages/8a/0e/97c33bf5009bdbac74fd2beace167cab3f978feb69cc36f1ef79360d6c4e/exceptiongroup-1.3.1-py3-none-any.whl", hash = "sha256:a7a39a3bd276781e98394987d3a5701d0c4edffb633bb7a5144577f82c773598", size = 16740, upload-time = "2025-11-21T23:01:53.443Z" },+]+[[package]]name = "fastapi"version = "0.122.0"@@ -936,6 +1114,62 @@ requires-dist = [{ name = "uvicorn", specifier = ">=0.32.1,<1.0.0" },]+[[package]]+name = "fastmcp"+version = "2.13.3"+source = { registry = "https://pypi.org/simple" }+dependencies = [+ { name = "authlib" },+ { name = "cyclopts" },+ { name = "exceptiongroup" },+ { name = "httpx" },+ { name = "jsonschema-path" },+ { name = "mcp" },+ { name = "openapi-pydantic" },+ { name = "platformdirs" },+ { name = "py-key-value-aio", extra = ["disk", "memory"] },+ { name = "pydantic", extra = ["email"] },+ { name = "pyperclip" },+ { name = "python-dotenv" },+ { name = "rich" },+ { name = "uvicorn" },+ { name = "websockets" },+]+sdist = { url = "https://files.pythonhosted.org/packages/21/a1/a507bfb73f51983759cbbc3702b6f4780128cff68ebbc51db2f10170c950/fastmcp-2.13.3.tar.gz", hash = "sha256:ebca59e99412c596dd75ebdd5147800f6abc2490d025af76fa8ea4fc5f68781d", size = 8185958, upload-time = "2025-12-03T23:58:00.434Z" }+wheels = [+ { url = "https://files.pythonhosted.org/packages/db/bc/56925f1202357dbfcfdfd0c75afc6c27ec1e6ef1d89b7e7410df3945ceb4/fastmcp-2.13.3-py3-none-any.whl", hash = "sha256:5173d335f4e6aabcfb5a5131af3fa092f604b303130fd3a49226b7a844a48e65", size = 385644, upload-time = "2025-12-03T23:58:02.246Z" },+]++[[package]]+name = "fastuuid"+version = "0.14.0"+source = { registry = "https://pypi.org/simple" }+sdist = { url = "https://files.pythonhosted.org/packages/c3/7d/d9daedf0f2ebcacd20d599928f8913e9d2aea1d56d2d355a93bfa2b611d7/fastuuid-0.14.0.tar.gz", hash = "sha256:178947fc2f995b38497a74172adee64fdeb8b7ec18f2a5934d037641ba265d26", size = 18232, upload-time = "2025-10-19T22:19:22.402Z" }+wheels = [+ { url = "https://files.pythonhosted.org/packages/02/a2/e78fcc5df65467f0d207661b7ef86c5b7ac62eea337c0c0fcedbeee6fb13/fastuuid-0.14.0-cp312-cp312-macosx_10_12_x86_64.macosx_11_0_arm64.macosx_10_12_universal2.whl", hash = "sha256:77e94728324b63660ebf8adb27055e92d2e4611645bf12ed9d88d30486471d0a", size = 510164, upload-time = "2025-10-19T22:31:45.635Z" },+ { url = "https://files.pythonhosted.org/packages/2b/b3/c846f933f22f581f558ee63f81f29fa924acd971ce903dab1a9b6701816e/fastuuid-0.14.0-cp312-cp312-macosx_10_12_x86_64.whl", hash = "sha256:caa1f14d2102cb8d353096bc6ef6c13b2c81f347e6ab9d6fbd48b9dea41c153d", size = 261837, upload-time = "2025-10-19T22:38:38.53Z" },+ { url = "https://files.pythonhosted.org/packages/54/ea/682551030f8c4fa9a769d9825570ad28c0c71e30cf34020b85c1f7ee7382/fastuuid-0.14.0-cp312-cp312-macosx_11_0_arm64.whl", hash = "sha256:d23ef06f9e67163be38cece704170486715b177f6baae338110983f99a72c070", size = 251370, upload-time = "2025-10-19T22:40:26.07Z" },+ { url = "https://files.pythonhosted.org/packages/14/dd/5927f0a523d8e6a76b70968e6004966ee7df30322f5fc9b6cdfb0276646a/fastuuid-0.14.0-cp312-cp312-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:0c9ec605ace243b6dbe3bd27ebdd5d33b00d8d1d3f580b39fdd15cd96fd71796", size = 277766, upload-time = "2025-10-19T22:37:23.779Z" },+ { url = "https://files.pythonhosted.org/packages/16/6e/c0fb547eef61293153348f12e0f75a06abb322664b34a1573a7760501336/fastuuid-0.14.0-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:808527f2407f58a76c916d6aa15d58692a4a019fdf8d4c32ac7ff303b7d7af09", size = 278105, upload-time = "2025-10-19T22:26:56.821Z" },+ { url = "https://files.pythonhosted.org/packages/2d/b1/b9c75e03b768f61cf2e84ee193dc18601aeaf89a4684b20f2f0e9f52b62c/fastuuid-0.14.0-cp312-cp312-manylinux_2_5_i686.manylinux1_i686.whl", hash = "sha256:2fb3c0d7fef6674bbeacdd6dbd386924a7b60b26de849266d1ff6602937675c8", size = 301564, upload-time = "2025-10-19T22:30:31.604Z" },+ { url = "https://files.pythonhosted.org/packages/fc/fa/f7395fdac07c7a54f18f801744573707321ca0cee082e638e36452355a9d/fastuuid-0.14.0-cp312-cp312-musllinux_1_1_aarch64.whl", hash = "sha256:ab3f5d36e4393e628a4df337c2c039069344db5f4b9d2a3c9cea48284f1dd741", size = 459659, upload-time = "2025-10-19T22:31:32.341Z" },+ { url = "https://files.pythonhosted.org/packages/66/49/c9fd06a4a0b1f0f048aacb6599e7d96e5d6bc6fa680ed0d46bf111929d1b/fastuuid-0.14.0-cp312-cp312-musllinux_1_1_i686.whl", hash = "sha256:b9a0ca4f03b7e0b01425281ffd44e99d360e15c895f1907ca105854ed85e2057", size = 478430, upload-time = "2025-10-19T22:26:22.962Z" },+ { url = "https://files.pythonhosted.org/packages/be/9c/909e8c95b494e8e140e8be6165d5fc3f61fdc46198c1554df7b3e1764471/fastuuid-0.14.0-cp312-cp312-musllinux_1_1_x86_64.whl", hash = "sha256:3acdf655684cc09e60fb7e4cf524e8f42ea760031945aa8086c7eae2eeeabeb8", size = 450894, upload-time = "2025-10-19T22:27:01.647Z" },+ { url = "https://files.pythonhosted.org/packages/90/eb/d29d17521976e673c55ef7f210d4cdd72091a9ec6755d0fd4710d9b3c871/fastuuid-0.14.0-cp312-cp312-win32.whl", hash = "sha256:9579618be6280700ae36ac42c3efd157049fe4dd40ca49b021280481c78c3176", size = 154374, upload-time = "2025-10-19T22:29:19.879Z" },+ { url = "https://files.pythonhosted.org/packages/cc/fc/f5c799a6ea6d877faec0472d0b27c079b47c86b1cdc577720a5386483b36/fastuuid-0.14.0-cp312-cp312-win_amd64.whl", hash = "sha256:d9e4332dc4ba054434a9594cbfaf7823b57993d7d8e7267831c3e059857cf397", size = 156550, upload-time = "2025-10-19T22:27:49.658Z" },+ { url = "https://files.pythonhosted.org/packages/a5/83/ae12dd39b9a39b55d7f90abb8971f1a5f3c321fd72d5aa83f90dc67fe9ed/fastuuid-0.14.0-cp313-cp313-macosx_10_12_x86_64.macosx_11_0_arm64.macosx_10_12_universal2.whl", hash = "sha256:77a09cb7427e7af74c594e409f7731a0cf887221de2f698e1ca0ebf0f3139021", size = 510720, upload-time = "2025-10-19T22:42:34.633Z" },+ { url = "https://files.pythonhosted.org/packages/53/b0/a4b03ff5d00f563cc7546b933c28cb3f2a07344b2aec5834e874f7d44143/fastuuid-0.14.0-cp313-cp313-macosx_10_12_x86_64.whl", hash = "sha256:9bd57289daf7b153bfa3e8013446aa144ce5e8c825e9e366d455155ede5ea2dc", size = 262024, upload-time = "2025-10-19T22:30:25.482Z" },+ { url = "https://files.pythonhosted.org/packages/9c/6d/64aee0a0f6a58eeabadd582e55d0d7d70258ffdd01d093b30c53d668303b/fastuuid-0.14.0-cp313-cp313-macosx_11_0_arm64.whl", hash = "sha256:ac60fc860cdf3c3f327374db87ab8e064c86566ca8c49d2e30df15eda1b0c2d5", size = 251679, upload-time = "2025-10-19T22:36:14.096Z" },+ { url = "https://files.pythonhosted.org/packages/60/f5/a7e9cda8369e4f7919d36552db9b2ae21db7915083bc6336f1b0082c8b2e/fastuuid-0.14.0-cp313-cp313-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:ab32f74bd56565b186f036e33129da77db8be09178cd2f5206a5d4035fb2a23f", size = 277862, upload-time = "2025-10-19T22:36:23.302Z" },+ { url = "https://files.pythonhosted.org/packages/f0/d3/8ce11827c783affffd5bd4d6378b28eb6cc6d2ddf41474006b8d62e7448e/fastuuid-0.14.0-cp313-cp313-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:33e678459cf4addaedd9936bbb038e35b3f6b2061330fd8f2f6a1d80414c0f87", size = 278278, upload-time = "2025-10-19T22:29:43.809Z" },+ { url = "https://files.pythonhosted.org/packages/a2/51/680fb6352d0bbade04036da46264a8001f74b7484e2fd1f4da9e3db1c666/fastuuid-0.14.0-cp313-cp313-manylinux_2_5_i686.manylinux1_i686.whl", hash = "sha256:1e3cc56742f76cd25ecb98e4b82a25f978ccffba02e4bdce8aba857b6d85d87b", size = 301788, upload-time = "2025-10-19T22:36:06.825Z" },+ { url = "https://files.pythonhosted.org/packages/fa/7c/2014b5785bd8ebdab04ec857635ebd84d5ee4950186a577db9eff0fb8ff6/fastuuid-0.14.0-cp313-cp313-musllinux_1_1_aarch64.whl", hash = "sha256:cb9a030f609194b679e1660f7e32733b7a0f332d519c5d5a6a0a580991290022", size = 459819, upload-time = "2025-10-19T22:35:31.623Z" },+ { url = "https://files.pythonhosted.org/packages/01/d2/524d4ceeba9160e7a9bc2ea3e8f4ccf1ad78f3bde34090ca0c51f09a5e91/fastuuid-0.14.0-cp313-cp313-musllinux_1_1_i686.whl", hash = "sha256:09098762aad4f8da3a888eb9ae01c84430c907a297b97166b8abc07b640f2995", size = 478546, upload-time = "2025-10-19T22:26:03.023Z" },+ { url = "https://files.pythonhosted.org/packages/bc/17/354d04951ce114bf4afc78e27a18cfbd6ee319ab1829c2d5fb5e94063ac6/fastuuid-0.14.0-cp313-cp313-musllinux_1_1_x86_64.whl", hash = "sha256:1383fff584fa249b16329a059c68ad45d030d5a4b70fb7c73a08d98fd53bcdab", size = 450921, upload-time = "2025-10-19T22:31:02.151Z" },+ { url = "https://files.pythonhosted.org/packages/fb/be/d7be8670151d16d88f15bb121c5b66cdb5ea6a0c2a362d0dcf30276ade53/fastuuid-0.14.0-cp313-cp313-win32.whl", hash = "sha256:a0809f8cc5731c066c909047f9a314d5f536c871a7a22e815cc4967c110ac9ad", size = 154559, upload-time = "2025-10-19T22:36:36.011Z" },+ { url = "https://files.pythonhosted.org/packages/22/1d/5573ef3624ceb7abf4a46073d3554e37191c868abc3aecd5289a72f9810a/fastuuid-0.14.0-cp313-cp313-win_amd64.whl", hash = "sha256:0df14e92e7ad3276327631c9e7cec09e32572ce82089c55cb1bb8df71cf394ed", size = 156539, upload-time = "2025-10-19T22:33:35.898Z" },+]+[[package]]name = "filelock"version = "3.20.0"@@ -1034,6 +1268,15 @@ wheels = [{ url = "https://files.pythonhosted.org/packages/eb/02/a6b21098b1d5d6249b7c5ab69dde30108a71e4e819d4a9778f1de1d5b70d/fsspec-2025.10.0-py3-none-any.whl", hash = "sha256:7c7712353ae7d875407f97715f0e1ffcc21e33d5b24556cb1e090ae9409ec61d", size = 200966, upload-time = "2025-10-30T14:58:42.53Z" },]+[[package]]+name = "gepa"+version = "0.0.17"+source = { registry = "https://pypi.org/simple" }+sdist = { url = "https://files.pythonhosted.org/packages/61/f0/fe312ed4405ddc2ca97dc1ce8915c4dd707e413503e6832910ab088fceb6/gepa-0.0.17.tar.gz", hash = "sha256:641ed46f8127618341b66ee82a87fb46a21c5d2d427a5e0b91c850a7f7f64e7f", size = 99816, upload-time = "2025-09-25T22:13:45.476Z" }+wheels = [+ { url = "https://files.pythonhosted.org/packages/88/dc/2bc81a01caa887ed58db3c725bebf1e98f37807a4d06c51ecaa85a7cabe0/gepa-0.0.17-py3-none-any.whl", hash = "sha256:0ea98f4179dbc8dd83bdf53494f302e663ee1da8300d086c4cc8ce4aefa4042c", size = 110464, upload-time = "2025-09-25T22:13:44.14Z" },+]+[[package]]name = "gitdb"version = "4.0.12"@@ -1148,6 +1391,30 @@ wheels = [{ url = "https://files.pythonhosted.org/packages/c4/ab/09169d5a4612a5f92490806649ac8d41e3ec9129c636754575b3553f4ea4/googleapis_common_protos-1.72.0-py3-none-any.whl", hash = "sha256:4299c5a82d5ae1a9702ada957347726b167f9f8d1fc352477702a1e851ff4038", size = 297515, upload-time = "2025-11-06T18:29:13.14Z" },]+[[package]]+name = "greenlet"+version = "3.3.0"+source = { registry = "https://pypi.org/simple" }+sdist = { url = "https://files.pythonhosted.org/packages/c7/e5/40dbda2736893e3e53d25838e0f19a2b417dfc122b9989c91918db30b5d3/greenlet-3.3.0.tar.gz", hash = "sha256:a82bb225a4e9e4d653dd2fb7b8b2d36e4fb25bc0165422a11e48b88e9e6f78fb", size = 190651, upload-time = "2025-12-04T14:49:44.05Z" }+wheels = [+ { url = "https://files.pythonhosted.org/packages/f8/0a/a3871375c7b9727edaeeea994bfff7c63ff7804c9829c19309ba2e058807/greenlet-3.3.0-cp312-cp312-macosx_11_0_universal2.whl", hash = "sha256:b01548f6e0b9e9784a2c99c5651e5dc89ffcbe870bc5fb2e5ef864e9cc6b5dcb", size = 276379, upload-time = "2025-12-04T14:23:30.498Z" },+ { url = "https://files.pythonhosted.org/packages/43/ab/7ebfe34dce8b87be0d11dae91acbf76f7b8246bf9d6b319c741f99fa59c6/greenlet-3.3.0-cp312-cp312-manylinux_2_24_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:349345b770dc88f81506c6861d22a6ccd422207829d2c854ae2af8025af303e3", size = 597294, upload-time = "2025-12-04T14:50:06.847Z" },+ { url = "https://files.pythonhosted.org/packages/a4/39/f1c8da50024feecd0793dbd5e08f526809b8ab5609224a2da40aad3a7641/greenlet-3.3.0-cp312-cp312-manylinux_2_24_ppc64le.manylinux_2_28_ppc64le.whl", hash = "sha256:e8e18ed6995e9e2c0b4ed264d2cf89260ab3ac7e13555b8032b25a74c6d18655", size = 607742, upload-time = "2025-12-04T14:57:42.349Z" },+ { url = "https://files.pythonhosted.org/packages/77/cb/43692bcd5f7a0da6ec0ec6d58ee7cddb606d055ce94a62ac9b1aa481e969/greenlet-3.3.0-cp312-cp312-manylinux_2_24_s390x.manylinux_2_28_s390x.whl", hash = "sha256:c024b1e5696626890038e34f76140ed1daf858e37496d33f2af57f06189e70d7", size = 622297, upload-time = "2025-12-04T15:07:13.552Z" },+ { url = "https://files.pythonhosted.org/packages/75/b0/6bde0b1011a60782108c01de5913c588cf51a839174538d266de15e4bf4d/greenlet-3.3.0-cp312-cp312-manylinux_2_24_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:047ab3df20ede6a57c35c14bf5200fcf04039d50f908270d3f9a7a82064f543b", size = 609885, upload-time = "2025-12-04T14:26:02.368Z" },+ { url = "https://files.pythonhosted.org/packages/49/0e/49b46ac39f931f59f987b7cd9f34bfec8ef81d2a1e6e00682f55be5de9f4/greenlet-3.3.0-cp312-cp312-musllinux_1_2_aarch64.whl", hash = "sha256:2d9ad37fc657b1102ec880e637cccf20191581f75c64087a549e66c57e1ceb53", size = 1567424, upload-time = "2025-12-04T15:04:23.757Z" },+ { url = "https://files.pythonhosted.org/packages/05/f5/49a9ac2dff7f10091935def9165c90236d8f175afb27cbed38fb1d61ab6b/greenlet-3.3.0-cp312-cp312-musllinux_1_2_x86_64.whl", hash = "sha256:83cd0e36932e0e7f36a64b732a6f60c2fc2df28c351bae79fbaf4f8092fe7614", size = 1636017, upload-time = "2025-12-04T14:27:29.688Z" },+ { url = "https://files.pythonhosted.org/packages/6c/79/3912a94cf27ec503e51ba493692d6db1e3cd8ac7ac52b0b47c8e33d7f4f9/greenlet-3.3.0-cp312-cp312-win_amd64.whl", hash = "sha256:a7a34b13d43a6b78abf828a6d0e87d3385680eaf830cd60d20d52f249faabf39", size = 301964, upload-time = "2025-12-04T14:36:58.316Z" },+ { url = "https://files.pythonhosted.org/packages/02/2f/28592176381b9ab2cafa12829ba7b472d177f3acc35d8fbcf3673d966fff/greenlet-3.3.0-cp313-cp313-macosx_11_0_universal2.whl", hash = "sha256:a1e41a81c7e2825822f4e068c48cb2196002362619e2d70b148f20a831c00739", size = 275140, upload-time = "2025-12-04T14:23:01.282Z" },+ { url = "https://files.pythonhosted.org/packages/2c/80/fbe937bf81e9fca98c981fe499e59a3f45df2a04da0baa5c2be0dca0d329/greenlet-3.3.0-cp313-cp313-manylinux_2_24_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:9f515a47d02da4d30caaa85b69474cec77b7929b2e936ff7fb853d42f4bf8808", size = 599219, upload-time = "2025-12-04T14:50:08.309Z" },+ { url = "https://files.pythonhosted.org/packages/c2/ff/7c985128f0514271b8268476af89aee6866df5eec04ac17dcfbc676213df/greenlet-3.3.0-cp313-cp313-manylinux_2_24_ppc64le.manylinux_2_28_ppc64le.whl", hash = "sha256:7d2d9fd66bfadf230b385fdc90426fcd6eb64db54b40c495b72ac0feb5766c54", size = 610211, upload-time = "2025-12-04T14:57:43.968Z" },+ { url = "https://files.pythonhosted.org/packages/79/07/c47a82d881319ec18a4510bb30463ed6891f2ad2c1901ed5ec23d3de351f/greenlet-3.3.0-cp313-cp313-manylinux_2_24_s390x.manylinux_2_28_s390x.whl", hash = "sha256:30a6e28487a790417d036088b3bcb3f3ac7d8babaa7d0139edbaddebf3af9492", size = 624311, upload-time = "2025-12-04T15:07:14.697Z" },+ { url = "https://files.pythonhosted.org/packages/fd/8e/424b8c6e78bd9837d14ff7df01a9829fc883ba2ab4ea787d4f848435f23f/greenlet-3.3.0-cp313-cp313-manylinux_2_24_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:087ea5e004437321508a8d6f20efc4cfec5e3c30118e1417ea96ed1d93950527", size = 612833, upload-time = "2025-12-04T14:26:03.669Z" },+ { url = "https://files.pythonhosted.org/packages/b5/ba/56699ff9b7c76ca12f1cdc27a886d0f81f2189c3455ff9f65246780f713d/greenlet-3.3.0-cp313-cp313-musllinux_1_2_aarch64.whl", hash = "sha256:ab97cf74045343f6c60a39913fa59710e4bd26a536ce7ab2397adf8b27e67c39", size = 1567256, upload-time = "2025-12-04T15:04:25.276Z" },+ { url = "https://files.pythonhosted.org/packages/1e/37/f31136132967982d698c71a281a8901daf1a8fbab935dce7c0cf15f942cc/greenlet-3.3.0-cp313-cp313-musllinux_1_2_x86_64.whl", hash = "sha256:5375d2e23184629112ca1ea89a53389dddbffcf417dad40125713d88eb5f96e8", size = 1636483, upload-time = "2025-12-04T14:27:30.804Z" },+ { url = "https://files.pythonhosted.org/packages/7e/71/ba21c3fb8c5dce83b8c01f458a42e99ffdb1963aeec08fff5a18588d8fd7/greenlet-3.3.0-cp313-cp313-win_amd64.whl", hash = "sha256:9ee1942ea19550094033c35d25d20726e4f1c40d59545815e1128ac58d416d38", size = 301833, upload-time = "2025-12-04T14:32:23.929Z" },+]+[[package]]name = "groq"version = "0.36.0"@@ -1167,33 +1434,28 @@ wheels = [[[package]]name = "grpcio"-version = "1.76.0"-source = { registry = "https://pypi.org/simple" }-dependencies = [- { name = "typing-extensions" },-]-sdist = { url = "https://files.pythonhosted.org/packages/b6/e0/318c1ce3ae5a17894d5791e87aea147587c9e702f24122cc7a5c8bbaeeb1/grpcio-1.76.0.tar.gz", hash = "sha256:7be78388d6da1a25c0d5ec506523db58b18be22d9c37d8d3a32c08be4987bd73", size = 12785182, upload-time = "2025-10-21T16:23:12.106Z" }-wheels = [- { url = "https://files.pythonhosted.org/packages/bf/05/8e29121994b8d959ffa0afd28996d452f291b48cfc0875619de0bde2c50c/grpcio-1.76.0-cp312-cp312-linux_armv7l.whl", hash = "sha256:81fd9652b37b36f16138611c7e884eb82e0cec137c40d3ef7c3f9b3ed00f6ed8", size = 5799718, upload-time = "2025-10-21T16:21:17.939Z" },- { url = "https://files.pythonhosted.org/packages/d9/75/11d0e66b3cdf998c996489581bdad8900db79ebd83513e45c19548f1cba4/grpcio-1.76.0-cp312-cp312-macosx_11_0_universal2.whl", hash = "sha256:04bbe1bfe3a68bbfd4e52402ab7d4eb59d72d02647ae2042204326cf4bbad280", size = 11825627, upload-time = "2025-10-21T16:21:20.466Z" },- { url = "https://files.pythonhosted.org/packages/28/50/2f0aa0498bc188048f5d9504dcc5c2c24f2eb1a9337cd0fa09a61a2e75f0/grpcio-1.76.0-cp312-cp312-manylinux2014_aarch64.manylinux_2_17_aarch64.whl", hash = "sha256:d388087771c837cdb6515539f43b9d4bf0b0f23593a24054ac16f7a960be16f4", size = 6359167, upload-time = "2025-10-21T16:21:23.122Z" },- { url = "https://files.pythonhosted.org/packages/66/e5/bbf0bb97d29ede1d59d6588af40018cfc345b17ce979b7b45424628dc8bb/grpcio-1.76.0-cp312-cp312-manylinux2014_i686.manylinux_2_17_i686.whl", hash = "sha256:9f8f757bebaaea112c00dba718fc0d3260052ce714e25804a03f93f5d1c6cc11", size = 7044267, upload-time = "2025-10-21T16:21:25.995Z" },- { url = "https://files.pythonhosted.org/packages/f5/86/f6ec2164f743d9609691115ae8ece098c76b894ebe4f7c94a655c6b03e98/grpcio-1.76.0-cp312-cp312-manylinux2014_x86_64.manylinux_2_17_x86_64.whl", hash = "sha256:980a846182ce88c4f2f7e2c22c56aefd515daeb36149d1c897f83cf57999e0b6", size = 6573963, upload-time = "2025-10-21T16:21:28.631Z" },- { url = "https://files.pythonhosted.org/packages/60/bc/8d9d0d8505feccfdf38a766d262c71e73639c165b311c9457208b56d92ae/grpcio-1.76.0-cp312-cp312-musllinux_1_2_aarch64.whl", hash = "sha256:f92f88e6c033db65a5ae3d97905c8fea9c725b63e28d5a75cb73b49bda5024d8", size = 7164484, upload-time = "2025-10-21T16:21:30.837Z" },- { url = "https://files.pythonhosted.org/packages/67/e6/5d6c2fc10b95edf6df9b8f19cf10a34263b7fd48493936fffd5085521292/grpcio-1.76.0-cp312-cp312-musllinux_1_2_i686.whl", hash = "sha256:4baf3cbe2f0be3289eb68ac8ae771156971848bb8aaff60bad42005539431980", size = 8127777, upload-time = "2025-10-21T16:21:33.577Z" },- { url = "https://files.pythonhosted.org/packages/3f/c8/dce8ff21c86abe025efe304d9e31fdb0deaaa3b502b6a78141080f206da0/grpcio-1.76.0-cp312-cp312-musllinux_1_2_x86_64.whl", hash = "sha256:615ba64c208aaceb5ec83bfdce7728b80bfeb8be97562944836a7a0a9647d882", size = 7594014, upload-time = "2025-10-21T16:21:41.882Z" },- { url = "https://files.pythonhosted.org/packages/e0/42/ad28191ebf983a5d0ecef90bab66baa5a6b18f2bfdef9d0a63b1973d9f75/grpcio-1.76.0-cp312-cp312-win32.whl", hash = "sha256:45d59a649a82df5718fd9527ce775fd66d1af35e6d31abdcdc906a49c6822958", size = 3984750, upload-time = "2025-10-21T16:21:44.006Z" },- { url = "https://files.pythonhosted.org/packages/9e/00/7bd478cbb851c04a48baccaa49b75abaa8e4122f7d86da797500cccdd771/grpcio-1.76.0-cp312-cp312-win_amd64.whl", hash = "sha256:c088e7a90b6017307f423efbb9d1ba97a22aa2170876223f9709e9d1de0b5347", size = 4704003, upload-time = "2025-10-21T16:21:46.244Z" },- { url = "https://files.pythonhosted.org/packages/fc/ed/71467ab770effc9e8cef5f2e7388beb2be26ed642d567697bb103a790c72/grpcio-1.76.0-cp313-cp313-linux_armv7l.whl", hash = "sha256:26ef06c73eb53267c2b319f43e6634c7556ea37672029241a056629af27c10e2", size = 5807716, upload-time = "2025-10-21T16:21:48.475Z" },- { url = "https://files.pythonhosted.org/packages/2c/85/c6ed56f9817fab03fa8a111ca91469941fb514e3e3ce6d793cb8f1e1347b/grpcio-1.76.0-cp313-cp313-macosx_11_0_universal2.whl", hash = "sha256:45e0111e73f43f735d70786557dc38141185072d7ff8dc1829d6a77ac1471468", size = 11821522, upload-time = "2025-10-21T16:21:51.142Z" },- { url = "https://files.pythonhosted.org/packages/ac/31/2b8a235ab40c39cbc141ef647f8a6eb7b0028f023015a4842933bc0d6831/grpcio-1.76.0-cp313-cp313-manylinux2014_aarch64.manylinux_2_17_aarch64.whl", hash = "sha256:83d57312a58dcfe2a3a0f9d1389b299438909a02db60e2f2ea2ae2d8034909d3", size = 6362558, upload-time = "2025-10-21T16:21:54.213Z" },- { url = "https://files.pythonhosted.org/packages/bd/64/9784eab483358e08847498ee56faf8ff6ea8e0a4592568d9f68edc97e9e9/grpcio-1.76.0-cp313-cp313-manylinux2014_i686.manylinux_2_17_i686.whl", hash = "sha256:3e2a27c89eb9ac3d81ec8835e12414d73536c6e620355d65102503064a4ed6eb", size = 7049990, upload-time = "2025-10-21T16:21:56.476Z" },- { url = "https://files.pythonhosted.org/packages/2b/94/8c12319a6369434e7a184b987e8e9f3b49a114c489b8315f029e24de4837/grpcio-1.76.0-cp313-cp313-manylinux2014_x86_64.manylinux_2_17_x86_64.whl", hash = "sha256:61f69297cba3950a524f61c7c8ee12e55c486cb5f7db47ff9dcee33da6f0d3ae", size = 6575387, upload-time = "2025-10-21T16:21:59.051Z" },- { url = "https://files.pythonhosted.org/packages/15/0f/f12c32b03f731f4a6242f771f63039df182c8b8e2cf8075b245b409259d4/grpcio-1.76.0-cp313-cp313-musllinux_1_2_aarch64.whl", hash = "sha256:6a15c17af8839b6801d554263c546c69c4d7718ad4321e3166175b37eaacca77", size = 7166668, upload-time = "2025-10-21T16:22:02.049Z" },- { url = "https://files.pythonhosted.org/packages/ff/2d/3ec9ce0c2b1d92dd59d1c3264aaec9f0f7c817d6e8ac683b97198a36ed5a/grpcio-1.76.0-cp313-cp313-musllinux_1_2_i686.whl", hash = "sha256:25a18e9810fbc7e7f03ec2516addc116a957f8cbb8cbc95ccc80faa072743d03", size = 8124928, upload-time = "2025-10-21T16:22:04.984Z" },- { url = "https://files.pythonhosted.org/packages/1a/74/fd3317be5672f4856bcdd1a9e7b5e17554692d3db9a3b273879dc02d657d/grpcio-1.76.0-cp313-cp313-musllinux_1_2_x86_64.whl", hash = "sha256:931091142fd8cc14edccc0845a79248bc155425eee9a98b2db2ea4f00a235a42", size = 7589983, upload-time = "2025-10-21T16:22:07.881Z" },- { url = "https://files.pythonhosted.org/packages/45/bb/ca038cf420f405971f19821c8c15bcbc875505f6ffadafe9ffd77871dc4c/grpcio-1.76.0-cp313-cp313-win32.whl", hash = "sha256:5e8571632780e08526f118f74170ad8d50fb0a48c23a746bef2a6ebade3abd6f", size = 3984727, upload-time = "2025-10-21T16:22:10.032Z" },- { url = "https://files.pythonhosted.org/packages/41/80/84087dc56437ced7cdd4b13d7875e7439a52a261e3ab4e06488ba6173b0a/grpcio-1.76.0-cp313-cp313-win_amd64.whl", hash = "sha256:f9f7bd5faab55f47231ad8dba7787866b69f5e93bc306e3915606779bbfb4ba8", size = 4702799, upload-time = "2025-10-21T16:22:12.709Z" },+version = "1.67.1"+source = { registry = "https://pypi.org/simple" }+sdist = { url = "https://files.pythonhosted.org/packages/20/53/d9282a66a5db45981499190b77790570617a604a38f3d103d0400974aeb5/grpcio-1.67.1.tar.gz", hash = "sha256:3dc2ed4cabea4dc14d5e708c2b426205956077cc5de419b4d4079315017e9732", size = 12580022, upload-time = "2024-10-29T06:30:07.787Z" }+wheels = [+ { url = "https://files.pythonhosted.org/packages/6e/25/6f95bd18d5f506364379eabc0d5874873cc7dbdaf0757df8d1e82bc07a88/grpcio-1.67.1-cp312-cp312-linux_armv7l.whl", hash = "sha256:267d1745894200e4c604958da5f856da6293f063327cb049a51fe67348e4f953", size = 5089809, upload-time = "2024-10-29T06:24:31.24Z" },+ { url = "https://files.pythonhosted.org/packages/10/3f/d79e32e5d0354be33a12db2267c66d3cfeff700dd5ccdd09fd44a3ff4fb6/grpcio-1.67.1-cp312-cp312-macosx_10_9_universal2.whl", hash = "sha256:85f69fdc1d28ce7cff8de3f9c67db2b0ca9ba4449644488c1e0303c146135ddb", size = 10981985, upload-time = "2024-10-29T06:24:34.942Z" },+ { url = "https://files.pythonhosted.org/packages/21/f2/36fbc14b3542e3a1c20fb98bd60c4732c55a44e374a4eb68f91f28f14aab/grpcio-1.67.1-cp312-cp312-manylinux_2_17_aarch64.whl", hash = "sha256:f26b0b547eb8d00e195274cdfc63ce64c8fc2d3e2d00b12bf468ece41a0423a0", size = 5588770, upload-time = "2024-10-29T06:24:38.145Z" },+ { url = "https://files.pythonhosted.org/packages/0d/af/bbc1305df60c4e65de8c12820a942b5e37f9cf684ef5e49a63fbb1476a73/grpcio-1.67.1-cp312-cp312-manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:4422581cdc628f77302270ff839a44f4c24fdc57887dc2a45b7e53d8fc2376af", size = 6214476, upload-time = "2024-10-29T06:24:41.006Z" },+ { url = "https://files.pythonhosted.org/packages/92/cf/1d4c3e93efa93223e06a5c83ac27e32935f998bc368e276ef858b8883154/grpcio-1.67.1-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:1d7616d2ded471231c701489190379e0c311ee0a6c756f3c03e6a62b95a7146e", size = 5850129, upload-time = "2024-10-29T06:24:43.553Z" },+ { url = "https://files.pythonhosted.org/packages/ae/ca/26195b66cb253ac4d5ef59846e354d335c9581dba891624011da0e95d67b/grpcio-1.67.1-cp312-cp312-musllinux_1_1_i686.whl", hash = "sha256:8a00efecde9d6fcc3ab00c13f816313c040a28450e5e25739c24f432fc6d3c75", size = 6568489, upload-time = "2024-10-29T06:24:46.453Z" },+ { url = "https://files.pythonhosted.org/packages/d1/94/16550ad6b3f13b96f0856ee5dfc2554efac28539ee84a51d7b14526da985/grpcio-1.67.1-cp312-cp312-musllinux_1_1_x86_64.whl", hash = "sha256:699e964923b70f3101393710793289e42845791ea07565654ada0969522d0a38", size = 6149369, upload-time = "2024-10-29T06:24:49.112Z" },+ { url = "https://files.pythonhosted.org/packages/33/0d/4c3b2587e8ad7f121b597329e6c2620374fccbc2e4e1aa3c73ccc670fde4/grpcio-1.67.1-cp312-cp312-win32.whl", hash = "sha256:4e7b904484a634a0fff132958dabdb10d63e0927398273917da3ee103e8d1f78", size = 3599176, upload-time = "2024-10-29T06:24:51.443Z" },+ { url = "https://files.pythonhosted.org/packages/7d/36/0c03e2d80db69e2472cf81c6123aa7d14741de7cf790117291a703ae6ae1/grpcio-1.67.1-cp312-cp312-win_amd64.whl", hash = "sha256:5721e66a594a6c4204458004852719b38f3d5522082be9061d6510b455c90afc", size = 4346574, upload-time = "2024-10-29T06:24:54.587Z" },+ { url = "https://files.pythonhosted.org/packages/12/d2/2f032b7a153c7723ea3dea08bffa4bcaca9e0e5bdf643ce565b76da87461/grpcio-1.67.1-cp313-cp313-linux_armv7l.whl", hash = "sha256:aa0162e56fd10a5547fac8774c4899fc3e18c1aa4a4759d0ce2cd00d3696ea6b", size = 5091487, upload-time = "2024-10-29T06:24:57.416Z" },+ { url = "https://files.pythonhosted.org/packages/d0/ae/ea2ff6bd2475a082eb97db1104a903cf5fc57c88c87c10b3c3f41a184fc0/grpcio-1.67.1-cp313-cp313-macosx_10_13_universal2.whl", hash = "sha256:beee96c8c0b1a75d556fe57b92b58b4347c77a65781ee2ac749d550f2a365dc1", size = 10943530, upload-time = "2024-10-29T06:25:01.062Z" },+ { url = "https://files.pythonhosted.org/packages/07/62/646be83d1a78edf8d69b56647327c9afc223e3140a744c59b25fbb279c3b/grpcio-1.67.1-cp313-cp313-manylinux_2_17_aarch64.whl", hash = "sha256:a93deda571a1bf94ec1f6fcda2872dad3ae538700d94dc283c672a3b508ba3af", size = 5589079, upload-time = "2024-10-29T06:25:04.254Z" },+ { url = "https://files.pythonhosted.org/packages/d0/25/71513d0a1b2072ce80d7f5909a93596b7ed10348b2ea4fdcbad23f6017bf/grpcio-1.67.1-cp313-cp313-manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:0e6f255980afef598a9e64a24efce87b625e3e3c80a45162d111a461a9f92955", size = 6213542, upload-time = "2024-10-29T06:25:06.824Z" },+ { url = "https://files.pythonhosted.org/packages/76/9a/d21236297111052dcb5dc85cd77dc7bf25ba67a0f55ae028b2af19a704bc/grpcio-1.67.1-cp313-cp313-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:9e838cad2176ebd5d4a8bb03955138d6589ce9e2ce5d51c3ada34396dbd2dba8", size = 5850211, upload-time = "2024-10-29T06:25:10.149Z" },+ { url = "https://files.pythonhosted.org/packages/2d/fe/70b1da9037f5055be14f359026c238821b9bcf6ca38a8d760f59a589aacd/grpcio-1.67.1-cp313-cp313-musllinux_1_1_i686.whl", hash = "sha256:a6703916c43b1d468d0756c8077b12017a9fcb6a1ef13faf49e67d20d7ebda62", size = 6572129, upload-time = "2024-10-29T06:25:12.853Z" },+ { url = "https://files.pythonhosted.org/packages/74/0d/7df509a2cd2a54814598caf2fb759f3e0b93764431ff410f2175a6efb9e4/grpcio-1.67.1-cp313-cp313-musllinux_1_1_x86_64.whl", hash = "sha256:917e8d8994eed1d86b907ba2a61b9f0aef27a2155bca6cbb322430fc7135b7bb", size = 6149819, upload-time = "2024-10-29T06:25:15.803Z" },+ { url = "https://files.pythonhosted.org/packages/0a/08/bc3b0155600898fd10f16b79054e1cca6cb644fa3c250c0fe59385df5e6f/grpcio-1.67.1-cp313-cp313-win32.whl", hash = "sha256:e279330bef1744040db8fc432becc8a727b84f456ab62b744d3fdb83f327e121", size = 3596561, upload-time = "2024-10-29T06:25:19.348Z" },+ { url = "https://files.pythonhosted.org/packages/5a/96/44759eca966720d0f3e1b105c43f8ad4590c97bf8eb3cd489656e9590baa/grpcio-1.67.1-cp313-cp313-win_amd64.whl", hash = "sha256:fa0c739ad8b1996bd24823950e3cb5152ae91fca1c09cc791190bf1627ffefba", size = 4346042, upload-time = "2024-10-29T06:25:21.939Z" },][[package]]@@ -1548,6 +1810,24 @@ wheels = [{ url = "https://files.pythonhosted.org/packages/d9/71/71408b02c6133153336d29fa3ba53000f1e1a3f78bb2fc2d1a1865d2e743/jiter-0.11.1-graalpy312-graalpy250_312_native-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:18c77aaa9117510d5bdc6a946baf21b1f0cfa58ef04d31c8d016f206f2118960", size = 343697, upload-time = "2025-10-17T11:31:13.773Z" },]+[[package]]+name = "joblib"+version = "1.5.2"+source = { registry = "https://pypi.org/simple" }+sdist = { url = "https://files.pythonhosted.org/packages/e8/5d/447af5ea094b9e4c4054f82e223ada074c552335b9b4b2d14bd9b35a67c4/joblib-1.5.2.tar.gz", hash = "sha256:3faa5c39054b2f03ca547da9b2f52fde67c06240c31853f306aea97f13647b55", size = 331077, upload-time = "2025-08-27T12:15:46.575Z" }+wheels = [+ { url = "https://files.pythonhosted.org/packages/1e/e8/685f47e0d754320684db4425a0967f7d3fa70126bffd76110b7009a0090f/joblib-1.5.2-py3-none-any.whl", hash = "sha256:4e1f0bdbb987e6d843c70cf43714cb276623def372df3c22fe5266b2670bc241", size = 308396, upload-time = "2025-08-27T12:15:45.188Z" },+]++[[package]]+name = "json-repair"+version = "0.54.2"+source = { registry = "https://pypi.org/simple" }+sdist = { url = "https://files.pythonhosted.org/packages/ff/05/9fbcd5ffab9c41455e7d80af65a90876718b8ea2fb4525e187ab11836dd4/json_repair-0.54.2.tar.gz", hash = "sha256:4b6b62ce17f1a505b220fa4aadba1fc37dc9c221544f158471efe3775620bad6", size = 38575, upload-time = "2025-11-25T19:31:22.768Z" }+wheels = [+ { url = "https://files.pythonhosted.org/packages/53/3a/1b4df9adcd69fee9c9e4b439c13e8c866f2fae520054aede7030b2278be9/json_repair-0.54.2-py3-none-any.whl", hash = "sha256:be51cce5dca97e0c24ebdf61a1ede2449a8a7666012de99467bb7b0afb35179b", size = 29322, upload-time = "2025-11-25T19:31:21.492Z" },+]+[[package]]name = "jsonref"version = "1.1.0"@@ -1572,6 +1852,21 @@ wheels = [{ url = "https://files.pythonhosted.org/packages/bf/9c/8c95d856233c1f82500c2450b8c68576b4cf1c871db3afac5c34ff84e6fd/jsonschema-4.25.1-py3-none-any.whl", hash = "sha256:3fba0169e345c7175110351d456342c364814cfcf3b964ba4587f22915230a63", size = 90040, upload-time = "2025-08-18T17:03:48.373Z" },]+[[package]]+name = "jsonschema-path"+version = "0.3.4"+source = { registry = "https://pypi.org/simple" }+dependencies = [+ { name = "pathable" },+ { name = "pyyaml" },+ { name = "referencing" },+ { name = "requests" },+]+sdist = { url = "https://files.pythonhosted.org/packages/6e/45/41ebc679c2a4fced6a722f624c18d658dee42612b83ea24c1caf7c0eb3a8/jsonschema_path-0.3.4.tar.gz", hash = "sha256:8365356039f16cc65fddffafda5f58766e34bebab7d6d105616ab52bc4297001", size = 11159, upload-time = "2025-01-24T14:33:16.547Z" }+wheels = [+ { url = "https://files.pythonhosted.org/packages/cb/58/3485da8cb93d2f393bce453adeef16896751f14ba3e2024bc21dc9597646/jsonschema_path-0.3.4-py3-none-any.whl", hash = "sha256:f502191fdc2b22050f9a81c9237be9d27145b9001c55842bece5e94e382e52f8", size = 14810, upload-time = "2025-01-24T14:33:14.652Z" },+]+[[package]]name = "jsonschema-specifications"version = "2025.9.1"@@ -1630,6 +1925,30 @@ wheels = [{ url = "https://files.pythonhosted.org/packages/04/1e/b832de447dee8b582cac175871d2f6c3d5077cc56d5575cadba1fd1cccfa/linkify_it_py-2.0.3-py3-none-any.whl", hash = "sha256:6bcbc417b0ac14323382aef5c5192c0075bf8a9d6b41820a2b66371eac6b6d79", size = 19820, upload-time = "2024-02-04T14:48:02.496Z" },]+[[package]]+name = "litellm"+version = "1.80.9"+source = { registry = "https://pypi.org/simple" }+dependencies = [+ { name = "aiohttp" },+ { name = "click" },+ { name = "fastuuid" },+ { name = "grpcio" },+ { name = "httpx" },+ { name = "importlib-metadata" },+ { name = "jinja2" },+ { name = "jsonschema" },+ { name = "openai" },+ { name = "pydantic" },+ { name = "python-dotenv" },+ { name = "tiktoken" },+ { name = "tokenizers" },+]+sdist = { url = "https://files.pythonhosted.org/packages/74/a0/0a6d6992120077fe47dc1432b69071a0a6030bc4f68c01be561382d65521/litellm-1.80.9.tar.gz", hash = "sha256:768b62f26086efbaed40f4dfd353ff66302474bbfb0adf5862066acdb0727df6", size = 12348545, upload-time = "2025-12-08T21:05:00.688Z" }+wheels = [+ { url = "https://files.pythonhosted.org/packages/0d/02/85f4b50d39d82dcf39bf1fbf2648cb01311866eb2ef2462666348b5ef1fe/litellm-1.80.9-py3-none-any.whl", hash = "sha256:bad02b96ee3d83702639553ffc5961c605f4f937be8167181bc4c80394a1cdd1", size = 11075736, upload-time = "2025-12-08T21:04:57.493Z" },+]+[[package]]name = "lxml"version = "5.4.0"@@ -1689,6 +2008,14 @@ wheels = [{ url = "https://files.pythonhosted.org/packages/10/4a/63a9540e3ca73709f4200564a737d63a4c8c9c4dd032bab8535f507c190a/lxml_html_clean-0.4.3-py3-none-any.whl", hash = "sha256:63fd7b0b9c3a2e4176611c2ca5d61c4c07ffca2de76c14059a81a2825833731e", size = 14177, upload-time = "2025-10-02T20:49:23.749Z" },]+[[package]]+name = "magicattr"+version = "0.1.6"+source = { registry = "https://pypi.org/simple" }+wheels = [+ { url = "https://files.pythonhosted.org/packages/2a/7e/76b7e0c391bee7e9273725c29c8fe41c4df62a215ce58aa8e3518baee0bb/magicattr-0.1.6-py2.py3-none-any.whl", hash = "sha256:d96b18ee45b5ee83b09c17e15d3459a64de62d538808c2f71182777dd9dbbbdf", size = 4664, upload-time = "2022-01-25T16:56:47.074Z" },+]+[[package]]name = "mako"version = "1.3.10"@@ -2111,6 +2438,18 @@ wheels = [{ url = "https://files.pythonhosted.org/packages/55/4f/dbc0c124c40cb390508a82770fb9f6e3ed162560181a85089191a851c59a/openai-2.8.1-py3-none-any.whl", hash = "sha256:c6c3b5a04994734386e8dad3c00a393f56d3b68a27cd2e8acae91a59e4122463", size = 1022688, upload-time = "2025-11-17T22:39:57.675Z" },]+[[package]]+name = "openapi-pydantic"+version = "0.5.1"+source = { registry = "https://pypi.org/simple" }+dependencies = [+ { name = "pydantic" },+]+sdist = { url = "https://files.pythonhosted.org/packages/02/2e/58d83848dd1a79cb92ed8e63f6ba901ca282c5f09d04af9423ec26c56fd7/openapi_pydantic-0.5.1.tar.gz", hash = "sha256:ff6835af6bde7a459fb93eb93bb92b8749b754fc6e51b2f1590a19dc3005ee0d", size = 60892, upload-time = "2025-01-08T19:29:27.083Z" }+wheels = [+ { url = "https://files.pythonhosted.org/packages/12/cf/03675d8bd8ecbf4445504d8071adab19f5f993676795708e36402ab38263/openapi_pydantic-0.5.1-py3-none-any.whl", hash = "sha256:a3a09ef4586f5bd760a8df7f43028b60cafb6d9f61de2acba9574766255ab146", size = 96381, upload-time = "2025-01-08T19:29:25.275Z" },+]+[[package]]name = "opentelemetry-api"version = "1.38.0"@@ -2193,6 +2532,24 @@ wheels = [{ url = "https://files.pythonhosted.org/packages/24/7d/c88d7b15ba8fe5c6b8f93be50fc11795e9fc05386c44afaf6b76fe191f9b/opentelemetry_semantic_conventions-0.59b0-py3-none-any.whl", hash = "sha256:35d3b8833ef97d614136e253c1da9342b4c3c083bbaf29ce31d572a1c3825eed", size = 207954, upload-time = "2025-10-16T08:35:48.054Z" },]+[[package]]+name = "optuna"+version = "4.6.0"+source = { registry = "https://pypi.org/simple" }+dependencies = [+ { name = "alembic" },+ { name = "colorlog" },+ { name = "numpy" },+ { name = "packaging" },+ { name = "pyyaml" },+ { name = "sqlalchemy" },+ { name = "tqdm" },+]+sdist = { url = "https://files.pythonhosted.org/packages/6b/81/08f90f194eed78178064a9383432eca95611e2c5331e7b01e2418ce4b15a/optuna-4.6.0.tar.gz", hash = "sha256:89e38c2447c7f793a726617b8043f01e31f0bad54855040db17eb3b49404a369", size = 477444, upload-time = "2025-11-10T05:14:30.151Z" }+wheels = [+ { url = "https://files.pythonhosted.org/packages/58/de/3d8455b08cb6312f8cc46aacdf16c71d4d881a1db4a4140fc5ef31108422/optuna-4.6.0-py3-none-any.whl", hash = "sha256:4c3a9facdef2b2dd7e3e2a8ae3697effa70fae4056fcf3425cfc6f5a40feb069", size = 404708, upload-time = "2025-11-10T05:14:28.6Z" },+]+[[package]]name = "orchestration-agent"version = "0.1.0"@@ -2272,6 +2629,15 @@ wheels = [{ url = "https://files.pythonhosted.org/packages/20/12/38679034af332785aac8774540895e234f4d07f7545804097de4b666afd8/packaging-25.0-py3-none-any.whl", hash = "sha256:29572ef2b1f17581046b3a2227d5c611fb25ec70ca1ba8554b24b0e69331a484", size = 66469, upload-time = "2025-04-19T11:48:57.875Z" },]+[[package]]+name = "pathable"+version = "0.4.4"+source = { registry = "https://pypi.org/simple" }+sdist = { url = "https://files.pythonhosted.org/packages/67/93/8f2c2075b180c12c1e9f6a09d1a985bc2036906b13dff1d8917e395f2048/pathable-0.4.4.tar.gz", hash = "sha256:6905a3cd17804edfac7875b5f6c9142a218c7caef78693c2dbbbfbac186d88b2", size = 8124, upload-time = "2025-01-10T18:43:13.247Z" }+wheels = [+ { url = "https://files.pythonhosted.org/packages/7d/eb/b6260b31b1a96386c0a880edebe26f89669098acea8e0318bff6adb378fd/pathable-0.4.4-py3-none-any.whl", hash = "sha256:5ae9e94793b6ef5a4cbe0a7ce9dbbefc1eec38df253763fd0aeeacf2762dbbc2", size = 9592, upload-time = "2025-01-10T18:43:11.88Z" },+]+[[package]]name = "pathspec"version = "0.12.1"@@ -2281,6 +2647,48 @@ wheels = [{ url = "https://files.pythonhosted.org/packages/cc/20/ff623b09d963f88bfde16306a54e12ee5ea43e9b597108672ff3a408aad6/pathspec-0.12.1-py3-none-any.whl", hash = "sha256:a0d503e138a4c123b27490a4f7beda6a01c6f288df0e4a8b79c7eb0dc7b4cc08", size = 31191, upload-time = "2023-12-10T22:30:43.14Z" },]+[[package]]+name = "pathvalidate"+version = "3.3.1"+source = { registry = "https://pypi.org/simple" }+sdist = { url = "https://files.pythonhosted.org/packages/fa/2a/52a8da6fe965dea6192eb716b357558e103aea0a1e9a8352ad575a8406ca/pathvalidate-3.3.1.tar.gz", hash = "sha256:b18c07212bfead624345bb8e1d6141cdcf15a39736994ea0b94035ad2b1ba177", size = 63262, upload-time = "2025-06-15T09:07:20.736Z" }+wheels = [+ { url = "https://files.pythonhosted.org/packages/9a/70/875f4a23bfc4731703a5835487d0d2fb999031bd415e7d17c0ae615c18b7/pathvalidate-3.3.1-py3-none-any.whl", hash = "sha256:5263baab691f8e1af96092fa5137ee17df5bdfbd6cff1fcac4d6ef4bc2e1735f", size = 24305, upload-time = "2025-06-15T09:07:19.117Z" },+]++[[package]]+name = "pd-data-server"+version = "0.1.0"+source = { directory = "atomic-examples/progressive-disclosure/servers/data_server" }+dependencies = [+ { name = "fastmcp" },+]++[package.metadata]+requires-dist = [{ name = "fastmcp", specifier = ">=2.0.0" }]++[[package]]+name = "pd-math-server"+version = "0.1.0"+source = { directory = "atomic-examples/progressive-disclosure/servers/math_server" }+dependencies = [+ { name = "fastmcp" },+]++[package.metadata]+requires-dist = [{ name = "fastmcp", specifier = ">=2.0.0" }]++[[package]]+name = "pd-text-server"+version = "0.1.0"+source = { directory = "atomic-examples/progressive-disclosure/servers/text_server" }+dependencies = [+ { name = "fastmcp" },+]++[package.metadata]+requires-dist = [{ name = "fastmcp", specifier = ">=2.0.0" }]+[[package]]name = "pdoc3"version = "0.11.6"@@ -2294,6 +2702,50 @@ wheels = [{ url = "https://files.pythonhosted.org/packages/df/98/629f269c2bd91bdcac147aad5cf51ceb645c0196e23a41ee3c051125190f/pdoc3-0.11.6-py3-none-any.whl", hash = "sha256:8b72723767bd48d899812d2aec8375fc1c3476e179455db0b4575e6dccb44b93", size = 255188, upload-time = "2025-03-20T22:53:51.671Z" },]+[[package]]+name = "pillow"+version = "12.0.0"+source = { registry = "https://pypi.org/simple" }+sdist = { url = "https://files.pythonhosted.org/packages/5a/b0/cace85a1b0c9775a9f8f5d5423c8261c858760e2466c79b2dd184638b056/pillow-12.0.0.tar.gz", hash = "sha256:87d4f8125c9988bfbed67af47dd7a953e2fc7b0cc1e7800ec6d2080d490bb353", size = 47008828, upload-time = "2025-10-15T18:24:14.008Z" }+wheels = [+ { url = "https://files.pythonhosted.org/packages/2c/90/4fcce2c22caf044e660a198d740e7fbc14395619e3cb1abad12192c0826c/pillow-12.0.0-cp312-cp312-macosx_10_13_x86_64.whl", hash = "sha256:53561a4ddc36facb432fae7a9d8afbfaf94795414f5cdc5fc52f28c1dca90371", size = 5249377, upload-time = "2025-10-15T18:22:05.993Z" },+ { url = "https://files.pythonhosted.org/packages/fd/e0/ed960067543d080691d47d6938ebccbf3976a931c9567ab2fbfab983a5dd/pillow-12.0.0-cp312-cp312-macosx_11_0_arm64.whl", hash = "sha256:71db6b4c1653045dacc1585c1b0d184004f0d7e694c7b34ac165ca70c0838082", size = 4650343, upload-time = "2025-10-15T18:22:07.718Z" },+ { url = "https://files.pythonhosted.org/packages/e7/a1/f81fdeddcb99c044bf7d6faa47e12850f13cee0849537a7d27eeab5534d4/pillow-12.0.0-cp312-cp312-manylinux2014_aarch64.manylinux_2_17_aarch64.whl", hash = "sha256:2fa5f0b6716fc88f11380b88b31fe591a06c6315e955c096c35715788b339e3f", size = 6232981, upload-time = "2025-10-15T18:22:09.287Z" },+ { url = "https://files.pythonhosted.org/packages/88/e1/9098d3ce341a8750b55b0e00c03f1630d6178f38ac191c81c97a3b047b44/pillow-12.0.0-cp312-cp312-manylinux2014_x86_64.manylinux_2_17_x86_64.whl", hash = "sha256:82240051c6ca513c616f7f9da06e871f61bfd7805f566275841af15015b8f98d", size = 8041399, upload-time = "2025-10-15T18:22:10.872Z" },+ { url = "https://files.pythonhosted.org/packages/a7/62/a22e8d3b602ae8cc01446d0c57a54e982737f44b6f2e1e019a925143771d/pillow-12.0.0-cp312-cp312-manylinux_2_27_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:55f818bd74fe2f11d4d7cbc65880a843c4075e0ac7226bc1a23261dbea531953", size = 6347740, upload-time = "2025-10-15T18:22:12.769Z" },+ { url = "https://files.pythonhosted.org/packages/4f/87/424511bdcd02c8d7acf9f65caa09f291a519b16bd83c3fb3374b3d4ae951/pillow-12.0.0-cp312-cp312-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:b87843e225e74576437fd5b6a4c2205d422754f84a06942cfaf1dc32243e45a8", size = 7040201, upload-time = "2025-10-15T18:22:14.813Z" },+ { url = "https://files.pythonhosted.org/packages/dc/4d/435c8ac688c54d11755aedfdd9f29c9eeddf68d150fe42d1d3dbd2365149/pillow-12.0.0-cp312-cp312-musllinux_1_2_aarch64.whl", hash = "sha256:c607c90ba67533e1b2355b821fef6764d1dd2cbe26b8c1005ae84f7aea25ff79", size = 6462334, upload-time = "2025-10-15T18:22:16.375Z" },+ { url = "https://files.pythonhosted.org/packages/2b/f2/ad34167a8059a59b8ad10bc5c72d4d9b35acc6b7c0877af8ac885b5f2044/pillow-12.0.0-cp312-cp312-musllinux_1_2_x86_64.whl", hash = "sha256:21f241bdd5080a15bc86d3466a9f6074a9c2c2b314100dd896ac81ee6db2f1ba", size = 7134162, upload-time = "2025-10-15T18:22:17.996Z" },+ { url = "https://files.pythonhosted.org/packages/0c/b1/a7391df6adacf0a5c2cf6ac1cf1fcc1369e7d439d28f637a847f8803beb3/pillow-12.0.0-cp312-cp312-win32.whl", hash = "sha256:dd333073e0cacdc3089525c7df7d39b211bcdf31fc2824e49d01c6b6187b07d0", size = 6298769, upload-time = "2025-10-15T18:22:19.923Z" },+ { url = "https://files.pythonhosted.org/packages/a2/0b/d87733741526541c909bbf159e338dcace4f982daac6e5a8d6be225ca32d/pillow-12.0.0-cp312-cp312-win_amd64.whl", hash = "sha256:9fe611163f6303d1619bbcb653540a4d60f9e55e622d60a3108be0d5b441017a", size = 7001107, upload-time = "2025-10-15T18:22:21.644Z" },+ { url = "https://files.pythonhosted.org/packages/bc/96/aaa61ce33cc98421fb6088af2a03be4157b1e7e0e87087c888e2370a7f45/pillow-12.0.0-cp312-cp312-win_arm64.whl", hash = "sha256:7dfb439562f234f7d57b1ac6bc8fe7f838a4bd49c79230e0f6a1da93e82f1fad", size = 2436012, upload-time = "2025-10-15T18:22:23.621Z" },+ { url = "https://files.pythonhosted.org/packages/62/f2/de993bb2d21b33a98d031ecf6a978e4b61da207bef02f7b43093774c480d/pillow-12.0.0-cp313-cp313-ios_13_0_arm64_iphoneos.whl", hash = "sha256:0869154a2d0546545cde61d1789a6524319fc1897d9ee31218eae7a60ccc5643", size = 4045493, upload-time = "2025-10-15T18:22:25.758Z" },+ { url = "https://files.pythonhosted.org/packages/0e/b6/bc8d0c4c9f6f111a783d045310945deb769b806d7574764234ffd50bc5ea/pillow-12.0.0-cp313-cp313-ios_13_0_arm64_iphonesimulator.whl", hash = "sha256:a7921c5a6d31b3d756ec980f2f47c0cfdbce0fc48c22a39347a895f41f4a6ea4", size = 4120461, upload-time = "2025-10-15T18:22:27.286Z" },+ { url = "https://files.pythonhosted.org/packages/5d/57/d60d343709366a353dc56adb4ee1e7d8a2cc34e3fbc22905f4167cfec119/pillow-12.0.0-cp313-cp313-ios_13_0_x86_64_iphonesimulator.whl", hash = "sha256:1ee80a59f6ce048ae13cda1abf7fbd2a34ab9ee7d401c46be3ca685d1999a399", size = 3576912, upload-time = "2025-10-15T18:22:28.751Z" },+ { url = "https://files.pythonhosted.org/packages/a4/a4/a0a31467e3f83b94d37568294b01d22b43ae3c5d85f2811769b9c66389dd/pillow-12.0.0-cp313-cp313-macosx_10_13_x86_64.whl", hash = "sha256:c50f36a62a22d350c96e49ad02d0da41dbd17ddc2e29750dbdba4323f85eb4a5", size = 5249132, upload-time = "2025-10-15T18:22:30.641Z" },+ { url = "https://files.pythonhosted.org/packages/83/06/48eab21dd561de2914242711434c0c0eb992ed08ff3f6107a5f44527f5e9/pillow-12.0.0-cp313-cp313-macosx_11_0_arm64.whl", hash = "sha256:5193fde9a5f23c331ea26d0cf171fbf67e3f247585f50c08b3e205c7aeb4589b", size = 4650099, upload-time = "2025-10-15T18:22:32.73Z" },+ { url = "https://files.pythonhosted.org/packages/fc/bd/69ed99fd46a8dba7c1887156d3572fe4484e3f031405fcc5a92e31c04035/pillow-12.0.0-cp313-cp313-manylinux2014_aarch64.manylinux_2_17_aarch64.whl", hash = "sha256:bde737cff1a975b70652b62d626f7785e0480918dece11e8fef3c0cf057351c3", size = 6230808, upload-time = "2025-10-15T18:22:34.337Z" },+ { url = "https://files.pythonhosted.org/packages/ea/94/8fad659bcdbf86ed70099cb60ae40be6acca434bbc8c4c0d4ef356d7e0de/pillow-12.0.0-cp313-cp313-manylinux2014_x86_64.manylinux_2_17_x86_64.whl", hash = "sha256:a6597ff2b61d121172f5844b53f21467f7082f5fb385a9a29c01414463f93b07", size = 8037804, upload-time = "2025-10-15T18:22:36.402Z" },+ { url = "https://files.pythonhosted.org/packages/20/39/c685d05c06deecfd4e2d1950e9a908aa2ca8bc4e6c3b12d93b9cafbd7837/pillow-12.0.0-cp313-cp313-manylinux_2_27_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:0b817e7035ea7f6b942c13aa03bb554fc44fea70838ea21f8eb31c638326584e", size = 6345553, upload-time = "2025-10-15T18:22:38.066Z" },+ { url = "https://files.pythonhosted.org/packages/38/57/755dbd06530a27a5ed74f8cb0a7a44a21722ebf318edbe67ddbd7fb28f88/pillow-12.0.0-cp313-cp313-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:f4f1231b7dec408e8670264ce63e9c71409d9583dd21d32c163e25213ee2a344", size = 7037729, upload-time = "2025-10-15T18:22:39.769Z" },+ { url = "https://files.pythonhosted.org/packages/ca/b6/7e94f4c41d238615674d06ed677c14883103dce1c52e4af16f000338cfd7/pillow-12.0.0-cp313-cp313-musllinux_1_2_aarch64.whl", hash = "sha256:6e51b71417049ad6ab14c49608b4a24d8fb3fe605e5dfabfe523b58064dc3d27", size = 6459789, upload-time = "2025-10-15T18:22:41.437Z" },+ { url = "https://files.pythonhosted.org/packages/9c/14/4448bb0b5e0f22dd865290536d20ec8a23b64e2d04280b89139f09a36bb6/pillow-12.0.0-cp313-cp313-musllinux_1_2_x86_64.whl", hash = "sha256:d120c38a42c234dc9a8c5de7ceaaf899cf33561956acb4941653f8bdc657aa79", size = 7130917, upload-time = "2025-10-15T18:22:43.152Z" },+ { url = "https://files.pythonhosted.org/packages/dd/ca/16c6926cc1c015845745d5c16c9358e24282f1e588237a4c36d2b30f182f/pillow-12.0.0-cp313-cp313-win32.whl", hash = "sha256:4cc6b3b2efff105c6a1656cfe59da4fdde2cda9af1c5e0b58529b24525d0a098", size = 6302391, upload-time = "2025-10-15T18:22:44.753Z" },+ { url = "https://files.pythonhosted.org/packages/6d/2a/dd43dcfd6dae9b6a49ee28a8eedb98c7d5ff2de94a5d834565164667b97b/pillow-12.0.0-cp313-cp313-win_amd64.whl", hash = "sha256:4cf7fed4b4580601c4345ceb5d4cbf5a980d030fd5ad07c4d2ec589f95f09905", size = 7007477, upload-time = "2025-10-15T18:22:46.838Z" },+ { url = "https://files.pythonhosted.org/packages/77/f0/72ea067f4b5ae5ead653053212af05ce3705807906ba3f3e8f58ddf617e6/pillow-12.0.0-cp313-cp313-win_arm64.whl", hash = "sha256:9f0b04c6b8584c2c193babcccc908b38ed29524b29dd464bc8801bf10d746a3a", size = 2435918, upload-time = "2025-10-15T18:22:48.399Z" },+ { url = "https://files.pythonhosted.org/packages/f5/5e/9046b423735c21f0487ea6cb5b10f89ea8f8dfbe32576fe052b5ba9d4e5b/pillow-12.0.0-cp313-cp313t-macosx_10_13_x86_64.whl", hash = "sha256:7fa22993bac7b77b78cae22bad1e2a987ddf0d9015c63358032f84a53f23cdc3", size = 5251406, upload-time = "2025-10-15T18:22:49.905Z" },+ { url = "https://files.pythonhosted.org/packages/12/66/982ceebcdb13c97270ef7a56c3969635b4ee7cd45227fa707c94719229c5/pillow-12.0.0-cp313-cp313t-macosx_11_0_arm64.whl", hash = "sha256:f135c702ac42262573fe9714dfe99c944b4ba307af5eb507abef1667e2cbbced", size = 4653218, upload-time = "2025-10-15T18:22:51.587Z" },+ { url = "https://files.pythonhosted.org/packages/16/b3/81e625524688c31859450119bf12674619429cab3119eec0e30a7a1029cb/pillow-12.0.0-cp313-cp313t-manylinux2014_aarch64.manylinux_2_17_aarch64.whl", hash = "sha256:c85de1136429c524e55cfa4e033b4a7940ac5c8ee4d9401cc2d1bf48154bbc7b", size = 6266564, upload-time = "2025-10-15T18:22:53.215Z" },+ { url = "https://files.pythonhosted.org/packages/98/59/dfb38f2a41240d2408096e1a76c671d0a105a4a8471b1871c6902719450c/pillow-12.0.0-cp313-cp313t-manylinux2014_x86_64.manylinux_2_17_x86_64.whl", hash = "sha256:38df9b4bfd3db902c9c2bd369bcacaf9d935b2fff73709429d95cc41554f7b3d", size = 8069260, upload-time = "2025-10-15T18:22:54.933Z" },+ { url = "https://files.pythonhosted.org/packages/dc/3d/378dbea5cd1874b94c312425ca77b0f47776c78e0df2df751b820c8c1d6c/pillow-12.0.0-cp313-cp313t-manylinux_2_27_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:7d87ef5795da03d742bf49439f9ca4d027cde49c82c5371ba52464aee266699a", size = 6379248, upload-time = "2025-10-15T18:22:56.605Z" },+ { url = "https://files.pythonhosted.org/packages/84/b0/d525ef47d71590f1621510327acec75ae58c721dc071b17d8d652ca494d8/pillow-12.0.0-cp313-cp313t-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:aff9e4d82d082ff9513bdd6acd4f5bd359f5b2c870907d2b0a9c5e10d40c88fe", size = 7066043, upload-time = "2025-10-15T18:22:58.53Z" },+ { url = "https://files.pythonhosted.org/packages/61/2c/aced60e9cf9d0cde341d54bf7932c9ffc33ddb4a1595798b3a5150c7ec4e/pillow-12.0.0-cp313-cp313t-musllinux_1_2_aarch64.whl", hash = "sha256:8d8ca2b210ada074d57fcee40c30446c9562e542fc46aedc19baf758a93532ee", size = 6490915, upload-time = "2025-10-15T18:23:00.582Z" },+ { url = "https://files.pythonhosted.org/packages/ef/26/69dcb9b91f4e59f8f34b2332a4a0a951b44f547c4ed39d3e4dcfcff48f89/pillow-12.0.0-cp313-cp313t-musllinux_1_2_x86_64.whl", hash = "sha256:99a7f72fb6249302aa62245680754862a44179b545ded638cf1fef59befb57ef", size = 7157998, upload-time = "2025-10-15T18:23:02.627Z" },+ { url = "https://files.pythonhosted.org/packages/61/2b/726235842220ca95fa441ddf55dd2382b52ab5b8d9c0596fe6b3f23dafe8/pillow-12.0.0-cp313-cp313t-win32.whl", hash = "sha256:4078242472387600b2ce8d93ade8899c12bf33fa89e55ec89fe126e9d6d5d9e9", size = 6306201, upload-time = "2025-10-15T18:23:04.709Z" },+ { url = "https://files.pythonhosted.org/packages/c0/3d/2afaf4e840b2df71344ababf2f8edd75a705ce500e5dc1e7227808312ae1/pillow-12.0.0-cp313-cp313t-win_amd64.whl", hash = "sha256:2c54c1a783d6d60595d3514f0efe9b37c8808746a66920315bfd34a938d7994b", size = 7013165, upload-time = "2025-10-15T18:23:06.46Z" },+ { url = "https://files.pythonhosted.org/packages/6f/75/3fa09aa5cf6ed04bee3fa575798ddf1ce0bace8edb47249c798077a81f7f/pillow-12.0.0-cp313-cp313t-win_arm64.whl", hash = "sha256:26d9f7d2b604cd23aba3e9faf795787456ac25634d82cd060556998e39c6fa47", size = 2437834, upload-time = "2025-10-15T18:23:08.194Z" },+]+[[package]]name = "platformdirs"version = "4.5.0"@@ -2356,6 +2808,39 @@ wheels = [{ url = "https://files.pythonhosted.org/packages/5d/c4/b2d28e9d2edf4f1713eb3c29307f1a63f3d67cf09bdda29715a36a68921a/pre_commit-4.5.0-py2.py3-none-any.whl", hash = "sha256:25e2ce09595174d9c97860a95609f9f852c0614ba602de3561e267547f2335e1", size = 226429, upload-time = "2025-11-22T21:02:40.836Z" },]+[[package]]+name = "progressive-disclosure"+version = "0.1.0"+source = { editable = "atomic-examples/progressive-disclosure" }+dependencies = [+ { name = "atomic-agents" },+ { name = "fastmcp" },+ { name = "instructor" },+ { name = "mcp", extra = ["cli"] },+ { name = "openai" },+ { name = "pd-data-server" },+ { name = "pd-math-server" },+ { name = "pd-text-server" },+ { name = "pydantic" },+ { name = "python-dotenv" },+ { name = "rich" },+]++[package.metadata]+requires-dist = [+ { name = "atomic-agents", editable = "." },+ { name = "fastmcp", specifier = ">=2.0.0" },+ { name = "instructor", specifier = "==1.13.0" },+ { name = "mcp", extras = ["cli"], specifier = ">=1.9.4" },+ { name = "openai", specifier = ">=2.0.0,<3.0.0" },+ { name = "pd-data-server", directory = "atomic-examples/progressive-disclosure/servers/data_server" },+ { name = "pd-math-server", directory = "atomic-examples/progressive-disclosure/servers/math_server" },+ { name = "pd-text-server", directory = "atomic-examples/progressive-disclosure/servers/text_server" },+ { name = "pydantic", specifier = ">=2.10.3,<3.0.0" },+ { name = "python-dotenv", specifier = ">=1.0.1,<2.0.0" },+ { name = "rich", specifier = ">=13.0.0" },+]+[[package]]name = "propcache"version = "0.4.1"@@ -2459,6 +2944,41 @@ wheels = [{ url = "https://files.pythonhosted.org/packages/d7/d4/6fdfac6506f18d4295e54065ae08860af421e715bda02f2db5807b6e06a5/pulsar_client-3.8.0-cp313-cp313-win_amd64.whl", hash = "sha256:be47834d614802eb14f6e94b6419c6e5974c7fc6c48c83f584fb0ee6a906c5f6", size = 3673818, upload-time = "2025-07-19T06:09:09.123Z" },]+[[package]]+name = "py-key-value-aio"+version = "0.3.0"+source = { registry = "https://pypi.org/simple" }+dependencies = [+ { name = "beartype" },+ { name = "py-key-value-shared" },+]+sdist = { url = "https://files.pythonhosted.org/packages/93/ce/3136b771dddf5ac905cc193b461eb67967cf3979688c6696e1f2cdcde7ea/py_key_value_aio-0.3.0.tar.gz", hash = "sha256:858e852fcf6d696d231266da66042d3355a7f9871650415feef9fca7a6cd4155", size = 50801, upload-time = "2025-11-17T16:50:04.711Z" }+wheels = [+ { url = "https://files.pythonhosted.org/packages/99/10/72f6f213b8f0bce36eff21fda0a13271834e9eeff7f9609b01afdc253c79/py_key_value_aio-0.3.0-py3-none-any.whl", hash = "sha256:1c781915766078bfd608daa769fefb97e65d1d73746a3dfb640460e322071b64", size = 96342, upload-time = "2025-11-17T16:50:03.801Z" },+]++[package.optional-dependencies]+disk = [+ { name = "diskcache" },+ { name = "pathvalidate" },+]+memory = [+ { name = "cachetools" },+]++[[package]]+name = "py-key-value-shared"+version = "0.3.0"+source = { registry = "https://pypi.org/simple" }+dependencies = [+ { name = "beartype" },+ { name = "typing-extensions" },+]+sdist = { url = "https://files.pythonhosted.org/packages/7b/e4/1971dfc4620a3a15b4579fe99e024f5edd6e0967a71154771a059daff4db/py_key_value_shared-0.3.0.tar.gz", hash = "sha256:8fdd786cf96c3e900102945f92aa1473138ebe960ef49da1c833790160c28a4b", size = 11666, upload-time = "2025-11-17T16:50:06.849Z" }+wheels = [+ { url = "https://files.pythonhosted.org/packages/51/e4/b8b0a03ece72f47dce2307d36e1c34725b7223d209fc679315ffe6a4e2c3/py_key_value_shared-0.3.0-py3-none-any.whl", hash = "sha256:5b0efba7ebca08bb158b1e93afc2f07d30b8f40c2fc12ce24a4c0d84f42f9298", size = 19560, upload-time = "2025-11-17T16:50:05.954Z" },+]+[[package]]name = "pyasn1"version = "0.6.1"@@ -2583,6 +3103,11 @@ wheels = [{ url = "https://files.pythonhosted.org/packages/82/2f/e68750da9b04856e2a7ec56fc6f034a5a79775e9b9a81882252789873798/pydantic-2.12.4-py3-none-any.whl", hash = "sha256:92d3d202a745d46f9be6df459ac5a064fdaa3c1c4cd8adcfa332ccf3c05f871e", size = 463400, upload-time = "2025-11-05T10:50:06.732Z" },]+[package.optional-dependencies]+email = [+ { name = "email-validator" },+]+[[package]]name = "pydantic-core"version = "2.41.5"@@ -2690,6 +3215,15 @@ wheels = [{ url = "https://files.pythonhosted.org/packages/10/5e/1aa9a93198c6b64513c9d7752de7422c06402de6600a8767da1524f9570b/pyparsing-3.2.5-py3-none-any.whl", hash = "sha256:e38a4f02064cf41fe6593d328d0512495ad1f3d8a91c4f73fc401b3079a59a5e", size = 113890, upload-time = "2025-09-21T04:11:04.117Z" },]+[[package]]+name = "pyperclip"+version = "1.11.0"+source = { registry = "https://pypi.org/simple" }+sdist = { url = "https://files.pythonhosted.org/packages/e8/52/d87eba7cb129b81563019d1679026e7a112ef76855d6159d24754dbd2a51/pyperclip-1.11.0.tar.gz", hash = "sha256:244035963e4428530d9e3a6101a1ef97209c6825edab1567beac148ccc1db1b6", size = 12185, upload-time = "2025-09-26T14:40:37.245Z" }+wheels = [+ { url = "https://files.pythonhosted.org/packages/df/80/fc9d01d5ed37ba4c42ca2b55b4339ae6e200b456be3a1aaddf4a9fa99b8c/pyperclip-1.11.0-py3-none-any.whl", hash = "sha256:299403e9ff44581cb9ba2ffeed69c7aa96a008622ad0c46cb575ca75b5b84273", size = 11063, upload-time = "2025-09-26T14:40:36.069Z" },+]+[[package]]name = "pypika"version = "0.48.9"@@ -2923,16 +3457,16 @@ wheels = [[[package]]name = "referencing"-version = "0.37.0"+version = "0.36.2"source = { registry = "https://pypi.org/simple" }dependencies = [{ name = "attrs" },{ name = "rpds-py" },{ name = "typing-extensions", marker = "python_full_version < '3.13'" },]-sdist = { url = "https://files.pythonhosted.org/packages/22/f5/df4e9027acead3ecc63e50fe1e36aca1523e1719559c499951bb4b53188f/referencing-0.37.0.tar.gz", hash = "sha256:44aefc3142c5b842538163acb373e24cce6632bd54bdb01b21ad5863489f50d8", size = 78036, upload-time = "2025-10-13T15:30:48.871Z" }+sdist = { url = "https://files.pythonhosted.org/packages/2f/db/98b5c277be99dd18bfd91dd04e1b759cad18d1a338188c936e92f921c7e2/referencing-0.36.2.tar.gz", hash = "sha256:df2e89862cd09deabbdba16944cc3f10feb6b3e6f18e902f7cc25609a34775aa", size = 74744, upload-time = "2025-01-25T08:48:16.138Z" }wheels = [- { url = "https://files.pythonhosted.org/packages/2c/58/ca301544e1fa93ed4f80d724bf5b194f6e4b945841c5bfd555878eea9fcb/referencing-0.37.0-py3-none-any.whl", hash = "sha256:381329a9f99628c9069361716891d34ad94af76e461dcb0335825aecc7692231", size = 26766, upload-time = "2025-10-13T15:30:47.625Z" },+ { url = "https://files.pythonhosted.org/packages/c1/b1/3baf80dc6d2b7bc27a95a67752d0208e410351e3feb4eb78de5f77454d8d/referencing-0.36.2-py3-none-any.whl", hash = "sha256:e8699adbbf8b5c7de96d8ffa0eb5c158b3beafce084968e2ea8bb08c6794dcd0", size = 26775, upload-time = "2025-01-25T08:48:14.241Z" },][[package]]@@ -3026,6 +3560,19 @@ wheels = [{ url = "https://files.pythonhosted.org/packages/19/71/39c7c0d87f8d4e6c020a393182060eaefeeae6c01dab6a84ec346f2567df/rich-13.9.4-py3-none-any.whl", hash = "sha256:6049d5e6ec054bf2779ab3358186963bac2ea89175919d699e378b99738c2a90", size = 242424, upload-time = "2024-11-01T16:43:55.817Z" },]+[[package]]+name = "rich-rst"+version = "1.3.2"+source = { registry = "https://pypi.org/simple" }+dependencies = [+ { name = "docutils" },+ { name = "rich" },+]+sdist = { url = "https://files.pythonhosted.org/packages/bc/6d/a506aaa4a9eaa945ed8ab2b7347859f53593864289853c5d6d62b77246e0/rich_rst-1.3.2.tar.gz", hash = "sha256:a1196fdddf1e364b02ec68a05e8ff8f6914fee10fbca2e6b6735f166bb0da8d4", size = 14936, upload-time = "2025-10-14T16:49:45.332Z" }+wheels = [+ { url = "https://files.pythonhosted.org/packages/13/2f/b4530fbf948867702d0a3f27de4a6aab1d156f406d72852ab902c4d04de9/rich_rst-1.3.2-py3-none-any.whl", hash = "sha256:a99b4907cbe118cf9d18b0b44de272efa61f15117c61e39ebdc431baf5df722a", size = 12567, upload-time = "2025-10-14T16:49:42.953Z" },+]+[[package]]name = "rpds-py"version = "0.29.0"@@ -3329,6 +3876,35 @@ wheels = [{ url = "https://files.pythonhosted.org/packages/52/a7/d2782e4e3f77c8450f727ba74a8f12756d5ba823d81b941f1b04da9d033a/sphinxcontrib_serializinghtml-2.0.0-py3-none-any.whl", hash = "sha256:6e2cb0eef194e10c27ec0023bfeb25badbbb5868244cf5bc5bdc04e4464bf331", size = 92072, upload-time = "2024-07-29T01:10:08.203Z" },]+[[package]]+name = "sqlalchemy"+version = "2.0.44"+source = { registry = "https://pypi.org/simple" }+dependencies = [+ { name = "greenlet", marker = "platform_machine == 'AMD64' or platform_machine == 'WIN32' or platform_machine == 'aarch64' or platform_machine == 'amd64' or platform_machine == 'ppc64le' or platform_machine == 'win32' or platform_machine == 'x86_64'" },+ { name = "typing-extensions" },+]+sdist = { url = "https://files.pythonhosted.org/packages/f0/f2/840d7b9496825333f532d2e3976b8eadbf52034178aac53630d09fe6e1ef/sqlalchemy-2.0.44.tar.gz", hash = "sha256:0ae7454e1ab1d780aee69fd2aae7d6b8670a581d8847f2d1e0f7ddfbf47e5a22", size = 9819830, upload-time = "2025-10-10T14:39:12.935Z" }+wheels = [+ { url = "https://files.pythonhosted.org/packages/62/c4/59c7c9b068e6813c898b771204aad36683c96318ed12d4233e1b18762164/sqlalchemy-2.0.44-cp312-cp312-macosx_10_13_x86_64.whl", hash = "sha256:72fea91746b5890f9e5e0997f16cbf3d53550580d76355ba2d998311b17b2250", size = 2139675, upload-time = "2025-10-10T16:03:31.064Z" },+ { url = "https://files.pythonhosted.org/packages/d6/ae/eeb0920537a6f9c5a3708e4a5fc55af25900216bdb4847ec29cfddf3bf3a/sqlalchemy-2.0.44-cp312-cp312-macosx_11_0_arm64.whl", hash = "sha256:585c0c852a891450edbb1eaca8648408a3cc125f18cf433941fa6babcc359e29", size = 2127726, upload-time = "2025-10-10T16:03:35.934Z" },+ { url = "https://files.pythonhosted.org/packages/d8/d5/2ebbabe0379418eda8041c06b0b551f213576bfe4c2f09d77c06c07c8cc5/sqlalchemy-2.0.44-cp312-cp312-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:9b94843a102efa9ac68a7a30cd46df3ff1ed9c658100d30a725d10d9c60a2f44", size = 3327603, upload-time = "2025-10-10T15:35:28.322Z" },+ { url = "https://files.pythonhosted.org/packages/45/e5/5aa65852dadc24b7d8ae75b7efb8d19303ed6ac93482e60c44a585930ea5/sqlalchemy-2.0.44-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:119dc41e7a7defcefc57189cfa0e61b1bf9c228211aba432b53fb71ef367fda1", size = 3337842, upload-time = "2025-10-10T15:43:45.431Z" },+ { url = "https://files.pythonhosted.org/packages/41/92/648f1afd3f20b71e880ca797a960f638d39d243e233a7082c93093c22378/sqlalchemy-2.0.44-cp312-cp312-musllinux_1_2_aarch64.whl", hash = "sha256:0765e318ee9179b3718c4fd7ba35c434f4dd20332fbc6857a5e8df17719c24d7", size = 3264558, upload-time = "2025-10-10T15:35:29.93Z" },+ { url = "https://files.pythonhosted.org/packages/40/cf/e27d7ee61a10f74b17740918e23cbc5bc62011b48282170dc4c66da8ec0f/sqlalchemy-2.0.44-cp312-cp312-musllinux_1_2_x86_64.whl", hash = "sha256:2e7b5b079055e02d06a4308d0481658e4f06bc7ef211567edc8f7d5dce52018d", size = 3301570, upload-time = "2025-10-10T15:43:48.407Z" },+ { url = "https://files.pythonhosted.org/packages/3b/3d/3116a9a7b63e780fb402799b6da227435be878b6846b192f076d2f838654/sqlalchemy-2.0.44-cp312-cp312-win32.whl", hash = "sha256:846541e58b9a81cce7dee8329f352c318de25aa2f2bbe1e31587eb1f057448b4", size = 2103447, upload-time = "2025-10-10T15:03:21.678Z" },+ { url = "https://files.pythonhosted.org/packages/25/83/24690e9dfc241e6ab062df82cc0df7f4231c79ba98b273fa496fb3dd78ed/sqlalchemy-2.0.44-cp312-cp312-win_amd64.whl", hash = "sha256:7cbcb47fd66ab294703e1644f78971f6f2f1126424d2b300678f419aa73c7b6e", size = 2130912, upload-time = "2025-10-10T15:03:24.656Z" },+ { url = "https://files.pythonhosted.org/packages/45/d3/c67077a2249fdb455246e6853166360054c331db4613cda3e31ab1cadbef/sqlalchemy-2.0.44-cp313-cp313-macosx_10_13_x86_64.whl", hash = "sha256:ff486e183d151e51b1d694c7aa1695747599bb00b9f5f604092b54b74c64a8e1", size = 2135479, upload-time = "2025-10-10T16:03:37.671Z" },+ { url = "https://files.pythonhosted.org/packages/2b/91/eabd0688330d6fd114f5f12c4f89b0d02929f525e6bf7ff80aa17ca802af/sqlalchemy-2.0.44-cp313-cp313-macosx_11_0_arm64.whl", hash = "sha256:0b1af8392eb27b372ddb783b317dea0f650241cea5bd29199b22235299ca2e45", size = 2123212, upload-time = "2025-10-10T16:03:41.755Z" },+ { url = "https://files.pythonhosted.org/packages/b0/bb/43e246cfe0e81c018076a16036d9b548c4cc649de241fa27d8d9ca6f85ab/sqlalchemy-2.0.44-cp313-cp313-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:2b61188657e3a2b9ac4e8f04d6cf8e51046e28175f79464c67f2fd35bceb0976", size = 3255353, upload-time = "2025-10-10T15:35:31.221Z" },+ { url = "https://files.pythonhosted.org/packages/b9/96/c6105ed9a880abe346b64d3b6ddef269ddfcab04f7f3d90a0bf3c5a88e82/sqlalchemy-2.0.44-cp313-cp313-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:b87e7b91a5d5973dda5f00cd61ef72ad75a1db73a386b62877d4875a8840959c", size = 3260222, upload-time = "2025-10-10T15:43:50.124Z" },+ { url = "https://files.pythonhosted.org/packages/44/16/1857e35a47155b5ad927272fee81ae49d398959cb749edca6eaa399b582f/sqlalchemy-2.0.44-cp313-cp313-musllinux_1_2_aarch64.whl", hash = "sha256:15f3326f7f0b2bfe406ee562e17f43f36e16167af99c4c0df61db668de20002d", size = 3189614, upload-time = "2025-10-10T15:35:32.578Z" },+ { url = "https://files.pythonhosted.org/packages/88/ee/4afb39a8ee4fc786e2d716c20ab87b5b1fb33d4ac4129a1aaa574ae8a585/sqlalchemy-2.0.44-cp313-cp313-musllinux_1_2_x86_64.whl", hash = "sha256:1e77faf6ff919aa8cd63f1c4e561cac1d9a454a191bb864d5dd5e545935e5a40", size = 3226248, upload-time = "2025-10-10T15:43:51.862Z" },+ { url = "https://files.pythonhosted.org/packages/32/d5/0e66097fc64fa266f29a7963296b40a80d6a997b7ac13806183700676f86/sqlalchemy-2.0.44-cp313-cp313-win32.whl", hash = "sha256:ee51625c2d51f8baadf2829fae817ad0b66b140573939dd69284d2ba3553ae73", size = 2101275, upload-time = "2025-10-10T15:03:26.096Z" },+ { url = "https://files.pythonhosted.org/packages/03/51/665617fe4f8c6450f42a6d8d69243f9420f5677395572c2fe9d21b493b7b/sqlalchemy-2.0.44-cp313-cp313-win_amd64.whl", hash = "sha256:c1c80faaee1a6c3428cecf40d16a2365bcf56c424c92c2b6f0f9ad204b899e9e", size = 2127901, upload-time = "2025-10-10T15:03:27.548Z" },+ { url = "https://files.pythonhosted.org/packages/9c/5e/6a29fa884d9fb7ddadf6b69490a9d45fded3b38541713010dad16b77d015/sqlalchemy-2.0.44-py3-none-any.whl", hash = "sha256:19de7ca1246fbef9f9d1bff8f1ab25641569df226364a0e40457dc5457c54b05", size = 1928718, upload-time = "2025-10-10T15:29:45.32Z" },+]+[[package]]name = "sse-starlette"version = "3.0.3"@@ -3428,6 +4004,39 @@ wheels = [{ url = "https://files.pythonhosted.org/packages/00/2f/f7c8a533bee50fbf5bb37ffc1621e7b2cdd8c9a6301fc51faa35fa50b09d/textual-5.3.0-py3-none-any.whl", hash = "sha256:02a6abc065514c4e21f94e79aaecea1f78a28a85d11d7bfc64abf3392d399890", size = 702671, upload-time = "2025-08-07T12:36:48.272Z" },]+[[package]]+name = "tiktoken"+version = "0.12.0"+source = { registry = "https://pypi.org/simple" }+dependencies = [+ { name = "regex" },+ { name = "requests" },+]+sdist = { url = "https://files.pythonhosted.org/packages/7d/ab/4d017d0f76ec3171d469d80fc03dfbb4e48a4bcaddaa831b31d526f05edc/tiktoken-0.12.0.tar.gz", hash = "sha256:b18ba7ee2b093863978fcb14f74b3707cdc8d4d4d3836853ce7ec60772139931", size = 37806, upload-time = "2025-10-06T20:22:45.419Z" }+wheels = [+ { url = "https://files.pythonhosted.org/packages/a4/85/be65d39d6b647c79800fd9d29241d081d4eeb06271f383bb87200d74cf76/tiktoken-0.12.0-cp312-cp312-macosx_10_13_x86_64.whl", hash = "sha256:b97f74aca0d78a1ff21b8cd9e9925714c15a9236d6ceacf5c7327c117e6e21e8", size = 1050728, upload-time = "2025-10-06T20:21:52.756Z" },+ { url = "https://files.pythonhosted.org/packages/4a/42/6573e9129bc55c9bf7300b3a35bef2c6b9117018acca0dc760ac2d93dffe/tiktoken-0.12.0-cp312-cp312-macosx_11_0_arm64.whl", hash = "sha256:2b90f5ad190a4bb7c3eb30c5fa32e1e182ca1ca79f05e49b448438c3e225a49b", size = 994049, upload-time = "2025-10-06T20:21:53.782Z" },+ { url = "https://files.pythonhosted.org/packages/66/c5/ed88504d2f4a5fd6856990b230b56d85a777feab84e6129af0822f5d0f70/tiktoken-0.12.0-cp312-cp312-manylinux_2_28_aarch64.whl", hash = "sha256:65b26c7a780e2139e73acc193e5c63ac754021f160df919add909c1492c0fb37", size = 1129008, upload-time = "2025-10-06T20:21:54.832Z" },+ { url = "https://files.pythonhosted.org/packages/f4/90/3dae6cc5436137ebd38944d396b5849e167896fc2073da643a49f372dc4f/tiktoken-0.12.0-cp312-cp312-manylinux_2_28_x86_64.whl", hash = "sha256:edde1ec917dfd21c1f2f8046b86348b0f54a2c0547f68149d8600859598769ad", size = 1152665, upload-time = "2025-10-06T20:21:56.129Z" },+ { url = "https://files.pythonhosted.org/packages/a3/fe/26df24ce53ffde419a42f5f53d755b995c9318908288c17ec3f3448313a3/tiktoken-0.12.0-cp312-cp312-musllinux_1_2_aarch64.whl", hash = "sha256:35a2f8ddd3824608b3d650a000c1ef71f730d0c56486845705a8248da00f9fe5", size = 1194230, upload-time = "2025-10-06T20:21:57.546Z" },+ { url = "https://files.pythonhosted.org/packages/20/cc/b064cae1a0e9fac84b0d2c46b89f4e57051a5f41324e385d10225a984c24/tiktoken-0.12.0-cp312-cp312-musllinux_1_2_x86_64.whl", hash = "sha256:83d16643edb7fa2c99eff2ab7733508aae1eebb03d5dfc46f5565862810f24e3", size = 1254688, upload-time = "2025-10-06T20:21:58.619Z" },+ { url = "https://files.pythonhosted.org/packages/81/10/b8523105c590c5b8349f2587e2fdfe51a69544bd5a76295fc20f2374f470/tiktoken-0.12.0-cp312-cp312-win_amd64.whl", hash = "sha256:ffc5288f34a8bc02e1ea7047b8d041104791d2ddbf42d1e5fa07822cbffe16bd", size = 878694, upload-time = "2025-10-06T20:21:59.876Z" },+ { url = "https://files.pythonhosted.org/packages/00/61/441588ee21e6b5cdf59d6870f86beb9789e532ee9718c251b391b70c68d6/tiktoken-0.12.0-cp313-cp313-macosx_10_13_x86_64.whl", hash = "sha256:775c2c55de2310cc1bc9a3ad8826761cbdc87770e586fd7b6da7d4589e13dab3", size = 1050802, upload-time = "2025-10-06T20:22:00.96Z" },+ { url = "https://files.pythonhosted.org/packages/1f/05/dcf94486d5c5c8d34496abe271ac76c5b785507c8eae71b3708f1ad9b45a/tiktoken-0.12.0-cp313-cp313-macosx_11_0_arm64.whl", hash = "sha256:a01b12f69052fbe4b080a2cfb867c4de12c704b56178edf1d1d7b273561db160", size = 993995, upload-time = "2025-10-06T20:22:02.788Z" },+ { url = "https://files.pythonhosted.org/packages/a0/70/5163fe5359b943f8db9946b62f19be2305de8c3d78a16f629d4165e2f40e/tiktoken-0.12.0-cp313-cp313-manylinux_2_28_aarch64.whl", hash = "sha256:01d99484dc93b129cd0964f9d34eee953f2737301f18b3c7257bf368d7615baa", size = 1128948, upload-time = "2025-10-06T20:22:03.814Z" },+ { url = "https://files.pythonhosted.org/packages/0c/da/c028aa0babf77315e1cef357d4d768800c5f8a6de04d0eac0f377cb619fa/tiktoken-0.12.0-cp313-cp313-manylinux_2_28_x86_64.whl", hash = "sha256:4a1a4fcd021f022bfc81904a911d3df0f6543b9e7627b51411da75ff2fe7a1be", size = 1151986, upload-time = "2025-10-06T20:22:05.173Z" },+ { url = "https://files.pythonhosted.org/packages/a0/5a/886b108b766aa53e295f7216b509be95eb7d60b166049ce2c58416b25f2a/tiktoken-0.12.0-cp313-cp313-musllinux_1_2_aarch64.whl", hash = "sha256:981a81e39812d57031efdc9ec59fa32b2a5a5524d20d4776574c4b4bd2e9014a", size = 1194222, upload-time = "2025-10-06T20:22:06.265Z" },+ { url = "https://files.pythonhosted.org/packages/f4/f8/4db272048397636ac7a078d22773dd2795b1becee7bc4922fe6207288d57/tiktoken-0.12.0-cp313-cp313-musllinux_1_2_x86_64.whl", hash = "sha256:9baf52f84a3f42eef3ff4e754a0db79a13a27921b457ca9832cf944c6be4f8f3", size = 1255097, upload-time = "2025-10-06T20:22:07.403Z" },+ { url = "https://files.pythonhosted.org/packages/8e/32/45d02e2e0ea2be3a9ed22afc47d93741247e75018aac967b713b2941f8ea/tiktoken-0.12.0-cp313-cp313-win_amd64.whl", hash = "sha256:b8a0cd0c789a61f31bf44851defbd609e8dd1e2c8589c614cc1060940ef1f697", size = 879117, upload-time = "2025-10-06T20:22:08.418Z" },+ { url = "https://files.pythonhosted.org/packages/ce/76/994fc868f88e016e6d05b0da5ac24582a14c47893f4474c3e9744283f1d5/tiktoken-0.12.0-cp313-cp313t-macosx_10_13_x86_64.whl", hash = "sha256:d5f89ea5680066b68bcb797ae85219c72916c922ef0fcdd3480c7d2315ffff16", size = 1050309, upload-time = "2025-10-06T20:22:10.939Z" },+ { url = "https://files.pythonhosted.org/packages/f6/b8/57ef1456504c43a849821920d582a738a461b76a047f352f18c0b26c6516/tiktoken-0.12.0-cp313-cp313t-macosx_11_0_arm64.whl", hash = "sha256:b4e7ed1c6a7a8a60a3230965bdedba8cc58f68926b835e519341413370e0399a", size = 993712, upload-time = "2025-10-06T20:22:12.115Z" },+ { url = "https://files.pythonhosted.org/packages/72/90/13da56f664286ffbae9dbcfadcc625439142675845baa62715e49b87b68b/tiktoken-0.12.0-cp313-cp313t-manylinux_2_28_aarch64.whl", hash = "sha256:fc530a28591a2d74bce821d10b418b26a094bf33839e69042a6e86ddb7a7fb27", size = 1128725, upload-time = "2025-10-06T20:22:13.541Z" },+ { url = "https://files.pythonhosted.org/packages/05/df/4f80030d44682235bdaecd7346c90f67ae87ec8f3df4a3442cb53834f7e4/tiktoken-0.12.0-cp313-cp313t-manylinux_2_28_x86_64.whl", hash = "sha256:06a9f4f49884139013b138920a4c393aa6556b2f8f536345f11819389c703ebb", size = 1151875, upload-time = "2025-10-06T20:22:14.559Z" },+ { url = "https://files.pythonhosted.org/packages/22/1f/ae535223a8c4ef4c0c1192e3f9b82da660be9eb66b9279e95c99288e9dab/tiktoken-0.12.0-cp313-cp313t-musllinux_1_2_aarch64.whl", hash = "sha256:04f0e6a985d95913cabc96a741c5ffec525a2c72e9df086ff17ebe35985c800e", size = 1194451, upload-time = "2025-10-06T20:22:15.545Z" },+ { url = "https://files.pythonhosted.org/packages/78/a7/f8ead382fce0243cb625c4f266e66c27f65ae65ee9e77f59ea1653b6d730/tiktoken-0.12.0-cp313-cp313t-musllinux_1_2_x86_64.whl", hash = "sha256:0ee8f9ae00c41770b5f9b0bb1235474768884ae157de3beb5439ca0fd70f3e25", size = 1253794, upload-time = "2025-10-06T20:22:16.624Z" },+ { url = "https://files.pythonhosted.org/packages/93/e0/6cc82a562bc6365785a3ff0af27a2a092d57c47d7a81d9e2295d8c36f011/tiktoken-0.12.0-cp313-cp313t-win_amd64.whl", hash = "sha256:dc2dd125a62cb2b3d858484d6c614d136b5b848976794edfb63688d539b8b93f", size = 878777, upload-time = "2025-10-06T20:22:18.036Z" },+]+[[package]]name = "tld"version = "0.13.1"@@ -3827,6 +4436,59 @@ version = "3.2"source = { registry = "https://pypi.org/simple" }sdist = { url = "https://files.pythonhosted.org/packages/47/6a/62e288da7bcda82b935ff0c6cfe542970f04e29c756b0e147251b2fb251f/wget-3.2.zip", hash = "sha256:35e630eca2aa50ce998b9b1a127bb26b30dfee573702782aa982f875e3f16061", size = 10857, upload-time = "2015-10-22T15:26:37.51Z" }+[[package]]+name = "xxhash"+version = "3.6.0"+source = { registry = "https://pypi.org/simple" }+sdist = { url = "https://files.pythonhosted.org/packages/02/84/30869e01909fb37a6cc7e18688ee8bf1e42d57e7e0777636bd47524c43c7/xxhash-3.6.0.tar.gz", hash = "sha256:f0162a78b13a0d7617b2845b90c763339d1f1d82bb04a4b07f4ab535cc5e05d6", size = 85160, upload-time = "2025-10-02T14:37:08.097Z" }+wheels = [+ { url = "https://files.pythonhosted.org/packages/9a/07/d9412f3d7d462347e4511181dea65e47e0d0e16e26fbee2ea86a2aefb657/xxhash-3.6.0-cp312-cp312-macosx_10_13_x86_64.whl", hash = "sha256:01362c4331775398e7bb34e3ab403bc9ee9f7c497bc7dee6272114055277dd3c", size = 32744, upload-time = "2025-10-02T14:34:34.622Z" },+ { url = "https://files.pythonhosted.org/packages/79/35/0429ee11d035fc33abe32dca1b2b69e8c18d236547b9a9b72c1929189b9a/xxhash-3.6.0-cp312-cp312-macosx_11_0_arm64.whl", hash = "sha256:b7b2df81a23f8cb99656378e72501b2cb41b1827c0f5a86f87d6b06b69f9f204", size = 30816, upload-time = "2025-10-02T14:34:36.043Z" },+ { url = "https://files.pythonhosted.org/packages/b7/f2/57eb99aa0f7d98624c0932c5b9a170e1806406cdbcdb510546634a1359e0/xxhash-3.6.0-cp312-cp312-manylinux1_i686.manylinux_2_28_i686.manylinux_2_5_i686.whl", hash = "sha256:dc94790144e66b14f67b10ac8ed75b39ca47536bf8800eb7c24b50271ea0c490", size = 194035, upload-time = "2025-10-02T14:34:37.354Z" },+ { url = "https://files.pythonhosted.org/packages/4c/ed/6224ba353690d73af7a3f1c7cdb1fc1b002e38f783cb991ae338e1eb3d79/xxhash-3.6.0-cp312-cp312-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:93f107c673bccf0d592cdba077dedaf52fe7f42dcd7676eba1f6d6f0c3efffd2", size = 212914, upload-time = "2025-10-02T14:34:38.6Z" },+ { url = "https://files.pythonhosted.org/packages/38/86/fb6b6130d8dd6b8942cc17ab4d90e223653a89aa32ad2776f8af7064ed13/xxhash-3.6.0-cp312-cp312-manylinux2014_ppc64le.manylinux_2_17_ppc64le.manylinux_2_28_ppc64le.whl", hash = "sha256:2aa5ee3444c25b69813663c9f8067dcfaa2e126dc55e8dddf40f4d1c25d7effa", size = 212163, upload-time = "2025-10-02T14:34:39.872Z" },+ { url = "https://files.pythonhosted.org/packages/ee/dc/e84875682b0593e884ad73b2d40767b5790d417bde603cceb6878901d647/xxhash-3.6.0-cp312-cp312-manylinux2014_s390x.manylinux_2_17_s390x.manylinux_2_28_s390x.whl", hash = "sha256:f7f99123f0e1194fa59cc69ad46dbae2e07becec5df50a0509a808f90a0f03f0", size = 445411, upload-time = "2025-10-02T14:34:41.569Z" },+ { url = "https://files.pythonhosted.org/packages/11/4f/426f91b96701ec2f37bb2b8cec664eff4f658a11f3fa9d94f0a887ea6d2b/xxhash-3.6.0-cp312-cp312-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:49e03e6fe2cac4a1bc64952dd250cf0dbc5ef4ebb7b8d96bce82e2de163c82a2", size = 193883, upload-time = "2025-10-02T14:34:43.249Z" },+ { url = "https://files.pythonhosted.org/packages/53/5a/ddbb83eee8e28b778eacfc5a85c969673e4023cdeedcfcef61f36731610b/xxhash-3.6.0-cp312-cp312-musllinux_1_2_aarch64.whl", hash = "sha256:bd17fede52a17a4f9a7bc4472a5867cb0b160deeb431795c0e4abe158bc784e9", size = 210392, upload-time = "2025-10-02T14:34:45.042Z" },+ { url = "https://files.pythonhosted.org/packages/1e/c2/ff69efd07c8c074ccdf0a4f36fcdd3d27363665bcdf4ba399abebe643465/xxhash-3.6.0-cp312-cp312-musllinux_1_2_i686.whl", hash = "sha256:6fb5f5476bef678f69db04f2bd1efbed3030d2aba305b0fc1773645f187d6a4e", size = 197898, upload-time = "2025-10-02T14:34:46.302Z" },+ { url = "https://files.pythonhosted.org/packages/58/ca/faa05ac19b3b622c7c9317ac3e23954187516298a091eb02c976d0d3dd45/xxhash-3.6.0-cp312-cp312-musllinux_1_2_ppc64le.whl", hash = "sha256:843b52f6d88071f87eba1631b684fcb4b2068cd2180a0224122fe4ef011a9374", size = 210655, upload-time = "2025-10-02T14:34:47.571Z" },+ { url = "https://files.pythonhosted.org/packages/d4/7a/06aa7482345480cc0cb597f5c875b11a82c3953f534394f620b0be2f700c/xxhash-3.6.0-cp312-cp312-musllinux_1_2_s390x.whl", hash = "sha256:7d14a6cfaf03b1b6f5f9790f76880601ccc7896aff7ab9cd8978a939c1eb7e0d", size = 414001, upload-time = "2025-10-02T14:34:49.273Z" },+ { url = "https://files.pythonhosted.org/packages/23/07/63ffb386cd47029aa2916b3d2f454e6cc5b9f5c5ada3790377d5430084e7/xxhash-3.6.0-cp312-cp312-musllinux_1_2_x86_64.whl", hash = "sha256:418daf3db71e1413cfe211c2f9a528456936645c17f46b5204705581a45390ae", size = 191431, upload-time = "2025-10-02T14:34:50.798Z" },+ { url = "https://files.pythonhosted.org/packages/0f/93/14fde614cadb4ddf5e7cebf8918b7e8fac5ae7861c1875964f17e678205c/xxhash-3.6.0-cp312-cp312-win32.whl", hash = "sha256:50fc255f39428a27299c20e280d6193d8b63b8ef8028995323bf834a026b4fbb", size = 30617, upload-time = "2025-10-02T14:34:51.954Z" },+ { url = "https://files.pythonhosted.org/packages/13/5d/0d125536cbe7565a83d06e43783389ecae0c0f2ed037b48ede185de477c0/xxhash-3.6.0-cp312-cp312-win_amd64.whl", hash = "sha256:c0f2ab8c715630565ab8991b536ecded9416d615538be8ecddce43ccf26cbc7c", size = 31534, upload-time = "2025-10-02T14:34:53.276Z" },+ { url = "https://files.pythonhosted.org/packages/54/85/6ec269b0952ec7e36ba019125982cf11d91256a778c7c3f98a4c5043d283/xxhash-3.6.0-cp312-cp312-win_arm64.whl", hash = "sha256:eae5c13f3bc455a3bbb68bdc513912dc7356de7e2280363ea235f71f54064829", size = 27876, upload-time = "2025-10-02T14:34:54.371Z" },+ { url = "https://files.pythonhosted.org/packages/33/76/35d05267ac82f53ae9b0e554da7c5e281ee61f3cad44c743f0fcd354f211/xxhash-3.6.0-cp313-cp313-macosx_10_13_x86_64.whl", hash = "sha256:599e64ba7f67472481ceb6ee80fa3bd828fd61ba59fb11475572cc5ee52b89ec", size = 32738, upload-time = "2025-10-02T14:34:55.839Z" },+ { url = "https://files.pythonhosted.org/packages/31/a8/3fbce1cd96534a95e35d5120637bf29b0d7f5d8fa2f6374e31b4156dd419/xxhash-3.6.0-cp313-cp313-macosx_11_0_arm64.whl", hash = "sha256:7d8b8aaa30fca4f16f0c84a5c8d7ddee0e25250ec2796c973775373257dde8f1", size = 30821, upload-time = "2025-10-02T14:34:57.219Z" },+ { url = "https://files.pythonhosted.org/packages/0c/ea/d387530ca7ecfa183cb358027f1833297c6ac6098223fd14f9782cd0015c/xxhash-3.6.0-cp313-cp313-manylinux1_i686.manylinux_2_28_i686.manylinux_2_5_i686.whl", hash = "sha256:d597acf8506d6e7101a4a44a5e428977a51c0fadbbfd3c39650cca9253f6e5a6", size = 194127, upload-time = "2025-10-02T14:34:59.21Z" },+ { url = "https://files.pythonhosted.org/packages/ba/0c/71435dcb99874b09a43b8d7c54071e600a7481e42b3e3ce1eb5226a5711a/xxhash-3.6.0-cp313-cp313-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:858dc935963a33bc33490128edc1c12b0c14d9c7ebaa4e387a7869ecc4f3e263", size = 212975, upload-time = "2025-10-02T14:35:00.816Z" },+ { url = "https://files.pythonhosted.org/packages/84/7a/c2b3d071e4bb4a90b7057228a99b10d51744878f4a8a6dd643c8bd897620/xxhash-3.6.0-cp313-cp313-manylinux2014_ppc64le.manylinux_2_17_ppc64le.manylinux_2_28_ppc64le.whl", hash = "sha256:ba284920194615cb8edf73bf52236ce2e1664ccd4a38fdb543506413529cc546", size = 212241, upload-time = "2025-10-02T14:35:02.207Z" },+ { url = "https://files.pythonhosted.org/packages/81/5f/640b6eac0128e215f177df99eadcd0f1b7c42c274ab6a394a05059694c5a/xxhash-3.6.0-cp313-cp313-manylinux2014_s390x.manylinux_2_17_s390x.manylinux_2_28_s390x.whl", hash = "sha256:4b54219177f6c6674d5378bd862c6aedf64725f70dd29c472eaae154df1a2e89", size = 445471, upload-time = "2025-10-02T14:35:03.61Z" },+ { url = "https://files.pythonhosted.org/packages/5e/1e/3c3d3ef071b051cc3abbe3721ffb8365033a172613c04af2da89d5548a87/xxhash-3.6.0-cp313-cp313-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:42c36dd7dbad2f5238950c377fcbf6811b1cdb1c444fab447960030cea60504d", size = 193936, upload-time = "2025-10-02T14:35:05.013Z" },+ { url = "https://files.pythonhosted.org/packages/2c/bd/4a5f68381939219abfe1c22a9e3a5854a4f6f6f3c4983a87d255f21f2e5d/xxhash-3.6.0-cp313-cp313-musllinux_1_2_aarch64.whl", hash = "sha256:f22927652cba98c44639ffdc7aaf35828dccf679b10b31c4ad72a5b530a18eb7", size = 210440, upload-time = "2025-10-02T14:35:06.239Z" },+ { url = "https://files.pythonhosted.org/packages/eb/37/b80fe3d5cfb9faff01a02121a0f4d565eb7237e9e5fc66e73017e74dcd36/xxhash-3.6.0-cp313-cp313-musllinux_1_2_i686.whl", hash = "sha256:b45fad44d9c5c119e9c6fbf2e1c656a46dc68e280275007bbfd3d572b21426db", size = 197990, upload-time = "2025-10-02T14:35:07.735Z" },+ { url = "https://files.pythonhosted.org/packages/d7/fd/2c0a00c97b9e18f72e1f240ad4e8f8a90fd9d408289ba9c7c495ed7dc05c/xxhash-3.6.0-cp313-cp313-musllinux_1_2_ppc64le.whl", hash = "sha256:6f2580ffab1a8b68ef2b901cde7e55fa8da5e4be0977c68f78fc80f3c143de42", size = 210689, upload-time = "2025-10-02T14:35:09.438Z" },+ { url = "https://files.pythonhosted.org/packages/93/86/5dd8076a926b9a95db3206aba20d89a7fc14dd5aac16e5c4de4b56033140/xxhash-3.6.0-cp313-cp313-musllinux_1_2_s390x.whl", hash = "sha256:40c391dd3cd041ebc3ffe6f2c862f402e306eb571422e0aa918d8070ba31da11", size = 414068, upload-time = "2025-10-02T14:35:11.162Z" },+ { url = "https://files.pythonhosted.org/packages/af/3c/0bb129170ee8f3650f08e993baee550a09593462a5cddd8e44d0011102b1/xxhash-3.6.0-cp313-cp313-musllinux_1_2_x86_64.whl", hash = "sha256:f205badabde7aafd1a31e8ca2a3e5a763107a71c397c4481d6a804eb5063d8bd", size = 191495, upload-time = "2025-10-02T14:35:12.971Z" },+ { url = "https://files.pythonhosted.org/packages/e9/3a/6797e0114c21d1725e2577508e24006fd7ff1d8c0c502d3b52e45c1771d8/xxhash-3.6.0-cp313-cp313-win32.whl", hash = "sha256:2577b276e060b73b73a53042ea5bd5203d3e6347ce0d09f98500f418a9fcf799", size = 30620, upload-time = "2025-10-02T14:35:14.129Z" },+ { url = "https://files.pythonhosted.org/packages/86/15/9bc32671e9a38b413a76d24722a2bf8784a132c043063a8f5152d390b0f9/xxhash-3.6.0-cp313-cp313-win_amd64.whl", hash = "sha256:757320d45d2fbcce8f30c42a6b2f47862967aea7bf458b9625b4bbe7ee390392", size = 31542, upload-time = "2025-10-02T14:35:15.21Z" },+ { url = "https://files.pythonhosted.org/packages/39/c5/cc01e4f6188656e56112d6a8e0dfe298a16934b8c47a247236549a3f7695/xxhash-3.6.0-cp313-cp313-win_arm64.whl", hash = "sha256:457b8f85dec5825eed7b69c11ae86834a018b8e3df5e77783c999663da2f96d6", size = 27880, upload-time = "2025-10-02T14:35:16.315Z" },+ { url = "https://files.pythonhosted.org/packages/f3/30/25e5321c8732759e930c555176d37e24ab84365482d257c3b16362235212/xxhash-3.6.0-cp313-cp313t-macosx_10_13_x86_64.whl", hash = "sha256:a42e633d75cdad6d625434e3468126c73f13f7584545a9cf34e883aa1710e702", size = 32956, upload-time = "2025-10-02T14:35:17.413Z" },+ { url = "https://files.pythonhosted.org/packages/9f/3c/0573299560d7d9f8ab1838f1efc021a280b5ae5ae2e849034ef3dee18810/xxhash-3.6.0-cp313-cp313t-macosx_11_0_arm64.whl", hash = "sha256:568a6d743219e717b07b4e03b0a828ce593833e498c3b64752e0f5df6bfe84db", size = 31072, upload-time = "2025-10-02T14:35:18.844Z" },+ { url = "https://files.pythonhosted.org/packages/7a/1c/52d83a06e417cd9d4137722693424885cc9878249beb3a7c829e74bf7ce9/xxhash-3.6.0-cp313-cp313t-manylinux1_i686.manylinux_2_28_i686.manylinux_2_5_i686.whl", hash = "sha256:bec91b562d8012dae276af8025a55811b875baace6af510412a5e58e3121bc54", size = 196409, upload-time = "2025-10-02T14:35:20.31Z" },+ { url = "https://files.pythonhosted.org/packages/e3/8e/c6d158d12a79bbd0b878f8355432075fc82759e356ab5a111463422a239b/xxhash-3.6.0-cp313-cp313t-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:78e7f2f4c521c30ad5e786fdd6bae89d47a32672a80195467b5de0480aa97b1f", size = 215736, upload-time = "2025-10-02T14:35:21.616Z" },+ { url = "https://files.pythonhosted.org/packages/bc/68/c4c80614716345d55071a396cf03d06e34b5f4917a467faf43083c995155/xxhash-3.6.0-cp313-cp313t-manylinux2014_ppc64le.manylinux_2_17_ppc64le.manylinux_2_28_ppc64le.whl", hash = "sha256:3ed0df1b11a79856df5ffcab572cbd6b9627034c1c748c5566fa79df9048a7c5", size = 214833, upload-time = "2025-10-02T14:35:23.32Z" },+ { url = "https://files.pythonhosted.org/packages/7e/e9/ae27c8ffec8b953efa84c7c4a6c6802c263d587b9fc0d6e7cea64e08c3af/xxhash-3.6.0-cp313-cp313t-manylinux2014_s390x.manylinux_2_17_s390x.manylinux_2_28_s390x.whl", hash = "sha256:0e4edbfc7d420925b0dd5e792478ed393d6e75ff8fc219a6546fb446b6a417b1", size = 448348, upload-time = "2025-10-02T14:35:25.111Z" },+ { url = "https://files.pythonhosted.org/packages/d7/6b/33e21afb1b5b3f46b74b6bd1913639066af218d704cc0941404ca717fc57/xxhash-3.6.0-cp313-cp313t-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:fba27a198363a7ef87f8c0f6b171ec36b674fe9053742c58dd7e3201c1ab30ee", size = 196070, upload-time = "2025-10-02T14:35:26.586Z" },+ { url = "https://files.pythonhosted.org/packages/96/b6/fcabd337bc5fa624e7203aa0fa7d0c49eed22f72e93229431752bddc83d9/xxhash-3.6.0-cp313-cp313t-musllinux_1_2_aarch64.whl", hash = "sha256:794fe9145fe60191c6532fa95063765529770edcdd67b3d537793e8004cabbfd", size = 212907, upload-time = "2025-10-02T14:35:28.087Z" },+ { url = "https://files.pythonhosted.org/packages/4b/d3/9ee6160e644d660fcf176c5825e61411c7f62648728f69c79ba237250143/xxhash-3.6.0-cp313-cp313t-musllinux_1_2_i686.whl", hash = "sha256:6105ef7e62b5ac73a837778efc331a591d8442f8ef5c7e102376506cb4ae2729", size = 200839, upload-time = "2025-10-02T14:35:29.857Z" },+ { url = "https://files.pythonhosted.org/packages/0d/98/e8de5baa5109394baf5118f5e72ab21a86387c4f89b0e77ef3e2f6b0327b/xxhash-3.6.0-cp313-cp313t-musllinux_1_2_ppc64le.whl", hash = "sha256:f01375c0e55395b814a679b3eea205db7919ac2af213f4a6682e01220e5fe292", size = 213304, upload-time = "2025-10-02T14:35:31.222Z" },+ { url = "https://files.pythonhosted.org/packages/7b/1d/71056535dec5c3177eeb53e38e3d367dd1d16e024e63b1cee208d572a033/xxhash-3.6.0-cp313-cp313t-musllinux_1_2_s390x.whl", hash = "sha256:d706dca2d24d834a4661619dcacf51a75c16d65985718d6a7d73c1eeeb903ddf", size = 416930, upload-time = "2025-10-02T14:35:32.517Z" },+ { url = "https://files.pythonhosted.org/packages/dc/6c/5cbde9de2cd967c322e651c65c543700b19e7ae3e0aae8ece3469bf9683d/xxhash-3.6.0-cp313-cp313t-musllinux_1_2_x86_64.whl", hash = "sha256:5f059d9faeacd49c0215d66f4056e1326c80503f51a1532ca336a385edadd033", size = 193787, upload-time = "2025-10-02T14:35:33.827Z" },+ { url = "https://files.pythonhosted.org/packages/19/fa/0172e350361d61febcea941b0cc541d6e6c8d65d153e85f850a7b256ff8a/xxhash-3.6.0-cp313-cp313t-win32.whl", hash = "sha256:1244460adc3a9be84731d72b8e80625788e5815b68da3da8b83f78115a40a7ec", size = 30916, upload-time = "2025-10-02T14:35:35.107Z" },+ { url = "https://files.pythonhosted.org/packages/ad/e6/e8cf858a2b19d6d45820f072eff1bea413910592ff17157cabc5f1227a16/xxhash-3.6.0-cp313-cp313t-win_amd64.whl", hash = "sha256:b1e420ef35c503869c4064f4a2f2b08ad6431ab7b229a05cce39d74268bca6b8", size = 31799, upload-time = "2025-10-02T14:35:36.165Z" },+ { url = "https://files.pythonhosted.org/packages/56/15/064b197e855bfb7b343210e82490ae672f8bc7cdf3ddb02e92f64304ee8a/xxhash-3.6.0-cp313-cp313t-win_arm64.whl", hash = "sha256:ec44b73a4220623235f67a996c862049f375df3b1052d9899f40a6382c32d746", size = 28044, upload-time = "2025-10-02T14:35:37.195Z" },+]+[[package]]name = "yarl"version = "1.22.0"