Structure

Package Structure

naomi-network/
├── packages/
│   ├── core/           # Core agent framework
│   │   ├── agent/      # Agent and AgentManager
│   │   ├── context/    # ContextNetwork
│   │   ├── plugins/    # Plugin system
│   │   ├── providers/  # Model providers
│   │   └── types/      # TypeScript types
│   ├── server/         # Express.js API server
│   │   ├── routes/     # API routes
│   │   └── index.ts    # Server entry point
│   ├── client/         # React web interface
│   │   ├── components/ # React components
│   │   └── App.tsx     # Main app component
│   └── cli/            # Command-line tool
│       └── index.ts    # CLI entry point
├── examples/           # Example scripts
└── package.json       # Root package.json

Data Flow

Agent Lifecycle

  1. Creation: Agent is created with configuration

  2. Initialization: Plugins are loaded, model provider is set

  3. Processing: Agent processes messages and generates responses

  4. Context Sharing: Responses create context that's shared with connected agents

  5. Shutdown: Cleanup of resources

Network Topology

Agents can be connected in any topology:

  • Direct Connections: Two agents directly connected

  • Transitive Context: Context flows through connected agents

  • Selective Sharing: Agents can target specific agents when sharing

Last updated