How tentax143/neuralagentv1 works
NeuralAgent is a desktop AI automation product: users sign in, create task threads, and receive conversational or automated task results. The documented workflow combines a React interface in Electron, a FastAPI service, configurable LLM agents, and Python desktop automation; browser-only background automation is a separate capability. The graph also preserves authentication, thread persistence, and model-provider configuration. Some frontend-to-backend and desktop-agent wiring is documented only at a high level, so those links are dashed rather than asserted as inspected calls.
Main entry points: main.py FastAPI application · threads.py Thread routes · generic.py Task agent · background.py Background agent
Components 22
Desktop experience
- Electron shell
desktop/main.js - React application
desktop/neuralagent-app/src/App.js - Thread interface
desktop/neuralagent-app/src/views/Thread.js - Automation overlay
desktop/neuralagent-app/src/views/Overlay.js - API client
desktop/neuralagent-app/src/utils/axios.js
Backend service
- FastAPI application
backend/main.py - Authentication routes
backend/routers/apps/auth.py - Thread routes
backend/routers/apps/threads.py
AI and automation
- Task agent
backend/routers/aiagent/generic.py - Suggestion agent
backend/routers/aiagent/suggestor.py - Background agent
backend/routers/aiagent/background.py - Agent prompts
backend/utils/ai_prompts.py - Model provider
backend/utils/llm_provider.py - Agent tools
backend/utils/agentic_tools.py - Desktop automation
desktop/aiagent/main.py - UI extraction
desktop/aiagent/ui_extraction.py - Browser background mode
desktop/aiagent/background_mode/aiagent/main.py
Identity and state
- Token validation
backend/dependencies/auth_dependencies.py - Token and sessions
backend/utils/auth_helper.py - Postgres access
backend/db/database.py - Domain records
backend/db/models.py
Other components
- Desktop user
Connections 30
- Desktop user → Electron shell: uses
- Electron shell → React application: hosts
- React application → Thread interface: routes to
desktop/neuralagent-app/src/App.js - React application → Automation overlay: routes to
desktop/neuralagent-app/src/App.js - Thread interface → API client: requests data
- API client → FastAPI application: calls API
- FastAPI application → Authentication routes: registers
backend/main.py - FastAPI application → Thread routes: registers
backend/main.py - FastAPI application → Task agent: registers
backend/main.py - FastAPI application → Suggestion agent: registers
backend/main.py - FastAPI application → Background agent: registers
backend/main.py - Authentication routes → Postgres access: gets sessions
backend/routers/apps/auth.py - Authentication routes → Token and sessions: creates tokens
backend/routers/apps/auth.py - Token validation → Token and sessions: decodes tokens
backend/dependencies/auth_dependencies.py - Token validation → Postgres access: queries
backend/dependencies/auth_dependencies.py - Token validation → Domain records: checks records
backend/dependencies/auth_dependencies.py - Thread routes → Token validation: requires user
backend/routers/apps/threads.py - Thread routes → Postgres access: reads and writes
backend/routers/apps/threads.py - Thread routes → Domain records: uses records
backend/routers/apps/threads.py - Thread routes → Task agent: starts task flow
- Task agent → Model provider: gets model
backend/routers/aiagent/generic.py - Task agent → Agent prompts: uses prompts
backend/routers/aiagent/generic.py - Task agent → Agent tools: runs tools
backend/routers/aiagent/generic.py - Background agent → Model provider: gets model
backend/routers/aiagent/background.py - Background agent → Agent prompts: uses prompts
backend/routers/aiagent/background.py - Suggestion agent → Model provider: gets model
backend/routers/aiagent/suggestor.py - Desktop automation → UI extraction: extracts interface
desktop/aiagent/main.py - Desktop automation → Desktop user: controls desktop
- Browser background mode → Desktop user: automates browser
- Background agent → Browser background mode: dispatches work