Skip to content

Three Dimensions

gitpavleenbali edited this page Feb 17, 2026 · 4 revisions

The Three Dimensions

PYAI operates across three dimensions of intelligence, each building upon the last.

                    β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
                    β”‚     DIMENSION 3: CREATION       β”‚
                    β”‚   Software Factory Intelligence  β”‚
                    β”‚ β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β” β”‚
                    β”‚ β”‚ β€’ Self-generating systems   β”‚ β”‚
                    β”‚ β”‚ β€’ Code synthesis engines    β”‚ β”‚
                    β”‚ β”‚ β€’ Autonomous development    β”‚ β”‚
                    β”‚ β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜ β”‚
                    β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜
                                    β”‚
                    β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β–Όβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
                    β”‚    DIMENSION 2: ORCHESTRATION   β”‚
                    β”‚     Multi-Agent Intelligence     β”‚
                    β”‚ β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β” β”‚
                    β”‚ β”‚ β€’ Agent coordination        β”‚ β”‚
                    β”‚ β”‚ β€’ Workflow automation       β”‚ β”‚
                    β”‚ β”‚ β€’ Knowledge synthesis       β”‚ β”‚
                    β”‚ β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜ β”‚
                    β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜
                                    β”‚
                    β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β–Όβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
                    β”‚     DIMENSION 1: COGNITION      β”‚
                    β”‚      Core AI Operations          β”‚
                    β”‚ β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β” β”‚
                    β”‚ β”‚ β€’ ask() β€’ research()        β”‚ β”‚
                    β”‚ β”‚ β€’ summarize() β€’ analyze()   β”‚ β”‚
                    β”‚ β”‚ β€’ extract() β€’ generate()    β”‚ β”‚
                    β”‚ β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜ β”‚
                    β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜

Dimension 1️⃣ β€” Cognition

The foundation. Single-purpose AI operations that just work.

Key Functions

Function Purpose Example
ask() Question answering ask("What is Python?")
research() Deep research research("AI trends 2024")
summarize() Summarization summarize("./report.pdf")
extract() Data extraction extract(text, ["name", "email"])
generate() Content creation generate("blog post", type="article")
translate() Translation translate("Hello", to="spanish")
code Code operations code.write("REST API")
analyze Analysis analyze.sentiment("I love it!")

Example

from pyai import ask, summarize, extract

# Instant intelligence
answer = ask("Explain quantum entanglement")
summary = summarize(long_document)
entities = extract(text, fields=["names", "dates", "amounts"])

Dimension 2️⃣ β€” Orchestration

Coordinated intelligence. Multiple agents working in harmony.

Key Patterns

Pattern Purpose Use Case
Chain Sequential processing Draft β†’ Edit β†’ Publish
Router Route to specialists Code questions β†’ Coder agent
MapReduce Parallel with aggregation Multi-angle research
Supervisor Hierarchical management Manager + workers
Consensus Voting-based decisions Multi-expert approval
Debate Adversarial reasoning Pro/con analysis

Example

from pyai import Agent
from pyai.blueprint import Workflow, Step

researcher = Agent(name="Researcher", instructions="Find information.")
analyst = Agent(name="Analyst", instructions="Analyze data.")
writer = Agent(name="Writer", instructions="Write content.")

workflow = (Workflow("ResearchPipeline")
    .add_step(Step("research", researcher))
    .add_step(Step("analyze", analyst))
    .add_step(Step("write", writer))
    .build())

result = await workflow.run("Create report on AI trends")

Dimension 3️⃣ β€” Creation

Self-generating systems. The Software Factory.

Vision

Software Factories don't just use AI β€” they are AI. They generate code, tests, documentation, and entire systems from high-level descriptions.

Key Capabilities

Feature Description
Code Generation Generate complete modules from descriptions
Code Review Automated quality analysis
Refactoring Transform architecture intelligently
Debugging Fix errors with explanations
Test Generation Create comprehensive test suites
Documentation Auto-generate docs from code

Example

from pyai import code

# Generate code
api_code = code.write("REST API for user management with JWT auth")

# Review existing code
review = code.review(existing_code)
print(review.issues, review.suggestions, review.score)

# Debug errors
fix = code.debug("TypeError: cannot unpack non-iterable NoneType")

# Refactor architecture
improved = code.refactor(old_code, goal="async architecture")

The Intelligence Stack

β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
β”‚                    YOUR APPLICATION                       β”‚
β”œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€
β”‚  β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”  β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”  β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”  β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”     β”‚
β”‚  β”‚ PyAI β”‚  β”‚ PyFlow  β”‚  β”‚PyVision β”‚  β”‚ PyVoice β”‚     β”‚
β”‚  β”‚ Agents  β”‚  β”‚Workflow β”‚  β”‚ Vision  β”‚  β”‚  Audio  β”‚     β”‚
β”‚  β””β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”˜  β””β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”˜  β””β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”˜  β””β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”˜     β”‚
β”‚       β”‚            β”‚            β”‚            β”‚           β”‚
β”‚  β”Œβ”€β”€β”€β”€β–Όβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β–Όβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β–Όβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β–Όβ”€β”€β”€β”€β”     β”‚
β”‚  β”‚              PYAI INTELLIGENCE ENGINE           β”‚     β”‚
β”‚  β”‚  β€’ Unified Memory  β€’ Context Management         β”‚     β”‚
β”‚  β”‚  β€’ Model Routing   β€’ Intelligent Caching        β”‚     β”‚
β”‚  β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜     β”‚
β”œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€
β”‚     Azure OpenAI  |  OpenAI  |  Anthropic  |  Ollama    β”‚
β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜

Progressive Complexity

Start simple, scale infinitely:

# Level 1: One line
answer = ask("Translate to French: Hello")

# Level 2: Agent with tools
translator = Agent(name="Translator", instructions="...", tools=[...])
result = Runner.run_sync(translator, "Translate to all languages")

# Level 3: Multi-agent orchestration
workflow = Workflow("TranslationService").add_step(...).build()

Next Steps

🧠 PYAI Wiki

Home


πŸš€ Getting Started


πŸ’‘ Core Concepts


🎯 One-Liner APIs


πŸ€– Agent Framework


πŸ”— Multi-Agent


πŸ› οΈ Tools & Skills


🏒 Enterprise


πŸŽ™οΈ Voice


πŸ–ΌοΈ Multimodal


πŸ“Š Vector DB


🌐 OpenAPI


πŸ”Œ Plugins


🀝 A2A Protocol


πŸ”’ Security


πŸ“š Reference


Intelligence, Embedded.

Clone this wiki locally