How nastechresearch/nastech-agent works
Nastech Agent is a self-improving conversational AI agent, exposed through CLI/TUI and messaging integrations, with a companion desktop app. A user submits a request, the agent runs a model/tool conversation, then returns a response; learning, memory, scheduling, delegation, and research capabilities form important additional branches. The README documents these capabilities, but sampled source is limited, so the graph shows documented product relationships rather than asserting unsampled implementation calls.
Main entry points: conversation_loop.py Conversation loop · session_persistence.py Session persistence · agent Messaging gateway · client.ts Desktop API client
Components 23
User interfaces
- CLI
nastech_cli/console_engine.py - Terminal UI
ui-tui/src/app/useInputHandlers.ts - ACP adapter
acp_adapter/entry.py - Messaging gateway
agent
Agent runtime
- Conversation loop
agent/conversation_loop.py - Context engine
agent/context_engine.py - Tool execution
agent/tool_executor.py - Subagents
agent/subagent_lifecycle.py - Session persistence
agent/session_persistence.py
Learning and memory
- Curated memory
agent/memory_manager.py - Skill learning
agent/skill_utils.py - Session search
agent - User modeling
agent - Trajectory research
agent/trajectory.py
Providers and automation
- Model providers
agent/provider_registry.py - Terminal backends
agent - Scheduled automation
agent/periodic_scheduler.py
Desktop application
- Desktop app
apps/desktop/src/app/chat - Desktop API client
apps/desktop/src/api/client.ts - Electron main
apps/desktop/electron/main.ts
Other components
- User
- Messaging platforms
- Model services
Connections 25
- User → CLI: submits request
- User → Terminal UI: enters request
- User → ACP adapter: sends request
- User → Desktop app: chats
- Messaging platforms → Messaging gateway: deliver messages
- CLI → Conversation loop: starts conversation
- Terminal UI → Conversation loop: sends conversation
- ACP adapter → Conversation loop: bridges conversation
- Messaging gateway → Conversation loop: routes messages
- Desktop app → Desktop API client: requests data
- Desktop API client → Messaging gateway: calls backend
- Conversation loop → Context engine: prepares context
- Conversation loop → Model providers: requests completion
- Model providers → Model services: sends requests
- Conversation loop → Tool execution: dispatches tools
- Tool execution → Terminal backends: runs commands
- Conversation loop → Session persistence: persists session
- Conversation loop → Subagents: delegates work
- Conversation loop → Curated memory: uses memory
- Curated memory → Skill learning: supports learning
- Session persistence → Session search: provides history
- Session persistence → User modeling: provides history
- Conversation loop → Trajectory research: records trajectories
- Scheduled automation → Conversation loop: starts automations
- Electron main → Desktop API client: hosts app services