How agentflocks/flocks works
Flocks is an AI-native SecOps platform. A user reaches agents through the WebUI, HTTP API, terminal UI, or messaging channels; agents work through sessions, tools, and model providers to produce SecOps results. Workflows and event-ingest services provide a separate automation branch, while memory and persistent storage support ongoing work. The README documents the product capabilities; source-level evidence is sampled for selected modules, so several runtime connections are shown as unverified rather than asserted.
Main entry points: session.py Session Runtime · runner.py Workflow Runner · app.py HTTP API · catalog.py Agent Tools
Components 22
User Interfaces
- WebUI
webui/src/App.tsx - HTTP API
flocks/server/app.py - Terminal UI
tui/flocks/cli/cmd/tui/app.tsx - Messaging Channels
flocks/channel/gateway/manager.py
Agent Runtime
- Agent System
flocks/agent/agent.py - Session Runtime
flocks/session/session.py - Agent Tools
flocks/tool/catalog.py - Model Providers
flocks/provider/provider.py
Automation
- Workflow Runner
flocks/workflow/runner.py - Workflow Engine
flocks/workflow/engine.py - Execution Plan
flocks/workflow/execution_plan.py - Workflow Models
flocks/workflow/models.py - Workflow Store
flocks/workflow/fs_store.py - Event Ingest
flocks/ingest/kafka/manager.py - Syslog Ingest
flocks/ingest/syslog/manager.py
Platform Services
- Memory
flocks/memory/manager.py - Persistent Storage
flocks/storage/storage.py - Hook Pipeline
flocks/hooks/pipeline.py - Configuration
flocks/config/config.py - MCP Integration
flocks/mcp/server.py - LSP Integration
flocks/lsp/server.py
Other components
- User
Connections 23
- User → WebUI: uses
README.md - User → HTTP API: requests
README.md - User → Terminal UI: uses
- User → Messaging Channels: messages
- HTTP API → Agent System: dispatches
- Messaging Channels → Agent System: dispatches
- Agent System → Session Runtime: runs
- Session Runtime → Agent Tools: invokes
- Session Runtime → Model Providers: requests
- Session Runtime → Memory: uses
- Session Runtime → Persistent Storage: persists
flocks/storage/storage.py - Workflow Runner → Workflow Engine: runs
flocks/workflow/runner.py - Workflow Runner → Execution Plan: builds
flocks/workflow/runner.py - Execution Plan → Workflow Models: reads
flocks/workflow/execution_plan.py - Workflow Runner → Workflow Store: resolves
- Event Ingest → Workflow Runner: triggers
flocks/ingest/kafka/manager.py - Syslog Ingest → Workflow Runner: triggers
flocks/ingest/syslog/manager.py - Hook Pipeline → Session Runtime: resolves session
flocks/hooks/pipeline.py - Configuration → Hook Pipeline: configures
flocks/hooks/pipeline.py - HTTP API → Hook Pipeline: executes
flocks/server/app.py - HTTP API → MCP Integration: exposes
- Agent Tools → MCP Integration: uses
- Agent Tools → LSP Integration: uses