# fabriziocondesballesteros/agency-brain architecture

> Architecture diagram of the GitHub repository fabriziocondesballesteros/agency-brain, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2026-10-05). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/fabriziocondesballesteros/agency-brain
- Repository: https://github.com/fabriziocondesballesteros/agency-brain

## Overview

Agency Brain is documented as an experimental foundation for persistent, tool-using AI agents—not as a conventional chat wrapper. Its intended workflow starts with a user request, passes through agent reasoning and orchestration, draws on memory, knowledge, tools, and deterministic rules, then uses a provider to produce a result or interact with integrations; session state supports continuation. The repository tree contains no runtime source files, so these are documented architectural components, not verified implementations. All component paths are null; relationships are based on the README’s conceptual diagrams and descriptions.

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_agent["Agent workflow"]
  node_agent["Agent reasoning"]
  node_orchestration["Workflow orchestration"]
  node_session[("Session state")]
end

subgraph group_knowledge["Memory and knowledge"]
  node_memory[("Persistent memory")]
  node_retrieval["Knowledge retrieval"]
  node_knowledge_base[("Knowledge base")]
end

subgraph group_capabilities["Agent capabilities"]
  node_tools["Tool execution"]
  node_rules["Business rules"]
  node_automation["Structured workflows"]
end

subgraph group_runtime["Providers and integrations"]
  node_provider["Model provider"]
  node_integrations["External integrations"]
end

node_user(("User"))
node_model_service{{"External model"}}
node_external_services{{"External services"}}

node_user -->|"submits request"| node_agent
node_agent -->|"plans execution"| node_orchestration
node_orchestration -->|"maintains state"| node_session
node_agent -->|"uses memory"| node_memory
node_agent -->|"retrieves context"| node_retrieval
node_retrieval -->|"retrieves knowledge"| node_knowledge_base
node_agent -->|"chooses tools"| node_tools
node_agent -->|"applies rules"| node_rules
node_orchestration -->|"executes workflows"| node_automation
node_agent -->|"requests model"| node_provider
node_provider -->|"invokes model"| node_model_service
node_tools -->|"acts through"| node_integrations
node_integrations -->|"interacts with"| node_external_services

classDef toneNeutral fill:#f8fafc,stroke:#334155,stroke-width:1.5px,color:#0f172a
classDef toneBlue fill:#dbeafe,stroke:#2563eb,stroke-width:1.5px,color:#172554
classDef toneAmber fill:#fef3c7,stroke:#d97706,stroke-width:1.5px,color:#78350f
classDef toneMint fill:#dcfce7,stroke:#16a34a,stroke-width:1.5px,color:#14532d
classDef toneRose fill:#ffe4e6,stroke:#e11d48,stroke-width:1.5px,color:#881337
classDef toneIndigo fill:#e0e7ff,stroke:#4f46e5,stroke-width:1.5px,color:#312e81
classDef toneTeal fill:#ccfbf1,stroke:#0f766e,stroke-width:1.5px,color:#134e4a
class node_agent,node_orchestration,node_session,node_user toneBlue
class node_memory,node_retrieval,node_knowledge_base toneAmber
class node_tools,node_rules,node_automation toneMint
class node_provider,node_integrations toneRose
class node_model_service,node_external_services toneIndigo
```

## Components

### Agent workflow

- **Agent reasoning**
- **Workflow orchestration**
- **Session state**

### Memory and knowledge

- **Persistent memory**
- **Knowledge retrieval**
- **Knowledge base**

### Agent capabilities

- **Tool execution**
- **Business rules**
- **Structured workflows**

### Providers and integrations

- **Model provider**
- **External integrations**

### Other components

- **User**
- **External model**
- **External services**

## Connections

- User → Agent reasoning: submits request (evidence: `README.md`)
- Agent reasoning → Workflow orchestration: plans execution (evidence: `README.md`)
- Workflow orchestration → Session state: maintains state (evidence: `README.md`)
- Agent reasoning → Persistent memory: uses memory (evidence: `README.md`)
- Agent reasoning → Knowledge retrieval: retrieves context (evidence: `README.md`)
- Knowledge retrieval → Knowledge base: retrieves knowledge (evidence: `README.md`)
- Agent reasoning → Tool execution: chooses tools (evidence: `README.md`)
- Agent reasoning → Business rules: applies rules (evidence: `README.md`)
- Workflow orchestration → Structured workflows: executes workflows (evidence: `README.md`)
- Agent reasoning → Model provider: requests model (evidence: `README.md`)
- Model provider → External model: invokes model (evidence: `README.md`)
- Tool execution → External integrations: acts through (evidence: `README.md`)
- External integrations → External services: interacts with (evidence: `README.md`)
