Overview
A complete agent runtime in one terminal
UIntellAgent is a Rust-native AI agent built on Rig. It combines model providers, a unified Ratatui interface, durable autonomous runs, a permission-gated tool catalog, an integrated editor, and SurrealDB graph memory in one process.
The public GitHub repository contains the MIT-licensed Rust source. The v1.0.2 stable release provides a checksummed Linux x86-64 archive, rollback installer, and signed build provenance.
Core architecture
| Layer | Implementation | Responsibility |
|---|---|---|
| Agent | Rig + Tokio | Model turns, tool dispatch, provider orchestration, and hooks. |
| Interface | Ratatui | Chat, Memory, Tools, Editor, and Runs workspaces. |
| Memory | SurrealDB 3 | Facts, datasets, typed relations, code locations, views, and operation journal. |
| Execution | Shared permission engine | Allow, deny, confirmation, workspace paths, hosts, and sandbox decisions. |
| Gateway | Axum | Authenticated health, readiness, and chat HTTP endpoints. |
Requirements
- Rust 1.94 or newer and Cargo when building from source.
- Linux on x86-64. Bubblewrap is required for the default code sandbox.
- A DeepSeek API key or a running Ollama instance.
- The
surrealbinary for automatic local graph-memory startup. rust-analyzerfor Rust completion, diagnostics, and definition navigation.
Installation
Install and start
Install the stable Linux x86-64 release with one command, configure a provider, and start the unified TUI.
curl --proto '=https' --tlsv1.2 -fsSL https://uintell.org/install.sh | shThe bootstrap is pinned to the v1.0.2 release checksum and installs without sudo into ~/.local/bin. Read the installer before running it when your shell policy does not allow piped scripts.
Manual verified release
version=1.0.2
asset="uintell-agent-${version}-x86_64-unknown-linux-gnu"
base_url="https://github.com/uintell/uintellagent/releases/download/v${version}"
curl --fail --location --remote-name "${base_url}/${asset}.tar.gz"
curl --fail --location --remote-name "${base_url}/SHA256SUMS"
sha256sum --ignore-missing --check SHA256SUMS
tar -xzf "${asset}.tar.gz"
cd "$asset"
./install.sh
export PATH="$HOME/.local/bin:$PATH"
export DEEPSEEK_API_KEY="sk-..."
uintell-agent doctor
uintell-agent --tuiFish shell and private prompt history
The v1.0.2 installer includes native Fish completions and the ua launcher under ~/.config/fish. In the TUI, Up/Down recalls project-scoped prompts and Tab or Right accepts the visible suggestion. Inputs resembling credentials, private keys, recovery phrases, or Nostr secret keys are not persisted.
ua
ua explain this Rust borrow error
uintell-agent history list --limit 50
uintell-agent history clearThe default provider reads DEEPSEEK_API_KEY. At startup, the unified TUI checks provider health, starts local SurrealDB when required, initializes its schema, and restores workspace state from ~/.uintell/workspace.json.
Build from source
Use Rust 1.94 or newer to build the same version from the public repository.
git clone https://github.com/uintell/uintellagent.git
cd uintellagent
git checkout v1.0.2
export DEEPSEEK_API_KEY="sk-..."
cargo run -- doctor
cargo run -- --tuiUse Ollama
Start Ollama first, then select it with the global --ollama flag.
ollama serve
~/.local/bin/uintell-agent --ollama --tuiOverride the default Ollama model with --model <name>. The same tools, graph memory, editor, and run engine remain available with either provider.
Optimized source build
cargo build --release --locked
./target/release/uintell-agent --tuiEnvironment doctor
Verify the runtime before starting work
doctor checks the dependencies that UIntellAgent actually advertises and uses.
cargo run -- doctor| Check | What is verified |
|---|---|
| Provider auth | Configured provider can authenticate and respond. |
| Graph memory | SurrealDB readiness and schema initialization. |
| Permissions | Configuration parsing and workspace write behavior. |
| Code policy | Sandbox configuration and Bubblewrap availability. |
| Runtimes | Advertised Bash, Python, Rust, and Node.js execution paths. |
| Code intelligence | rust-analyzer availability. |
Offline providers leave Memory, Tools, Editor, and run history available, but Chat and new Runs remain blocked with an actionable reason.
Configuration
Environment variables and persisted state
| Variable | Purpose and default |
|---|---|
| DEEPSEEK_API_KEY | Required by the default DeepSeek provider. |
| OPENROUTER_API_KEY | Optional credential for OpenRouter calls through provider_mesh. |
| UINTELL_API_KEY | Dedicated secret that authenticates /ready and /chat. It never falls back to a provider key. |
| UINTELL_DB_URL | SurrealDB HTTP URL. Default: http://127.0.0.1:8000. |
| UINTELL_DB_USER | SurrealDB username. Default: root. |
| UINTELL_DB_PASS | SurrealDB password. Default: root. |
| UINTELL_DB_PATH | Local SurrealKV directory. Default: ~/.uintell/surrealdb. |
| UINTELL_DB_AUTOSTART | Set to 0, false, no, or off when another service owns local SurrealDB. |
| UINTELL_CODE_SANDBOX | Code execution is sandboxed unless this is explicitly set to 0. |
| UINTELL_ALLOW_UNSANDBOXED_CODE | Must be 1 before unsandboxed code can run. Development override only. |
| UINTELL_LSP_COMMAND | Language-server command. Default: rust-analyzer. |
| UINTELL_LSP_ARGS | Whitespace-separated arguments passed to the configured language server. |
| UINTELL_CORS_ORIGINS | Comma-separated gateway origins. Defaults to local port 3000 origins. |
| UINTELL_CORS_ALLOW_ANY | Set to 1 only when the gateway should allow any CORS origin. |
Local state
| Path | Contents |
|---|---|
| ~/.uintell/workspace.json | Active workspace, editor cursor/file, selected run, and graph viewport. |
| ~/.uintell/runs/ | Private atomic run checkpoints and result ledgers. |
| ~/.uintell/surrealdb/ | Default local SurrealKV data directory. |
| ~/.uintell/surrealdb.log | Output from automatically started SurrealDB. |
| ~/.uintell/permissions.toml | Tool, file, command, and network policy. |
| ~/.uintell/skills/ | Versioned manifests and Markdown instructions for explicitly selected skills. |
Unified TUI
Five persistent workspaces
Start the interface with cargo run -- --tui. Switch workspaces globally without destroying their state.
The active workspace, open editor location, selected run, and graph view are restored the next time the TUI starts.
Chat workspace
Stream, intervene, and start durable work
Chat streams model output and tool events in one timeline. Use Alt+Enter to send andEsc or Ctrl+G to cancel an active model/tool run.
| Command | Behavior |
|---|---|
| /task <objective> | Create a durable coding run using the current workspace and staged context. |
| /task --remember <objective> | Also permit the run to create or mutate graph memory. |
| /runs | Open durable run history. |
| /health | Show current provider health. |
| /clear | Clear the visible conversation. |
| /save, /load, /sessions | Manage chat sessions. |
| /exit | Exit when no unresolved review blocks shutdown. |
Graph memory
Build durable knowledge from nodes and directed relations
A node is one persistent, self-contained fact stored in SurrealDB. Nodes survive agent restarts and can be searched, edited, grouped into datasets, connected to other facts, or loaded into a future model turn. Open Memory with Alt+2. Inside Memory, plain keys 1 through 4 switch Graph, Explorer, Query, and Analytics.
Run uintell-agent db to inspect and manage the same SurrealDB graph without loading an AI provider.
What a knowledge node stores
| Field | Purpose | Example |
|---|---|---|
| Type | Classifies one atomic fact. Common types are memory, preference, finding, user_detail, decision, error, and fix. | decision |
| Content | The required fact text. Keep it specific and understandable without relying on another node. | Use a provider registry in v1.1. |
| Dataset | Groups knowledge by project or domain. Names use letters, digits, dots, underscores, or hyphens. | uintellagent |
| Tags | Optional comma-separated labels for filtering and search. | providers,v1.1 |
| Confidence | A value from 0 to 1. Higher-confidence facts are returned before lower-confidence facts during context recall. | 1.0 |
Create your first node
- Press Alt+2 to open Memory, then press plain 2 for Explorer.
- Press c to open the Create Knowledge Unit form.
- Use Tab and Shift+Tab to move between fields. Content cannot be empty.
- Press Enter to validate and save. Read the bottom status line if the form remains open.
Type: decision
Content: UIntellAgent v1.1 will use a provider registry.
Dataset: uintellagent
Tags: providers,v1.1
Confidence: 1.0Connect two nodes
Relations are directed: the node selected first is the source and the node selected second is the target. Use Explorer for the clearest selection workflow.
- Press plain 2 for Explorer and select the source node with j/k.
- Optionally press t to choose
relates_toorproves. - Press lowercase l once. The status line reports
link source ...; select target and press l. - Select a different target node with j/k.
- Press lowercase l again to persist
source --relation--> target. - Press plain 1 for Graph. Use a for layout or Z to fit all visible nodes.
Esc cancels a pending link. Selecting the same node as source and target also cancels it. If a dataset or type filter hides one endpoint, switch the filter before linking.
Choose the correct relation
| Relation | Meaning | Direction |
|---|---|---|
| relates_to | A general association. Use it when two facts are connected but neither is evidence for the other. | topic --relates_to--> associated fact |
| proves | The source contains concrete evidence supporting the target. Do not use it for a guess, loose similarity, or simple chronology. | evidence --proves--> conclusion |
[finding] All provider-registry tests passed
--proves-->
[decision] The provider registry is ready to ship
[error] A node with empty content cannot be saved
--relates_to-->
[fix] Add required content before pressing EnterInspect, arrange, and remove connections
Let the agent store and recall knowledge
In Chat, ask the agent to remember a durable fact or recall a previous decision. The same operations are available explicitly in Tools through graph_store, graph_query,graph_context, graph_edit, and graph_forget.
:run graph_store {"fact_type":"decision","content":"Use a provider registry in v1.1","dataset":"uintellagent","tags":["providers","v1.1"],"confidence":1.0}
:run graph_query {"query":"provider registry","limit":10}
:run graph_context {"fact_types":["decision"],"limit":20}graph_storecreates a fact;graph_querysearches fact content and returns record IDs.graph_contextloads high-confidence, recent facts into model context.graph_editupdates a record ID returned by a query.graph_forgetpermanently deletes a fact and is not the same as the TUI's undoable workflow.
Do not place passwords, API keys, recovery phrases, private keys, access tokens, or other credentials in graph memory.
Relations are persisted, visualized, and available to SurrealQL. In v1.0, graph_contextranks nodes by confidence and recency; it does not automatically traverse relates_to orproves edges. Moving or pinning a node changes only its visual layout, not recall priority.
SurrealQL and graph commands
:query SELECT * FROM fact LIMIT 20;
:dataset code
:layout
:fit-all
:view-save code-review
:export ~/.uintell/graph-snapshot.json
:repair:query accepts read-only SurrealQL. Mutations require :query!, then an additional preview and confirmation. Imports are validated before :import! can merge new records.
Scale and recovery
:load-more [count]and:load-allraise the interactive window up to 100,000 nodes.:view-save,:view, and:viewspersist filters, pan, and zoom.:exportwrites a versioned JSON snapshot;:repairfixes metadata and duplicate edges.- Refresh, layout, and query operations run as cancellable background jobs with retry support.
Tools workspace
Inspect and execute the registered catalog
Select tools with j/k. Enter prepares a call. Use :run for a normal policy check and :run! only to explicitly confirm a call that requested confirmation.
:run file_read {"path":"Cargo.toml","limit":40}
:run! code_exec {"language":"python","code":"print(2 + 2)"}terminalRun commands in a persistent project shell.
file_readRead a text file with line numbers and bounded output.
file_writeCreate or replace a workspace file and retain before/after bytes for review.
file_searchSearch project files through ripgrep.
browserFetch a web page as text or HTML.
web_searchSearch the web through DuckDuckGo.
code_execExecute Python, Bash, Rust, or Node.js in Bubblewrap by default.
graph_storeStore a persistent fact in SurrealDB.
graph_querySearch graph-memory facts.
graph_contextLoad recent high-confidence memory context.
graph_editEdit a fact by validated record ID.
graph_forgetPermanently delete a fact by validated record ID.
provider_meshRace selected configured providers and return the first valid response.
:run! is not a bypassDenied commands and paths remain denied. The suffix records explicit confirmation only for operations classified as confirmable.
Editor workspace
Edit real files with code intelligence and review gates
The Vim-style editor combines a project tree, text buffer, diagnostics, completions, definitions, agent change review, and a run inspector. Agent file_write calls never silently replace an unsaved buffer.
Editor commands
| Command | Behavior |
|---|---|
| :e <path> | Open a file or browse a directory. :e . loads the current project tree. |
| :w, :wq | Write the current file, optionally returning to Chat. |
| :chat | Stage the current selection or file as chat context. |
| :run | Stage the current context as a durable objective. |
| :memory | Create a navigable code-location fact and relate it to selected memory. |
| :definition | Open the language-server definition target. |
| :accept, :reject | Persist a decision for the current hunk. |
| :accept-all, :reject-all | Resolve every remaining hunk. |
| :undo-change | Undo the most recently accepted agent change when disk state still matches. |
| :discard | Revert the unsaved editor buffer. |
Durable runs
Checkpoint autonomous coding work
A run inspects and plans, implements against real files, verifies, performs an independent review, repairs failed quality gates within bounds, and writes a final engineering report.
~/.local/bin/uintell-agent task start "implement the requested change and verify it"
~/.local/bin/uintell-agent task start --remember "implement and remember the decision"
~/.local/bin/uintell-agent task list
~/.local/bin/uintell-agent task show <run-id>
~/.local/bin/uintell-agent task resume <run-id>- Start in Chat with
/task <objective>or in Runs with:new <objective>. - Use
--rememberonly when the run may persist or mutate graph knowledge. - c or Ctrl+G cancels at a checkpoint; r resumes eligible runs.
- Completed tool calls are recorded in a result ledger and are not replayed after interruption.
- Only one process can drive a run at a time.
CLI reference
Commands and global flags
| Command | Purpose |
|---|---|
| serve | Start the authenticated HTTP gateway. |
| init | Initialize graph-memory schema. |
| skills | List installed versioned instruction skills. |
| skill-new | Create a private skill manifest and editable SKILL.md. |
| db | Open the standalone graph operations console. |
| capabilities | Print the active, partial, and planned Rig capability map. |
| doctor | Verify provider, graph, permissions, sandbox, and runtimes. |
| history | List or clear private, project-scoped prompt history. |
| task | Start, list, inspect, or resume durable coding runs. |
| step | Run a visible Rig AgentRun state machine. |
| route | Route a task into an agent mode. |
| chain | Run a prompt chain over a task. |
| orchestrate | Run planner, coder, reviewer, and tester orchestration. |
| evaluate | Run an evaluator/optimizer workflow. |
Global flags
| Flag | Behavior |
|---|---|
| -p, --prompt | Run a single prompt without opening the TUI. |
| --tui | Open the unified terminal interface. |
| --ollama | Use local Ollama instead of DeepSeek. |
| --model | Select the Ollama model. |
| --visible | Show every model turn, tool call, and result for a prompt. |
| --max-turns | Bound visible stepping. Default: 12. |
cargo run -- --help
cargo run -- task --help
cargo run -- serve --helpHTTP gateway
Run UIntellAgent as an authenticated local service
export DEEPSEEK_API_KEY="sk-..."
export UINTELL_API_KEY="replace-with-a-separate-secret"
~/.local/bin/uintell-agent serve --addr 127.0.0.1:3000| Endpoint | Authentication | Purpose |
|---|---|---|
| GET /health | None | Status, version, and process uptime. |
| GET /ready | Required | Provider readiness and degradation state. |
| POST /chat | Required | Send a message with optional in-memory session_id history. |
curl http://127.0.0.1:3000/chat \
-H 'Content-Type: application/json' \
-H 'X-API-Key: replace-with-a-separate-secret' \
-H 'X-Request-Id: example-001' \
-d '{"message":"Inspect this task","session_id":"docs-demo"}'Gateway limits
- Authenticate with
X-API-KeyorAuthorization: Bearer. - 60 requests per minute per API key.
- 120-second model timeout.
- 32,000 characters per message and 128 characters per session ID.
X-Request-Idis accepted or generated automatically.
Permissions
Put policy between model intent and side effects
The file ~/.uintell/permissions.toml is created with workspace-safe defaults when absent.
| Mode | Behavior |
|---|---|
| read-only | No file writes, shell access, network writes, or database writes. |
| workspace | Writes stay inside configured directories; shell calls require both an allow-list match and argument-level policy approval. |
| full-access | Allows actions not explicitly denied; destructive operations can still require confirmation. |
config_version = 1
mode = "workspace"
workspace_dirs = ["."]
allowed_commands = ["ls", "cat", "head", "tail", "rg", "git", "cargo", "code_exec", "npm", "pnpm"]
denied_commands = ["rm -rf /", "dd if=", "mkfs", "shutdown", "reboot", "halt", "poweroff"]
allowed_read_paths = ["/tmp"]
denied_read_paths = ["/etc/shadow", ".ssh", ".aws", ".gnupg", ".kube", ".docker", ".env*", ".netrc", "*.pem", "*.key"]
allowed_write_paths = ["/tmp"]
denied_write_paths = ["/etc", "/boot", "/sys", "/proc", "/dev"]
allowed_hosts = ["api.deepseek.com", "127.0.0.1", "localhost", "duckduckgo.com", "crates.io", "github.com", "raw.githubusercontent.com", "openrouter.ai"]
denied_hosts = []
confirm_destructive = trueDeny rules are evaluated before allow rules. Shell expansion, redirection, interpreters, repository code, and filesystem inspection require confirmation even when a command name appears in the allow list.
Skills
Create and select instruction skills
uintell-agent skill-new release-notes "Generate verified release notes"
$EDITOR "$HOME/.uintell/skills/release-notes/SKILL.md"
uintell-agent --skill release-notes --tui
uintell-agent skillsEach skill stores a format-versioned skill.toml and bounded Markdown instructions. Select up to eight skills explicitly with repeated --skill <name> flags; selected instructions are composed into the agent preamble before execution.
Skill directories and files use private modes, symlink escapes are rejected, and both manifests and instructions are read with byte limits.
Troubleshooting
Diagnose common failures
Provider returns 401 Unauthorized
Replace DEEPSEEK_API_KEY, restart UIntellAgent, and run cargo run -- doctor. Use --ollama when no cloud key should be required.
Graph context reports an error
With the default local URL, the agent starts SurrealDB automatically. Confirm the surreal binary is installed, inspect ~/.uintell/surrealdb.log, and verify UINTELL_DB_URL. SetUINTELL_DB_AUTOSTART=0 only when another service manager owns the database.
Tool confirmation dialog appears
The call did not match an unconditional allow rule or was classified as destructive. Review the exact tool and arguments. Approve through the TUI or repeat a prepared Tools call with :run!. Denied calls cannot be confirmed.
code_exec cannot find a temporary source file
Run the doctor and verify that the language runtime, temporary directory, and Bubblewrap are available and writable.
Editor completion is unavailable
Install rust-analyzer or set UINTELL_LSP_COMMAND and UINTELL_LSP_ARGS for a custom server. The default Rust server intentionally ignores unsupported file types such as TOML.
A run is paused after a crash
Open Runs and resume it, or use cargo run -- task resume <run-id>. Completed ledger entries are not replayed.
cargo run -- doctor
cargo run -- task list
cargo run -- task show <run-id>