How lalbi2s/agent-controller works
Agent Controller is a localhost web app for defining and running configurable LLM-agent pipelines over uploaded files. The main workflow uploads input, executes agents in order, validates and reviews generated output, and sends errors back through bounded correction loops before returning a downloadable result. The UI also supports pipeline and prompt editing, provider/model configuration, and API-key management. The README documents the central flow; some detailed backend wiring is unsampled, so the graph limits those relationships to documented links.
Main entry points: Orchestrator.cs Pipeline orchestrator · App.tsx Run interface · useApi.ts API hooks · LLMClientFactory.cs LLM client factory
Components 25
Web interface
- Run interface
frontend/src/App.tsx - API hooks
frontend/src/hooks/useApi.ts - Pipeline editor
frontend/src/components/PipelineEditor.tsx - Pipeline creator
frontend/src/components/PipelineCreator.tsx - API keys page
frontend/src/components/ApiKeysPage.tsx
HTTP API
- Run endpoint
Controllers/RunController.cs - Pipeline endpoints
Controllers/PipelinesController.cs - Key endpoints
Controllers/KeysController.cs - Model endpoints
Controllers/ModelsController.cs
Pipeline runtime
- Pipeline orchestrator
Orchestrator.cs - Agent factory
Agents/AgentFactory.cs - Pipeline agent
Agents/Agent.cs - Input chunking
Services/FileChunkingService.cs - Dashboard checker
Services/GrafanaDashboardChecker.cs - Breakpoint service
Services/BreakpointService.cs - Run events
Models/PipelineEvent.cs
LLM providers
- LLM client factory
Services/LLMClientFactory.cs - Anthropic client
Services/AnthropicClient.cs - OpenAI-compatible client
Services/OpenAIClient.cs
Pipeline and credentials
- Pipeline and prompt files
Services/PromptLoader.cs - Encrypted key store
Services/ApiKeyStore.cs - Key resolver
Services/ApiKeyResolver.cs
Other components
- Local user
- LLM provider services
- Pipeline output
Connections 29
- Local user → Run interface: uploads and configures
- Run interface → API hooks: loads pipeline data
frontend/src/App.tsx - Run interface → Run endpoint: submits run
- Run interface → Pipeline endpoints: manages pipelines
- Run interface → Key endpoints: manages keys
- API hooks → Pipeline endpoints: fetches pipelines
frontend/src/hooks/useApi.ts - API hooks → Model endpoints: fetches models
frontend/src/hooks/useApi.ts - Pipeline editor → API hooks: uses API data
frontend/src/components/PipelineEditor.tsx - Pipeline creator → API hooks: uses API data
frontend/src/components/PipelineCreator.tsx - API keys page → Key endpoints: saves and tests keys
- Run endpoint → Pipeline orchestrator: starts pipeline
Controllers/RunController.cs - Pipeline endpoints → Pipeline and prompt files: edits pipeline files
Controllers/PipelinesController.cs - Pipeline orchestrator → Agent factory: prepares agents
Orchestrator.cs - Pipeline orchestrator → Pipeline and prompt files: loads prompts
Orchestrator.cs - Pipeline orchestrator → Input chunking: splits large input
Orchestrator.cs - Pipeline orchestrator → Dashboard checker: runs checks
- Pipeline orchestrator → Breakpoint service: pauses at breakpoint
Orchestrator.cs - Pipeline orchestrator → Run events: emits run events
Orchestrator.cs - Pipeline orchestrator → Pipeline output: returns output
- Agent factory → Pipeline agent: creates agents
Agents/AgentFactory.cs - Pipeline agent → LLM client factory: selects provider client
Agents/Agent.cs - LLM client factory → Anthropic client: selects available client
Services/LLMClientFactory.cs - LLM client factory → OpenAI-compatible client: selects available client
Services/LLMClientFactory.cs - Anthropic client → Key resolver: resolves API key
Services/AnthropicClient.cs - OpenAI-compatible client → Key resolver: resolves API key
Services/OpenAIClient.cs - Key resolver → Encrypted key store: reads stored keys
Services/ApiKeyResolver.cs - Key endpoints → Encrypted key store: stores encrypted keys
Controllers/KeysController.cs - Anthropic client → LLM provider services: sends completions
- OpenAI-compatible client → LLM provider services: sends completions