An AI-powered agent framework and command-line tool suite for managing decentralized infrastructure deployments through natural language.
Grid Agent provides a complete set of tools for intelligent automation and management of grid infrastructure. It includes a reusable AI agent core with LLM provider abstraction, a modern desktop application, and a command-line interface for infrastructure operations.
The agent interprets natural language requests, translates them into structured operations, and executes them against a grid backend. This makes it possible to deploy virtual machines, Kubernetes clusters, databases, and gateways using conversational commands rather than manual API calls.
- Agent Framework (
/agent) — Reusable AI agent core with LLM provider abstraction and extensible tool system - Grid Agent GUI (
/grid-agent-gui) — Cross-platform desktop application built with Wails and Svelte - Grid CLI (
/grid-cli,tfcmd) — Command-line interface for grid operations and schema export
Grid Agent sits at the user-facing layer of the infrastructure stack. It communicates with the grid's management plane to execute workloads, report status, and handle lifecycle operations. The CLI provides the foundational operations that the agent framework orchestrates, while the GUI offers a chat-based interface for non-technical users.
This technology is used within the ThreeFold ecosystem and was first deployed on the ThreeFold Grid. The component itself is designed as reusable infrastructure technology and should be understood by its technical function first, independent of any specific deployment.
This repository is owned and maintained by TF-Tech NV, a Belgian company responsible for the development and maintenance of this technology.
A standalone, reusable AI agent framework for building intelligent conversational assistants.
Key features:
- LLM provider abstraction (Google Gemini, extensible to OpenAI and others)
- Extensible tool system for CLI integration
- Real-time streaming command execution
- Automatic retry logic and error handling
- Structured JSON response parsing
Package: github.com/threefoldtech/grid_agent/agent
Read the full Agent documentation →
A modern, cross-platform desktop application providing a chat interface for grid management.
Key features:
- AI-powered chat interface with Google Gemini
- Dark and light theme support
- Secure onboarding flow
- Real-time command execution with streaming output
- Multi-network support (mainnet, testnet, devnet)
Technologies: Wails v2, Svelte, TypeScript, Go
Read the full GUI documentation →
Command-line interface for grid operations, providing the foundation for agent schema generation.
Key features:
- Deploy and manage VMs, Kubernetes clusters, and databases
- Gateway management (FQDN, Name)
- Contract operations
- Schema export for AI agent integration
Package: github.com/threefoldtech/grid_agent/grid-cli
Read the full CLI documentation →
You have two options to start using Grid Agent:
- Download prebuilt binaries (simplest)
- Build and install from source (for development)
Prebuilt binaries for the latest tagged version are available on GitHub Releases:
-
Download the latest
tfcmd-linux-amd64andgrid-agent-gui-linux-amd64. -
Make the binaries executable and move them into your local bin directory:
chmod +x tfcmd-linux-amd64 mv tfcmd-linux-amd64 ~/.local/bin/tfcmd chmod +x grid-agent-gui-linux-amd64 mv grid-agent-gui-linux-amd64 ~/.local/bin/grid-agent-gui
-
Ensure
~/.local/binis in yourPATH.
-
Download the appropriate CLI and GUI artifacts for your architecture (
amd64orarm64). -
Install the CLI:
chmod +x tfcmd-darwin-* sudo mv tfcmd-darwin-amd64 /usr/local/bin/tfcmd # Intel (amd64) # or sudo mv tfcmd-darwin-arm64 /usr/local/bin/tfcmd # Apple Silicon (arm64)
-
For the GUI, download the
.app.zipfor your architecture and extract it. This producesgrid-agent-gui.app.mv grid-agent-gui.app /Applications/Grid\ Agent.app -
Launch from Spotlight or Finder. If macOS blocks it as an unidentified developer, allow it under System Settings → Privacy & Security.
-
Download
tfcmd-windows-amd64.exeandgrid-agent-gui-windows-amd64.exe. -
Optionally rename and add the CLI to your
PATH:Rename-Item .\tfcmd-windows-amd64.exe tfcmd.exe # Then add its directory to the PATH environment variable
-
Run
grid-agent-gui-windows-amd64.exeto start the GUI.
- Go 1.23 or higher
- Node.js 18 or higher (for GUI)
- Wails CLI v2.11.0+ (for GUI development)
- System Dependencies (Linux only): Run
make install-deps
Install all components with a single command:
make installOr install specific components:
# Install Grid CLI only
make install-grid-cli
# Install Grid Agent GUI only
make install-grid-agent-guiThis installs binaries to:
- Linux:
~/.local/bin - macOS:
/usr/local/bin
Note: Make sure the installation directory is in your
PATH.
After installation, launch the Grid Agent GUI:
# From terminal
grid-agent-gui
# Or use your application launcherOn first launch, you will be guided through:
- Entering your mnemonic phrase
- Selecting a network (mainnet/testnet/devnet)
- Providing a Gemini API key
Get a free Gemini API key at: https://aistudio.google.com/app/apikey
This repository uses Go workspaces to manage multiple modules.
# Clone the repository
git clone https://github.com/threefoldtech/grid_agent.git
cd grid-agent
# Check dependencies
make check-deps
# Install development tools
make install-tools
# Sync workspace
make work-sync# Build all components
make build
# Build specific components
make build-agent # Build agent library
make build-grid-cli # Build tfcmd binary
make build-grid-agent-gui # Build GUI application# Run all tests
make test
# Run specific component tests
make test-agent
make test-grid-cli
make test-grid-agent-gui
# Generate coverage reports
make coverage# Lint all components
make lint
# Lint specific components
make lint-agent
make lint-grid-cli
make lint-grid-agent-guiRun the GUI in development mode with hot reload:
make dev-gui
# Or directly
cd grid-agent-gui
wails devThis starts:
- Vite dev server with hot reload
- Go backend
- Dev server at http://localhost:34115
┌─────────────────────────────────────────────────────────────┐
│ Grid Agent GUI (Wails) │
│ ┌────────────────────────────────────────────────────────┐ │
│ │ Frontend (Svelte + TypeScript) │ │
│ │ - Chat Interface │ │
│ │ - Settings Management │ │
│ │ - Real-time Output Display │ │
│ └──────────────────────┬─────────────────────────────────┘ │
│ │ Wails Runtime Bridge │
│ ┌──────────────────────▼─────────────────────────────────┐ │
│ │ Backend (Go) │ │
│ │ - Agent Integration │ │
│ │ - tfcmd Schema Generation │ │
│ │ - Configuration Management │ │
│ └──────────────────────┬─────────────────────────────────┘ │
└─────────────────────────┼───────────────────────────────────┘
│
┌─────────────▼─────────────┐
│ Agent Framework Core │
│ ┌─────────────────────┐ │
│ │ LLM Provider │ │
│ │ (Gemini) │ │
│ └──────────┬──────────┘ │
│ │ │
│ ┌──────────▼──────────┐ │
│ │ Tool Registry │ │
│ │ - Command Tool │ │
│ │ - URL Fetch Tool │ │
│ │ - tfcmd Tool │ │
│ └──────────┬──────────┘ │
│ │ │
│ ┌──────────▼──────────┐ │
│ │ Workflow Processor │ │
│ └─────────────────────┘ │
└─────────────┬─────────────┘
│
┌─────────────▼─────────────┐
│ Grid CLI (tfcmd) │
│ - VM Management │
│ - Kubernetes Deployment │
│ - Gateway Configuration │
│ - Contract Operations │
└───────────────────────────┘
│
┌─────────────▼─────────────┐
│ Grid Backend │
│ (Blockchain + Nodes) │
└───────────────────────────┘
grid-agent/
├── agent/ # AI agent framework (library)
│ ├── pkg/
│ │ ├── core/ # Agent orchestration
│ │ ├── llm/ # LLM provider implementations
│ │ ├── tools/ # Tool system and built-ins
│ │ └── workflow/ # Workflow processing
│ └── go.mod
│
├── grid-cli/ # Grid CLI
│ ├── cmd/ # CLI commands
│ ├── internal/ # Internal packages
│ ├── docs/ # Command documentation
│ └── go.mod
│
├── grid-agent-gui/ # Desktop GUI application
│ ├── frontend/ # Svelte frontend
│ │ └── src/
│ ├── internal/ # Go backend logic
│ │ ├── config/ # Configuration management
│ │ └── tfcmd/ # CLI integration
│ ├── build/ # Build assets
│ ├── app.go # Main app logic
│ └── go.mod
│
├── Makefile # Build automation
├── go.work # Go workspace
└── README.md # This file
Run make help to see all available commands:
# Building
make build # Build all components
make build-grid-cli # Build tfcmd only
make build-grid-agent-gui # Build GUI only
# Installation
make install # Install all components
make install-grid-cli # Install tfcmd
make install-grid-agent-gui # Install GUI with desktop entry
# Development
make install-deps # Install system dependencies (Linux)
make dev-gui # Run GUI in dev mode with hot reload
make tidy # Tidy all go.mod files
make work-sync # Sync Go workspace
# Testing
make test # Run all tests
make coverage # Generate coverage reports
# Linting
make lint # Lint all components
# Cleanup
make clean # Remove build artifactsSettings are stored in ~/.config/grid-agent/settings.json:
{
"mnemonics": "your twelve word mnemonic phrase here",
"network": "mainnet",
"geminiApiKey": "your-gemini-api-key",
"theme": "dark",
"isConfigured": true
}Configuration is stored in .tfgridconfig in your system's config directory.
We welcome contributions. Please follow these guidelines:
- Fork the repository
- Create a feature branch:
git checkout -b feature/amazing-feature - Make your changes
- Run tests:
make test - Run linter:
make lint - Commit changes:
git commit -m 'Add amazing feature' - Push to branch:
git push origin feature/amazing-feature - Open a Pull Request
# 1. Sync dependencies
make tidy
# 2. Make your changes
# 3. Test
make test
# 4. Lint
make lint
# 5. Build
make buildEnsure tfcmd is installed and in your PATH:
make install-grid-cli
which tfcmdUpdate icon cache and desktop database:
gtk-update-icon-cache ~/.local/share/icons/hicolor/ -f
update-desktop-database ~/.local/share/applications/Then log out and log back in.
Install Wails CLI:
make install-tools
# or
go install github.com/wailsapp/wails/v2/cmd/wails@latestSync the workspace:
make work-sync
make tidyThis project is licensed under the Apache License 2.0 — see the LICENSE file for details.
- zos_sdk_go — Grid SDK for Go
- Grid Proxy — Grid indexer and query service