Cognitive Foundry
From Mental Model to Multi-Agent System

Explore the interactive demo.
How-To Guide: Building Your First Executable Mental Model¶
This guide will walk you through using the Cognitive Foundry app to translate a simple strategic thinking process into an executable multi-agent system.
Step 1: Create a New Project¶
First, we need a workspace for our agent.
Navigate to the Project Management section in the left sidebar.
Expand the Create New Project section.
Enter a Project Name (e.g.,
MBA_Case_Study).Enter your Google AI Studio API Key.
Click Create Project. Your new project will be automatically selected.
Step 2: Build the “Worker” Agents¶
Worker agents are specialists that perform one specific task. We’ll create one for each step of our mental model.
Agent 1: The Market Researcher¶
This agent’s only job is to perform a web search.
On the Agent Configuration & Architecture tab, click ✨ Create New Agent. An “Agent Editor” window will appear.
Agent Class: Keep the default,
LlmAgent. This class is for agents that use a language model to think and use tools.Fill in the fields:
Agent Name:
Market_ResearcherDescription:
Performs a general web search to gather initial information about a given topic.Model: You can keep the default model.
Instruction: This is the most important part—it’s the agent’s “job description.” Enter the following:
You are a junior market research analyst. Your goal is to get a high-level overview of a topic. Use the google_search tool to find relevant articles, statistics, and reports. Synthesize the top 3-4 key points from your search results into a brief summary.
Tools: Select
Google Searchfrom the dropdown list.
Click 💾 Save. You will see your new
Market_Researcheragent appear on the configuration page.
Agent 2: The Competitor Analyst¶
Now, let’s create our second specialist.
Click ✨ Create New Agent again.
Agent Class: Select
LlmAgent.Fill in the fields:
Agent Name:
Competitor_AnalystDescription:
Identifies and analyzes key competitors based on initial market research.Instruction:
You are a competitive intelligence analyst. You will be given a summary of a market. Your task is to use the google_search tool to identify the top 3 competitors in that market. For each competitor, briefly describe their main product or service.
Tools: Select
Google Search.
Click 💾 Save.
Agent 3: The Strategist¶
This final worker agent will provide the recommendation. It doesn’t need tools; it will base its recommendation on the work of the previous two agents.
Click ✨ Create New Agent.
Agent Class: Select
LlmAgent.Fill in the fields:
Agent Name:
StrategistDescription:
Forms a final recommendation based on market and competitor analysis.Instruction:
You are a senior business strategist. You will receive a market overview and a list of key competitors. Based only on the information provided, write a one-paragraph recommendation on whether the market entry seems favorable, challenging, or unfavorable, and state your primary reason. Do not use any tools.
Click 💾 Save.
You should now have three worker agents (Market_Researcher, Competitor_Analyst, Strategist) and the default root_agent.
Step 3: Build the “Manager” Agent (The Workflow)¶
Now we will configure the existing root_agent to act as a manager, orchestrating our workers in the correct sequence. This is where we define the workflow, turning our list of specialists into a cohesive process.
Find the
root_agentcard and click Edit.Change the Agent Class from
LlmAgenttoSequentialAgent. This tells the agent to run its sub-agents one after another, in a specific order.The fields for
Model,Instruction, andToolswill disappear, as aSequentialAgentonly manages a workflow.In the Sub-Agents dropdown, select your agents in the order you want them to run:
Market_ResearcherCompetitor_AnalystStrategist
Click 💾 Save.
The Agent Architecture diagram will automatically update to show your new workflow: Market_Researcher → Competitor_Analyst → Strategist. This diagram is a visual representation of your executable mental model.
Step 4: Execute Your Model¶
Let’s test our new agent system.
Go to the 🚀 Execution & Results tab.
In the text area, enter a query that matches the task you designed the agent for. For example:
Should a new luxury electric vehicle brand enter the Swedish market?
Click 🚀 Execute.
The system will now run your query through the chain of agents you defined. In the Results section, you will see the final output from the last agent in the chain (Strategist), which is the culmination of the entire process. You can inspect the full JSON output to see the intermediate steps from the other agents.
Congratulations, you have successfully externalized, codified, and executed a mental model!