Consider yourself a local architect or urban planner dealing with the all-too-common Barcelona problem: Its too hot here! and the courtyard outside feels like a desolate oven. Imagine now that your co-pilot is a pixel-art cat that is friendly, understands the climatic conditions and works with you to create a courtyard that is actually comfortable, green and vibrant.

Why Reimagine Courtyards with AI?

All too frequently urban courtyards fail to meet the requirements for climate comfort biodiversity and community—becoming dead spaces or heat traps due to slow design feedback a lack of user needs or a lack of adaptability. Typically traditional courtyard design is struggling with the following processes:

  • Combinatorial integration of environmental, programmetic and aesthetic
  • Real-time feedback is not possible
  • Rarely brings up non-designers in discussions

The solution: Create an AI-powered co-pilot that combines contextual information, user intent and AI design logic in a workflow that is interactive and feedback-rich.

From Prompt to Courtyard: How CAT Works

CAT’s workflow is a dialogue between climate, user and the CAT assistant powered by an LLM.

  1. CAT’s chat-based interface lets user express their design intentions. They could describe the amount of shade, locations and sizes for functions like ponds, play areas or separate areas for calming down and children.
  2. CAT interprets prompts, then generates a concept and evaluates intentions using an LLM (powered by GPT-4o). Parsed prompts are converted by the AI into precise spatial programs, adjacency rules and spatial attributes.
  3. CAT uses a graph-based approach to encode the design. Each courtyard function is represented by a node (trees, rest, play, pond, etc.). The system determines their location, size and relationship.
  4. On a real-time interactive graph users can drag and drop the graph’s nodes of CAT’s first proposal. Because of a close integration with Grasshopper/Rhino they can see changes immediately reflected in both plan and 3D geometry.
  5. CAT uses Neo4j to analyze the spatial graph and converts questions into Cypher so users can query their design. CAT draws on actual climate data, performs comfort simulations and makes recommendations for program allocation based on real climate analysis.

In need of some inspiration for the visual design and materialization? CAT can create AI-enhanced photos (using SDXL) to give a mood-enhancing sneak peek. When users are satisfied CAT compiles all of their design information, comments and images into a polished PDF that is prepared for clients, co-workers or further studies.

Behind the Scenes: Full-Stack Workflow

To generate our courtyard layouts, we developed a custom graph layout algorithm that goes beyond standard force-directed methods. In a typical force-directed layout, nodes attract or repel each other to reach a stable configuration. But as we need more control, we extended this approach by adding two key features: anchor nodes, which stay fixed in place, and grid attraction, which pulls certain nodes toward predefined spatial positions. This lets us maintain a balance between design logic and spatial realism.
We implemented this using NetworkX, and we export both the geometry and a structured JSON for downstream use, in order to have a spatially aware, grid-aligned, anchor-driven layout.

Graph based design approach

Once the layout stabilizes, we apply a function clustering process. These clusters reflect not just proximity but also programmatic intent. Each cluster is then used to define area boundaries. This gives the user a tangible, editable version of the courtyard, not just as a graph, but as spatial elements that can be refined directly in the design environment. With clustering, the graph moves from abstract structure to a real, spatially legible layout, bridging data logic and design practice.

We tested this parametric approach on a wide range of building forms and courtyard dimensions.
This flexibility means CAT isn’t just a design generator, but an iterative tool that supports multiple directions and versions.A full-stack computational pipeline at the core of CAT converts natural language input into a performance-driven data-rich courtyard layout. The procedure starts with a PyQt front-end that is based on chat and structures all user input and intent as prompts for a Large Language Model. The calls to the LLM modularize response parsing and system prompts. Spatial intents are retrieved, user requirements are categorized and architectural logic is converted into programmatic data including functional weights adjacency lists and spatial matrices.

User interface

Afterwards, a graph is used to depict structured data. Every courtyard programmatic function such as trees, rest, pond or play turns into a node. Node attributes carry environmental weight and area scores while edges encode necessary adjacencies or user-defined relationships. The graph is set up on a 3×3 grid using custom Python scripts and it is then relaxed using force-based or constraint-driven algorithms to maximize site utilization and adjacency. Every user prompt, LLM criticism or data change causes the graph to regenerate and the user interface to be updated in real time demonstrating the systems ability to handle iterative reconfiguration.

Design Assistant

A Flask server is used to tightly integrate the system with Grasshopper for geometry generation and spatial validation. The geometry engine receives the design data serialized in JSON and uses it to create the 3D mesh and the analytical plan. The workflow allows for a two-way feedback. UI design changes instantly update the geometric model and if geometric constraints are broken the graph can be updated.

Graph interface

CAT allows for natural language graph queries to facilitate more complex analysis. For real-time graph structure interrogation using Neo4j, user queries are parsed and transformed to Cypher. This makes it possible for the user interface to be used for tasks like identifying isolated functions assessing accessibility or summarizing spatial metrics.

Graph Query

Every stage incorporates environmental performance optimization and analysis. Users of CAT can import EPW weather files which are then processed and parsed for analysis of the Universal Thermal Climate Index. Climate-driven inquiries could be prompted such as: “Find the coolest zones at noon in July are used to dynamically inform layout optimization recommending planting plans shading techniques or program swaps based on actual comfort data”.

Climate Analysis

Generative AI is used to create atmosphere and visual feedback. Text-to-image and image-to-image pipelines (SDXL) combine stylistic cues and structured design logic to create concept and plan images. The plan exporter module which gathers geometric data analytical scores and AI-generated visuals into expert documents enables the export of each design iteration as a high-fidelity PDF or CSV.

AI image generation

On Co-Creating with AI

Assessing the resilience of different LLMs was a crucial part of the project. GPT-4o provided the most reliable mapping from prompt to spatial configuration and critique according to our methodical benchmarking other models showed problems like positional repetition, missing linkages or faulty critique logic. However, the pipeline is still modular allowing for the replacement of any LLM or analytical engine. CAT offers a continuous interactive and data-centric design process by combining user-driven prompts, modular LLM processing, graph-theoretic configuration, environmental simulation and generative visualization. The end product is a co-pilot that closes the feedback loop between performance analytics and design intent, in addition to interpreting and critiquing spatial logic opening the door to a new paradigm of computational co-creation for courtyard architecture.

Courtyard iterations designed with CAT