diff --git a/src/cmdforge/web/templates/pages/philosophy.html b/src/cmdforge/web/templates/pages/philosophy.html index 55ccbb2..861fefa 100644 --- a/src/cmdforge/web/templates/pages/philosophy.html +++ b/src/cmdforge/web/templates/pages/philosophy.html @@ -443,6 +443,183 @@ flowchart LR + +
+ Orchestrated Discussions: A complete multi-agent AI system built entirely from CmdForge tools. +
+ +21 tools working together
++ Multiple AI personas debate topics, vote on outcomes, and synthesize conclusions. + The entire system is built from small, focused CmdForge tools that call each other. +
+ ++ This is what "composable capabilities" looks like in practice. +
++ The same task: summarize a document and email the key points. +
+ +# Step 1: Install dependencies +pip install openai python-dotenv smtplib + +# Step 2: Write the code (40+ lines) +import os +import smtplib +from openai import OpenAI +from email.mime.text import MIMEText + +client = OpenAI(api_key=os.getenv("OPENAI_KEY")) + +def summarize(text): + response = client.chat.completions.create( + model="gpt-4", + messages=[{"role": "user", + "content": f"Summarize: {text}"}] + ) + return response.choices[0].message.content + +def send_email(to, subject, body): + msg = MIMEText(body) + msg['Subject'] = subject + msg['To'] = to + # ... 15 more lines of SMTP setup + +# Step 3: Handle errors, env vars, etc.+
# Option A: Unix pipes +cat document.txt | summarize | send-email + +# Option B: Compose into a new tool +name: doc-to-email +steps: + - tool: summarize + output_var: summary + + - tool: send-email + input_template: "{summary}" + +# Now use it: +cat document.txt | doc-to-email+