How jdawosx/termux-native-agent works
TNA is a Termux-native AI agent with two runtime implementations: a Python ReAct chat/voice loop and an experimental Go agent using Google ADK. Users provide text or speech; the agent consults an LLM, dispatches selected tools, feeds tool results back for a response, and presents text or speech. The Python path includes shell, telephony, and SMS; Go adds app deep links, camera-based vision, and persistent memory. README capabilities are included, but no separate Python voice or tool modules exist in the tree.
Main entry points: main.go Registered tools · main.py Conversation loop
Components 21
Python Agent
- Conversation loop
main.py - Text I/O
main.py - Voice I/O
main.py - OpenAI-compatible LLM
main.py - Tool dispatch
main.py - Shell execution
main.py - Telephony and SMS
main.py
Go Agent
- ADK launcher
go-version/main.go - ADK agent
go-version/main.go - Registered tools
go-version/main.go - Shell tool
go-version/main.go - Telephony tools
go-version/main.go - App deep links
go-version/main.go - Camera vision
go-version/main.go - Memory tools
go-version/main.go - Persistent memory
Other components
- User
- Termux shell
- Termux device APIs
- Gemini model
- Android device
Connections 28
- User → Text I/O: types to
main.py - User → Voice I/O: speaks to
README.md - Text I/O → Conversation loop: supplies input
main.py - Voice I/O → Conversation loop: supplies input
main.py - Conversation loop → OpenAI-compatible LLM: requests completion
main.py - Conversation loop → Tool dispatch: dispatches calls
main.py - Tool dispatch → Shell execution: calls
main.py - Tool dispatch → Telephony and SMS: calls
main.py - Shell execution → Termux shell: runs commands
main.py - Telephony and SMS → Termux device APIs: runs telephony
main.py - Conversation loop → Text I/O: presents reply
main.py - Conversation loop → Voice I/O: presents reply
main.py - Voice I/O → Termux device APIs: uses speech services
main.py - User → ADK launcher: starts session
README.md - ADK launcher → ADK agent: loads agent
go-version/main.go - ADK agent → Gemini model: reasons with
go-version/main.go - ADK agent → Registered tools: dispatches tools
go-version/main.go - Registered tools → Shell tool: invokes
go-version/main.go - Registered tools → Telephony tools: invokes
go-version/main.go - Registered tools → App deep links: invokes
go-version/main.go - Registered tools → Camera vision: invokes
go-version/main.go - Registered tools → Memory tools: invokes
go-version/main.go - Shell tool → Termux shell: executes commands
go-version/main.go - Telephony tools → Termux device APIs: runs commands
go-version/main.go - App deep links → Android device: opens apps
go-version/main.go - Camera vision → Termux device APIs: captures photo
go-version/main.go - Camera vision → Gemini model: analyzes image
go-version/main.go - Memory tools → Persistent memory: reads and writes
go-version/main.go