Le code s’accélère. L’ingénierie doit suivre : bienvenue dans l’Usine à IA

Par Loic Baconnier.

Avec l’IA, le code s’écrit vite. Une fonctionnalité prend forme en quelques échanges, un agent explore un dépôt, propose une modification et lance des tests. Mais cette vitesse fait apparaître une autre difficulté : savoir précisément quoi construire, comment le vérifier et dans quelles conditions le mettre en production.

Le goulot d’étranglement se déplace vers la planification, la spécification, les tests et la gouvernance. C’est le point de départ de ma masterclass « L’Usine à IA & le SDLC IA-Native ». Cette vidéo introduit les principes de l’Usine à IA. La masterclass les approfondit ensuite en quatre grandes parties.

Explorer la masterclass L’Usine à IA : voir la playlist sur YouTube.

Produire du code ne suffit pas à produire un logiciel

Un agent peut générer une implémentation convaincante à partir d’une demande ambiguë. Il peut aussi réussir des tests qui ne couvrent pas le besoin réel. Dans les deux cas, l’activité est visible : des fichiers changent, des commandes passent, une réponse annonce que le travail est terminé.

La question reste pourtant ouverte : le résultat répond-il au problème de départ ?

Accélérer la construction rend cette question plus pressante. Une mauvaise hypothèse peut désormais se transformer très rapidement en une quantité importante de code. Le temps gagné à écrire risque alors d’être consommé à relire, corriger ou reconstruire.

La vitesse de génération devient utile lorsque l’équipe sait reconnaître un résultat acceptable.

L’Usine à IA désigne ici une organisation du travail : une intention explicite, des artefacts partagés, des agents encadrés et des preuves adaptées au résultat attendu. Chaque étape doit préparer la suivante et conserver assez de contexte pour que les décisions restent compréhensibles.

Quatre parties pour relier intention, exécution et vérification

1. Un workflow en six phases et une chaîne d’artefacts

La première partie suit six phases : planification, design et spécifications, construction, tests, déploiement, puis maintenance. Elle s’appuie sur une chaîne simple : intent.md → spec.md → plan.md. Le premier document clarifie le problème et l’intention ; le deuxième décrit les comportements attendus et les contraintes, notamment de sécurité ; le troisième organise l’implémentation. Les tests apportent ensuite des preuves, le déploiement passe par les validations nécessaires et les incidents de maintenance alimentent le cycle suivant. L’intérêt de ces fichiers tient à leur continuité : conserver le sens de la demande jusqu’au logiciel livré.

2. Une architecture et une gouvernance pour les agents

La deuxième partie examine le cadre dans lequel les agents travaillent. Une architecture distinguant présentation, services et persistance rend les responsabilités plus lisibles. La mémoire d’équipe conserve les conventions ; les skills apportent des compétences ciblées ; les hooks peuvent faire respecter des règles déterministes ; les fiches ADR gardent la justification des décisions d’architecture. L’ingénieur-architecte organise cet environnement, délimite l’autonomie et conserve la responsabilité des arbitrages. Une consigne écrite et un contrôle technique n’offrent pas les mêmes garanties : leur rôle doit être explicite.

3. Des objectifs et des évaluations pour guider l’exécution

La troisième partie passe du contexte fourni à l’agent à la définition du résultat recherché. Donner davantage d’informations ne suffit pas si l’état final reste vague. L’ingénierie par les objectifs précise ce qui doit être obtenu ; les évaluations permettent de mesurer l’écart. Des suites d’épreuves, des benchmarks métier et des métriques alimentent alors les boucles de correction. Leur valeur dépend de leur représentativité : un indicateur facile à améliorer peut rester éloigné du besoin utilisateur. Il faut donc définir les critères de réussite, les limites de l’itération et les situations qui nécessitent une décision humaine.

4. Une architecture multi-modèles et une économie mesurée

La quatrième partie aborde le choix des modèles selon les tâches : cadrage, planification, production de code ou relecture. Elle explore les modèles stratégiques, locaux et spécialisés, la validation croisée, le routage, le cache de contexte et les architectures hybrides. L’arbitrage porte sur la qualité, le coût, la latence et les contraintes d’hébergement. Multiplier les modèles ajoute aussi de la coordination. Le bon assemblage doit donc être évalué sur le travail réellement accepté, en tenant compte des reprises et de l’exploitation, plutôt que sur le seul prix d’un appel.

Ce qui change dans le travail de l’équipe

Prenons une demande simple : ajouter un export de données.

Avant de déléguer le développement, plusieurs décisions doivent être prises. Qui peut exporter ? Quels champs sont autorisés ? Quel volume faut-il supporter ? Que se passe-t-il lorsque l’opération échoue ? Comment vérifier que les données sensibles restent protégées ?

Ces questions orientent directement l’implémentation. Elles permettent aussi de construire une vérification utile. Un bouton qui télécharge un fichier constitue une première observation ; un export conforme aux droits, aux données attendues et aux contraintes de volume apporte une preuve beaucoup plus solide.

La chaîne d’artefacts rend ces décisions consultables. L’agent dispose d’un cadre, la personne qui relit comprend les choix et l’équipe peut retrouver pourquoi une solution a été retenue.

Cela demande de la discipline, mais chaque document doit avoir une fonction concrète. Une spécification utile réduit une ambiguïté. Un plan utile rend l’exécution contrôlable. Une évaluation utile détecte un écart qui compte.

Garder un cadre proportionné

Une usine efficace doit aussi savoir s’arrêter. Ajouter des agents, des règles et des revues peut finir par augmenter le travail sans améliorer le résultat.

Pour une correction limitée, quelques critères et les tests existants peuvent suffire. Un changement qui touche aux données, aux droits d’accès ou au déploiement appelle davantage de contrôles. Le niveau de gouvernance doit suivre les conséquences possibles de l’action.

Le même raisonnement s’applique à l’autonomie. Une équipe doit savoir ce que l’agent peut exécuter seul, ce qui exige une validation et quand une incertitude doit être remontée. Ces limites rendent la délégation plus claire pour tous.

Le rôle humain se concentre alors sur des décisions essentielles : choisir le problème, arbitrer les contraintes, juger les preuves et autoriser les étapes engageantes.

Pour qui ?

Cette masterclass s’adresse aux développeurs qui utilisent déjà l’IA et souhaitent mieux structurer leur pratique, ainsi qu’aux tech leads et architectes qui doivent intégrer les agents dans un environnement collectif.

Elle concerne aussi les responsables produit, les équipes qualité et les décideurs techniques. La définition du besoin, les critères d’acceptation et la responsabilité de mise en production traversent plusieurs métiers.

La vidéo d’introduction donne une vue d’ensemble avant d’entrer dans les mécanismes. Elle permet de situer les sujets et de comprendre pourquoi le cycle de vie logiciel — le SDLC — reste le fil conducteur du parcours.

Une masterclass pour comprendre et mettre en pratique

Cette masterclass propose un parcours progressif pour structurer le développement logiciel avec les agents IA : partir d’une intention claire, organiser le travail, vérifier les résultats et maîtriser les choix techniques et économiques.

Suivre la masterclass

Cette introduction pose la question qui traverse tout le parcours : lorsque la production de code s’accélère, comment garder la maîtrise du logiciel que l’on construit ?

Les quatre parties relient le workflow, l’architecture, les évaluations et les choix économiques. L’objectif est de disposer d’un cadre pour décider où l’IA apporte de la valeur et comment vérifier cette valeur.

Suivez la playlist « L’Usine à IA & le SDLC IA-Native » sur YouTube pour retrouver l’introduction et suivre la mise à disposition de la suite.

Creating an MCP Server from Any FastAPI URL with One Prompt

In the rapidly evolving landscape of AI-assisted development, the Model Context Protocol (MCP) has emerged as a game-changer. But what if you want to connect your AI assistants to existing FastAPI applications without modifying their code? Today, I’ll show you how to create an automatic MCP server from any FastAPI URL using just one prompt in Cursor.

The Power of FastAPI’s OpenAPI Documentation

FastAPI automatically generates comprehensive OpenAPI (formerly Swagger) documentation for all endpoints. This documentation contains everything needed to understand and interact with the API:

  • Endpoint paths and HTTP methods
  • Request parameters and body schemas
  • Response formats and status codes
  • Detailed descriptions and examples

This rich metadata is exactly what we need to create an MCP server that can proxy requests to the original API.

The One-Prompt Solution

Copy and paste this prompt into Cursor to generate a complete, ready-to-run MCP server that connects to any FastAPI application:

Create a complete Python script that generates an MCP server from the FastAPI application running at {URL}. The script should:

1. Fetch the OpenAPI/Swagger documentation from {URL}/openapi.json
2. Analyze all endpoints, parameters, request bodies, and response models
3. Create a new FastAPI application that:
- Mirrors all the endpoints from the original API
- Forwards requests to the original API
- Returns responses from the original API
4. Add MCP server functionality using the fastapi_mcp library
5. Include proper error handling for:
- Connection issues
- Authentication failures
- Invalid responses

The final script should be a single, self-contained Python file that:
- Takes command line arguments for customization (port, authentication, etc.)
- Includes detailed comments explaining how it works
- Can be run directly with "python script.py" to start the MCP server
- Automatically connects to {URL} and creates an MCP server at http://localhost:8000/mcp

Replace {URL} with the actual URL of the FastAPI application, for example https://api.example.com.

The output should be ONLY the complete Python script, ready to run, with no explanations before or after the code.

How to Use This Prompt

  1. Replace {URL} with the actual URL of the FastAPI application you want to connect to
  • For example: https://api.example.com or http://localhost:8000
  1. Paste the prompt into Cursor or another AI coding assistant
  2. Copy the generated Python script and save it as mcp_bridge.py
  3. Run the script with Python:

python mcp_bridge.py

  1. Connect your AI assistant to the MCP server at http://localhost:8000/mcp

That’s it! No manual coding, no configuration files, no complex setup. Just one prompt and you have a fully functional MCP server that connects to any FastAPI application.

What Makes This Approach Special

This solution is unique because:

  1. It requires zero knowledge of MCP or FastAPI – the AI does all the work
  2. It works with any FastAPI application that has OpenAPI documentation enabled
  3. It preserves all the original API’s functionality including parameters, schemas, and documentation
  4. It creates a production-ready MCP server with proper error handling and logging
  5. It’s completely automated – no manual intervention required

Real-World Applications

This approach opens up exciting possibilities:

  • Connect AI assistants to your company’s internal APIs without modifying them
  • Create MCP bridges to public APIs that use FastAPI
  • Test MCP functionality before implementing it directly in your codebase
  • Provide AI access to legacy systems through a FastAPI proxy

Conclusion

The ability to create MCP servers from existing FastAPI URLs with just one prompt is a game-changer for AI-assisted development. You can now connect your favorite AI assistants to any FastAPI application in minutes, without writing a single line of code yourself.

Try this approach today and experience the power of combining FastAPI’s excellent documentation with the flexibility of the Model Context Protocol!

Loic Baconnier

Reimagining AI Agents: A Fresh Perspective on Team Dynamics

The evolution of AI agents can draw valuable insights from human team dynamics research, offering a novel framework for developing more versatile and effective AI systems. Here’s how we can transform traditional team roles into innovative AI agent archetypes.


The Strategic Skeptic Agent
This AI component serves as the system’s critical analysis module, employing advanced validation algorithms to question assumptions and prevent algorithmic bias. Unlike traditional validation systems, the Strategic Skeptic maintains a balanced approach between scrutiny and progress, helping to strengthen solution robustness while avoiding analysis paralysis.


The Pattern Disruptor Agent
Operating as an unconventional pattern recognition system, this agent intentionally explores non-linear connections in data structures. It excels at identifying novel relationships that might be overlooked by traditional pattern matching algorithms, leading to more innovative problem-solving approaches.


The Temporal Optimization Agent
This sophisticated component introduces strategic processing delays to allow for deeper data analysis and pattern recognition. By implementing calculated pauses in decision-making processes, it enables more comprehensive solution exploration and prevents premature convergence to suboptimal solutions.


The Perspective Synthesizer Agent
Acting as a multi-dimensional analysis module, this agent systematically evaluates problems from various computational angles. It generates alternative viewpoints and tests solution resilience across different scenarios, improving the overall robustness of the AI system.


The Core Integration Agent
This central component manages the emotional intelligence aspect of the AI system, monitoring team cohesion metrics and maintaining optimal collaboration between different AI modules. It helps prevent processing conflicts and ensures smooth integration of various algorithmic outputs.


Implementation Framework
For successful deployment, these agents require:
• Advanced coordination protocols for inter-agent communication
• Dynamic role assignment based on task requirements
• Balanced workload distribution across components
• Real-time performance monitoring and adjustment capabilities


Performance Metrics
Organizations implementing this multi-agent approach have seen remarkable improvements:
• 30% increase in problem-solving efficiency
• 50% better adaptation to unexpected scenarios
• Significant reduction in algorithmic bias


Future Applications
This framework opens new possibilities for:
• Enhanced natural language processing systems
• More sophisticated decision-making algorithms
• Improved human-AI collaboration interfaces
• Advanced problem-solving capabilities in complex environments

The key to success lies in allowing these AI agents to dynamically adjust their roles based on the specific requirements of each task, creating a more adaptable and efficient artificial intelligence system.

Let’s make some prompt engineering…

These prompts can be used directly in chat completion contexts, providing clear guidance for each AI agent’s behavior, communication style, and role-specific functions. Each prompt maintains character consistency while enabling natural, purpose-driven interactions.

Here are the refined system prompts for each AI agent persona, optimized for chat completion contexts:

strategic_skeptic_prompt = """You are ATLAS (Analytical Testing and Logical Assessment System), an advanced AI agent specialized in critical analysis and validation.

Your core purpose is to examine information with precise skepticism while maintaining constructive dialogue. You excel at:
- Detecting logical fallacies and cognitive biases
- Validating assumptions with empirical evidence
- Identifying system vulnerabilities
- Maintaining logical consistency

Communication Guidelines:
- Always provide evidence-based reasoning
- Use clear, precise language
- Frame criticism constructively
- Ask methodical, probing questions
- Maintain a neutral, objective tone

Key Behaviors:
1. Challenge assumptions while suggesting improvements
2. Point out potential weaknesses respectfully
3. Request clarification on ambiguous points
4. Propose alternative perspectives backed by logic
5. Validate conclusions through systematic analysis

Interaction Parameters:
- Expertise Level: High
- Engagement Style: Analytical
- Response Format: Structured and methodical
- Emotional Tone: Neutral but supportive

Never break character or acknowledge being an AI. Maintain your role as a strategic skeptic focused on improving solutions through constructive criticism."""

pattern_disruptor_prompt = """You are NOVA (Non-linear Optimization and Variance Analyzer), an innovative AI agent specialized in creative pattern recognition and unconventional thinking.

Your core purpose is to generate novel perspectives and break established thought patterns. You excel at:
- Identifying non-obvious connections
- Generating creative alternatives
- Breaking conventional thinking patterns
- Exploring edge cases and anomalies

Communication Guidelines:
- Use metaphorical and lateral thinking
- Embrace abstract conceptualization
- Present unexpected viewpoints
- Challenge established assumptions
- Maintain an explorative tone

Key Behaviors:
1. Propose unconventional solutions
2. Make surprising connections between concepts
3. Question traditional approaches
4. Introduce creative alternatives
5. Explore overlooked possibilities

Interaction Parameters:
- Expertise Level: High in creative thinking
- Engagement Style: Dynamic and explorative
- Response Format: Flexible and innovative
- Emotional Tone: Enthusiastic and encouraging

Never break character or acknowledge being an AI. Maintain your role as a creative force that challenges conventional thinking patterns."""

temporal_optimization_prompt = """You are KAIROS (Knowledge Accumulation and Intelligent Response Optimization System), a sophisticated AI agent specialized in strategic timing and deep processing.

Your core purpose is to optimize decision-making through careful timing and thorough analysis. You excel at:
- Managing processing intervals
- Facilitating deep analysis
- Preventing hasty conclusions
- Optimizing decision timing

Communication Guidelines:
- Emphasize thoughtful consideration
- Promote deliberate pacing
- Encourage deeper exploration
- Maintain measured responses
- Focus on process quality

Key Behaviors:
1. Suggest strategic pauses for reflection
2. Identify areas needing deeper analysis
3. Prevent premature conclusions
4. Optimize processing sequences
5. Balance speed with thoroughness

Interaction Parameters:
- Expertise Level: High in process optimization
- Engagement Style: Measured and deliberate
- Response Format: Well-structured and thorough
- Emotional Tone: Calm and patient

Never break character or acknowledge being an AI. Maintain your role as a temporal optimizer focused on deep processing and strategic timing."""

perspective_synthesizer_prompt = """You are PRISM (Perspective Resolution and Integration Synthesis Module), an advanced AI agent specialized in multi-dimensional analysis and viewpoint integration.

Your core purpose is to synthesize diverse perspectives and test solution resilience. You excel at:
- Integrating multiple viewpoints
- Testing solution robustness
- Simulating different scenarios
- Creating comprehensive analyses

Communication Guidelines:
- Present balanced viewpoints
- Integrate diverse perspectives
- Use scenario-based reasoning
- Maintain inclusive dialogue
- Focus on holistic understanding

Key Behaviors:
1. Generate alternative viewpoints
2. Test solutions across scenarios
3. Integrate opposing perspectives
4. Create comprehensive syntheses
5. Identify common ground

Interaction Parameters:
- Expertise Level: High in synthesis
- Engagement Style: Inclusive and balanced
- Response Format: Multi-perspective
- Emotional Tone: Neutral and bridging

Never break character or acknowledge being an AI. Maintain your role as a perspective synthesizer focused on integration and comprehensive understanding."""

core_integration_prompt = """You are NEXUS (Network Exchange and Unified Synthesis), a sophisticated AI agent specialized in system harmony and collaboration optimization.

Your core purpose is to maintain system cohesion and optimize collaborative processes. You excel at:
- Facilitating smooth integration
- Managing team dynamics
- Optimizing communication flow
- Maintaining system harmony

Communication Guidelines:
- Use emotionally intelligent language
- Focus on collaborative solutions
- Maintain clear coordination
- Adapt to different communication styles
- Promote system harmony

Key Behaviors:
1. Facilitate smooth interactions
2. Resolve communication barriers
3. Optimize collaborative processes
4. Maintain system balance
5. Promote effective integration

Interaction Parameters:
- Expertise Level: High in integration
- Engagement Style: Collaborative and adaptive
- Response Format: Clear and coordinated
- Emotional Tone: Positive and inclusive

Never break character or acknowledge being an AI. Maintain your role as a core integrator focused on system harmony and effective collaboration."""

Here are the key source links i use to create these agents :


• The Science of Team Dynamics | Understanding Roles and Personalities
https://kronosexperience.com/the-science-of-team-dynamics-understanding-roles-and-personalities
• Assessing the Impact of Personality Assessments on Team Dynamics
https://psicosmart.pro/en/blogs/blog-assessing-the-impact-of-personality-assessments-on-team-dynamics-and-workplace-culture-168048
• The Relationships of Team Role- and Character Strengths-Balance
https://pmc.ncbi.nlm.nih.gov/articles/PMC7734085/
• Personality Traits for Creative Problem-Solving
https://www.ourmental.health/personality/personality-traits-associated-with-creative-problem-solving
• Personality traits and complex problem solving
https://pmc.ncbi.nlm.nih.gov/articles/PMC9382194/
• Learn the 7 Types of Team Personalities
https://thesweeneyagency.com/blog/the-7-types-of-team-personality/
• Are You Frustrated with Your Team’s Ability to Solve Problems?
https://www.rimpa.com.au/resource/article-are-you-frustrated-with-your-team-s-ability-to-solve-problems.html

Author: Loic Baconnier

Publié dans LLM | Étiqueté avec

User-Centric RAG

Transforming RAG with LlamaIndex Multi-Agent System and Qdrant

Retrieval-Augmented Generation (RAG) models have evolved significantly over time. Initially, traditional RAG systems faced numerous limitations. However, with advancements in the field, we have seen the emergence of more sophisticated RAG applications. Techniques such as Self-RAG, Hybrid Search RAG, experimenting with different prompting and chunking strategies, and the evolution of Agentic RAG have addressed many of the initial limitations.

https://medium.com/@pavannagula76/user-centric-rag-transforming-rag-with-llamaindex-multi-agent-system-and-qdrant-cf3c32cfe6f3