@inference-gateway/cli 0.124.1 → 0.126.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +269 -39
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -25,6 +25,7 @@ An agentic command-line assistant that writes code, understands project context,
|
|
|
25
25
|
- [Features](#features)
|
|
26
26
|
- [Installation](#installation)
|
|
27
27
|
- [Quick Start](#quick-start)
|
|
28
|
+
- [Claude Code Mode (Subscription)](#claude-code-mode-subscription)
|
|
28
29
|
- [Commands](#commands)
|
|
29
30
|
- [Tools for LLMs](#tools-for-llms)
|
|
30
31
|
- [Configuration](#configuration)
|
|
@@ -33,6 +34,10 @@ An agentic command-line assistant that writes code, understands project context,
|
|
|
33
34
|
- [Shortcuts](#shortcuts)
|
|
34
35
|
- [Channels (Remote Messaging)](#channels-remote-messaging)
|
|
35
36
|
- [Heartbeat (Periodic Wake-Up)](#heartbeat-periodic-wake-up)
|
|
37
|
+
- [Agent Skills](#agent-skills)
|
|
38
|
+
- [Computer Use](#computer-use)
|
|
39
|
+
- [Persistent Memory](#persistent-memory)
|
|
40
|
+
- [Reminders & Command Hooks](#reminders--command-hooks)
|
|
36
41
|
- [Global Flags](#global-flags)
|
|
37
42
|
- [Examples](#examples)
|
|
38
43
|
- [Development](#development)
|
|
@@ -47,18 +52,19 @@ An agentic command-line assistant that writes code, understands project context,
|
|
|
47
52
|
- **Conversation History**: Store and retrieve past conversations with multiple storage backends
|
|
48
53
|
- [Conversation Storage](docs/conversation-storage.md) - Detailed storage backend documentation
|
|
49
54
|
- [Conversation Title Generation](docs/conversation-title-generation.md) - AI-powered title generation system
|
|
55
|
+
- [Database Migrations](docs/database-migrations.md) - Schema migration system for the SQLite/Postgres backends
|
|
50
56
|
- **Conversation Versioning**: Navigate back in time to previous conversation points (double ESC)
|
|
51
57
|
- View message history with timestamps
|
|
52
58
|
- Restore conversation to any previous user message
|
|
53
59
|
- Permanent deletion of messages after restore point
|
|
54
|
-
- [Learn more →](docs/
|
|
60
|
+
- [Learn more →](docs/conversation-versioning.md)
|
|
55
61
|
- **Configuration Management**: Manage gateway settings via YAML config
|
|
56
62
|
- **Project Initialization**: Set up local project configurations
|
|
57
63
|
- **Tool Execution**: LLMs can execute allowed commands and tools - [See all tools →](docs/tools-reference.md)
|
|
58
64
|
- **Tool Approval System**: User approval workflow for sensitive operations with real-time diff visualization
|
|
59
65
|
- **Agent Modes**: Three operational modes for different workflows:
|
|
60
66
|
- **Standard Mode** (default): Normal operation with all configured tools and approval checks
|
|
61
|
-
- **Plan Mode**: Read-only mode for planning and analysis without execution
|
|
67
|
+
- **Plan Mode**: Read-only mode for planning and analysis without execution - [Learn more →](docs/plan-mode.md)
|
|
62
68
|
- **Auto-Accept Mode**: All tools auto-approved for rapid execution (YOLO mode)
|
|
63
69
|
- Toggle between modes with **Shift+Tab**
|
|
64
70
|
- **Token Usage Tracking**: Accurate token counting with polyfill support for providers that don't return usage metrics
|
|
@@ -83,6 +89,16 @@ An agentic command-line assistant that writes code, understands project context,
|
|
|
83
89
|
recurring ("send me a quote every morning") or one-off ("remind me at 6pm today") - [Learn more →](docs/scheduling.md)
|
|
84
90
|
- **Heartbeat (Periodic Wake-Up)**: Wake the agent on a fixed interval to check for pending todos and background work,
|
|
85
91
|
with a separate configurable system prompt - off by default - [Learn more →](docs/heartbeat.md)
|
|
92
|
+
- **Agent Skills**: Drop-in `SKILL.md` instruction folders the agent discovers and loads on demand;
|
|
93
|
+
install them straight from GitHub with `infer skills install` - on by default - [Learn more →](docs/skills.md)
|
|
94
|
+
- **Persistent Memory**: Cross-session memory stored as individual Markdown fact-files with an
|
|
95
|
+
auto-maintained `MEMORY.md` index that is injected at session start - on by default - [Learn more →](#persistent-memory)
|
|
96
|
+
- **Subagents**: Spawn parallel `infer agent` subprocesses from chat with the `Agent` tool to fan out
|
|
97
|
+
independent work (research, edits, investigations) and fold their results back into the conversation
|
|
98
|
+
- **Computer Use**: Let the agent drive the desktop - mouse, keyboard, screenshots, app focus - across
|
|
99
|
+
macOS, X11, and Wayland - off by default - [Learn more →](#computer-use)
|
|
100
|
+
- **Reminders & Command Hooks**: Inject system reminders or run shell commands at agent-loop hook
|
|
101
|
+
points to enforce project conventions - [Learn more →](#reminders--command-hooks)
|
|
86
102
|
|
|
87
103
|
## Installation
|
|
88
104
|
|
|
@@ -176,7 +192,7 @@ chmod +x infer-darwin-amd64
|
|
|
176
192
|
sudo mv infer-darwin-amd64 /usr/local/bin/infer
|
|
177
193
|
```
|
|
178
194
|
|
|
179
|
-
For advanced verification with Cosign signatures, see [Binary Verification Guide](docs/
|
|
195
|
+
For advanced verification with Cosign signatures, see [Binary Verification Guide](docs/binary-verification.md).
|
|
180
196
|
|
|
181
197
|
### Build from Source
|
|
182
198
|
|
|
@@ -522,7 +538,8 @@ infer agents add custom https://... # Add a custom agent
|
|
|
522
538
|
infer agents list # List all agents
|
|
523
539
|
```
|
|
524
540
|
|
|
525
|
-
For detailed A2A setup, see [A2A Agents Configuration](docs/agents-configuration.md)
|
|
541
|
+
For detailed A2A setup, see [A2A Agents Configuration](docs/agents-configuration.md); for how
|
|
542
|
+
connections are established and tasks polled, see [A2A Connections](docs/a2a-connections.md).
|
|
526
543
|
|
|
527
544
|
### Utility Commands
|
|
528
545
|
|
|
@@ -552,6 +569,24 @@ infer conversation-title generate # Generate titles for all conversations
|
|
|
552
569
|
infer conversation-title status # Show generation status
|
|
553
570
|
```
|
|
554
571
|
|
|
572
|
+
**`infer skills`** - Manage Agent Skills (reusable `SKILL.md` instruction folders)
|
|
573
|
+
|
|
574
|
+
```bash
|
|
575
|
+
infer skills list # List discovered skills
|
|
576
|
+
infer skills install skill-creator # Install a skill from GitHub
|
|
577
|
+
infer skills install acme/internal-comms --user # Install to ~/.infer/skills
|
|
578
|
+
infer skills uninstall pdf # Remove a skill by name
|
|
579
|
+
```
|
|
580
|
+
|
|
581
|
+
See [Agent Skills](#agent-skills) and [docs/skills.md](docs/skills.md) for the format.
|
|
582
|
+
|
|
583
|
+
**`infer export`** - Export a conversation to a Markdown file
|
|
584
|
+
|
|
585
|
+
```bash
|
|
586
|
+
infer conversations list # Find the session ID
|
|
587
|
+
infer export <session-id> # Writes .infer/chat_export_<timestamp>.md
|
|
588
|
+
```
|
|
589
|
+
|
|
555
590
|
**`infer version`** - Display CLI version information
|
|
556
591
|
|
|
557
592
|
```bash
|
|
@@ -564,24 +599,84 @@ When tool execution is enabled, LLMs can use various tools to interact with your
|
|
|
564
599
|
summary of available tools. For detailed documentation, parameters, and examples, see
|
|
565
600
|
[Tools Reference](docs/tools-reference.md).
|
|
566
601
|
|
|
567
|
-
|
|
568
|
-
|
|
569
|
-
|
|
570
|
-
|
|
571
|
-
|
|
572
|
-
|
|
573
|
-
|
|
|
574
|
-
|
|
|
575
|
-
| **
|
|
576
|
-
| **
|
|
577
|
-
| **
|
|
578
|
-
| **
|
|
579
|
-
| **
|
|
580
|
-
| **
|
|
581
|
-
| **
|
|
582
|
-
|
|
583
|
-
|
|
584
|
-
|
|
602
|
+
Tools are grouped by category below. Many are gated behind a config flag (noted per group);
|
|
603
|
+
the always-available set is registered for every session. There is **no built-in GitHub tool** -
|
|
604
|
+
use the `gh` CLI through Bash (or the built-in `/scm` shortcuts) for GitHub operations.
|
|
605
|
+
|
|
606
|
+
**Core file & search** (always available):
|
|
607
|
+
|
|
608
|
+
| Tool | Purpose | Approval |
|
|
609
|
+
| ------ | --------- | ---------- |
|
|
610
|
+
| **Read** | Read file contents with line ranges | No |
|
|
611
|
+
| **Write** | Write content to files | Yes |
|
|
612
|
+
| **Edit** | Exact string replacements in files | Yes |
|
|
613
|
+
| **MultiEdit** | Multiple atomic edits to a single file | Yes |
|
|
614
|
+
| **Delete** | Delete files and directories | Yes |
|
|
615
|
+
| **Grep** | Search files with regex (ripgrep/Go) | No |
|
|
616
|
+
| **Tree** | Display directory structure | No |
|
|
617
|
+
|
|
618
|
+
**Shell** (Bash is always available; the background-shell trio needs `tools.bash.background_shells.enabled`):
|
|
619
|
+
|
|
620
|
+
| Tool | Purpose | Approval |
|
|
621
|
+
| ------ | --------- | ---------- |
|
|
622
|
+
| **Bash** | Execute shell commands (per-mode allow-list) | Optional |
|
|
623
|
+
| **BashOutput** | Read new output from a running background shell | Yes |
|
|
624
|
+
| **KillShell** | Terminate a background shell | Yes |
|
|
625
|
+
| **ListShells** | List background shells and their state | Yes |
|
|
626
|
+
|
|
627
|
+
**Task & planning** (`AskUserQuestion` needs `tools.ask_user_question.enabled`):
|
|
628
|
+
|
|
629
|
+
| Tool | Purpose | Approval |
|
|
630
|
+
| ------ | --------- | ---------- |
|
|
631
|
+
| **TodoWrite** | Create and manage task lists | No |
|
|
632
|
+
| **RequestPlanApproval** | Submit a plan for approval and persist it (plan mode) | No |
|
|
633
|
+
| **AskUserQuestion** | Ask the user multiple-choice questions (plan mode) | No |
|
|
634
|
+
|
|
635
|
+
**Web** (`WebSearch`/`WebFetch` need their respective config flag):
|
|
636
|
+
|
|
637
|
+
| Tool | Purpose | Approval |
|
|
638
|
+
| ------ | --------- | ---------- |
|
|
639
|
+
| **WebSearch** | Search the web (DuckDuckGo/Google) | Yes |
|
|
640
|
+
| **WebFetch** | Fetch content from a URL | Yes |
|
|
641
|
+
|
|
642
|
+
**Subagents** (the `Agent` tool and its companions, enabled by default):
|
|
643
|
+
|
|
644
|
+
| Tool | Purpose | Approval |
|
|
645
|
+
| ------ | --------- | ---------- |
|
|
646
|
+
| **Agent** | Spawn an `infer agent` subprocess to run work in parallel | Yes |
|
|
647
|
+
| **ListSubagents** | List spawned subagents and their status | No |
|
|
648
|
+
| **GetSubagentResult** | Re-read a finished subagent's last message | No |
|
|
649
|
+
| **ReadSubagentScreen** | Capture an interactive subagent's terminal screen | No |
|
|
650
|
+
| **SendSubagentInput** | Type into an interactive subagent's TUI | Yes |
|
|
651
|
+
| **CloseSubagent** | Stop a subagent or tidy a finished pane | Yes |
|
|
652
|
+
| **ApproveSubagent** | Relay an approval decision to a waiting subagent | Yes |
|
|
653
|
+
|
|
654
|
+
**Computer Use** (require `computer_use.enabled`; these bypass the approval prompt and run silently):
|
|
655
|
+
|
|
656
|
+
| Tool | Purpose | Approval |
|
|
657
|
+
| ------ | --------- | ---------- |
|
|
658
|
+
| **MouseMove** / **MouseClick** / **MouseScroll** | Control the mouse | No |
|
|
659
|
+
| **KeyboardType** | Type text or send key combinations | No |
|
|
660
|
+
| **GetFocusedApp** / **ActivateApp** | Query or focus an application | No |
|
|
661
|
+
| **GetLatestScreenshot** | Read the latest streamed screenshot | No |
|
|
662
|
+
|
|
663
|
+
**Memory, scheduling & A2A** (each gated by its own flag):
|
|
664
|
+
|
|
665
|
+
| Tool | Purpose | Approval | Enabled by |
|
|
666
|
+
| ------ | --------- | ---------- | ------------ |
|
|
667
|
+
| **Memory** | Persistent, cross-session fact storage | No | `memory.enabled` (default on) |
|
|
668
|
+
| **Schedule** | Cron-driven recurring/one-off tasks via the originating channel | Yes | `tools.schedule.enabled` |
|
|
669
|
+
| **A2A_SubmitTask** | Submit a task to an A2A agent | Yes | A2A enabled |
|
|
670
|
+
| **A2A_QueryAgent** | Query an A2A agent's capabilities | No | A2A enabled |
|
|
671
|
+
| **A2A_QueryTask** | Check an A2A task's status | No | A2A enabled |
|
|
672
|
+
|
|
673
|
+
> **Approval** reflects the default policy. The global default is `tools.safety.require_approval: true`,
|
|
674
|
+
> so a tool is **No** only where it is explicitly exempt in code (read-only file/search tools, Memory,
|
|
675
|
+
> the plan/question tools, subagent reads, and computer-use). Bash is governed instead by the per-mode
|
|
676
|
+
> bash allow-list. Override any tool with `tools.<name>.require_approval`.
|
|
677
|
+
>
|
|
678
|
+
> **MCP tools** are not listed here - they are discovered and registered dynamically at runtime from your
|
|
679
|
+
> configured MCP servers and surface as `MCP_<server>_<tool>` (see [MCP Integration](docs/mcp-integration.md)).
|
|
585
680
|
|
|
586
681
|
**Tool Configuration:**
|
|
587
682
|
|
|
@@ -833,16 +928,20 @@ When a tool requiring approval is executed:
|
|
|
833
928
|
|
|
834
929
|
### Default Approval Requirements
|
|
835
930
|
|
|
931
|
+
The global default is `tools.safety.require_approval: true`, so **any tool not explicitly exempt requires
|
|
932
|
+
approval**; override per tool with `tools.<name>.require_approval`.
|
|
933
|
+
|
|
836
934
|
| Tool | Requires Approval | Reason |
|
|
837
935
|
| ------ | ------------------- | --------- |
|
|
838
|
-
| Write | Yes |
|
|
839
|
-
|
|
|
840
|
-
|
|
|
841
|
-
|
|
|
842
|
-
| Bash | Optional |
|
|
936
|
+
| Write, Edit, MultiEdit, Delete | Yes | Create / modify / remove files |
|
|
937
|
+
| Schedule, Agent | Yes | Side effects (scheduled jobs, spawned subprocesses) |
|
|
938
|
+
| WebSearch, WebFetch | Yes | Make external requests (global default) |
|
|
939
|
+
| A2A_SubmitTask | Yes | Dispatches work to another agent |
|
|
940
|
+
| Bash | Optional | Governed by the per-mode bash allow-list |
|
|
843
941
|
| Read, Grep, Tree | No | Read-only operations |
|
|
844
|
-
|
|
|
845
|
-
|
|
|
942
|
+
| Memory, TodoWrite | No | Local agent state (explicitly exempt) |
|
|
943
|
+
| Computer-use tools | No | Run silently in the background |
|
|
944
|
+
| A2A_QueryAgent, A2A_QueryTask | No | Read-only A2A queries |
|
|
846
945
|
|
|
847
946
|
### Approval Configuration
|
|
848
947
|
|
|
@@ -882,18 +981,32 @@ actions.
|
|
|
882
981
|
|
|
883
982
|
### Built-in Shortcuts
|
|
884
983
|
|
|
885
|
-
**
|
|
984
|
+
**Conversation & session:**
|
|
886
985
|
|
|
887
|
-
- `/
|
|
888
|
-
- `/
|
|
889
|
-
- `/
|
|
890
|
-
- `/
|
|
891
|
-
- `/
|
|
986
|
+
- `/new [title]` - Start a new conversation (optionally titled)
|
|
987
|
+
- `/clear` - Save the current conversation and start a new one
|
|
988
|
+
- `/compact` - Save the conversation and start a new session seeded with a summary
|
|
989
|
+
- `/conversations` - Open the conversation selection dropdown
|
|
990
|
+
- `/context` - Show context-window usage
|
|
892
991
|
- `/cost` - Show session cost breakdown with per-model details
|
|
893
|
-
- `/
|
|
894
|
-
- `/
|
|
895
|
-
- `/
|
|
896
|
-
- `/
|
|
992
|
+
- `/copy [text|markdown|json]` - Copy the conversation to the clipboard (aliases: `txt`, `md`)
|
|
993
|
+
- `/model [model-name] [prompt]` - Switch model, or run a single prompt against a specific model then restore
|
|
994
|
+
- `/theme` - Switch chat theme
|
|
995
|
+
- `/voice [seconds]` - Record from the microphone and transcribe to the input with Whisper (requires `speech_to_text.enabled`)
|
|
996
|
+
- `/help [shortcut]` - Show available shortcuts
|
|
997
|
+
- `/exit` - Exit the chat session
|
|
998
|
+
|
|
999
|
+
**Panels & views:**
|
|
1000
|
+
|
|
1001
|
+
- `/diff` - Open the changes panel (interactive diff viewer)
|
|
1002
|
+
- `/explorer` - Open the file explorer (tree + fuzzy finder) - [Learn more →](docs/explorer.md)
|
|
1003
|
+
- `/tasks` - Show the A2A task-management interface (requires A2A) - [Learn more →](docs/tasks-management.md)
|
|
1004
|
+
- `/release-notes [version]` - Show release notes from GitHub Releases (latest, or a specific version)
|
|
1005
|
+
|
|
1006
|
+
**Project setup:**
|
|
1007
|
+
|
|
1008
|
+
- `/init` - Generate an `AGENTS.md` by analyzing the project
|
|
1009
|
+
- `/init-github-action` - Set up a GitHub Action via an interactive wizard
|
|
897
1010
|
|
|
898
1011
|
**Git Shortcuts** (created by `infer init`):
|
|
899
1012
|
|
|
@@ -908,6 +1021,15 @@ actions.
|
|
|
908
1021
|
- `/scm issue <number>` - Show issue details
|
|
909
1022
|
- `/scm pr-create [context]` - Generate AI-powered PR plan
|
|
910
1023
|
|
|
1024
|
+
**Other Shortcuts** (created by `infer init`):
|
|
1025
|
+
|
|
1026
|
+
- `/mcp [list|add|remove|enable|disable]` - Manage MCP servers
|
|
1027
|
+
- `/shells` - List running and recent background shell processes
|
|
1028
|
+
- `/export` - Export the current conversation to markdown
|
|
1029
|
+
- `/env` - Generate a `.env.example` with all provider API keys
|
|
1030
|
+
- `/agents [list|add|remove|enable|disable]` - Manage A2A agents
|
|
1031
|
+
- `/skills [list|install|uninstall]` - Manage Agent Skills
|
|
1032
|
+
|
|
911
1033
|
### AI-Powered Snippets
|
|
912
1034
|
|
|
913
1035
|
Create shortcuts that use LLMs to transform data:
|
|
@@ -1156,6 +1278,98 @@ export INFER_HEARTBEAT_INTERVAL=30m
|
|
|
1156
1278
|
For the full guide, including configuration reference and common
|
|
1157
1279
|
patterns (TODO sweeps, CI watchdogs), see [Heartbeat Documentation](docs/heartbeat.md).
|
|
1158
1280
|
|
|
1281
|
+
## Agent Skills
|
|
1282
|
+
|
|
1283
|
+
Agent Skills are reusable, model-readable instruction folders. Each skill is a folder containing a
|
|
1284
|
+
`SKILL.md` file with YAML frontmatter (`name`, `description`) - the same contract used by the open
|
|
1285
|
+
`.agents/skills/` standard, so existing skill folders drop in unchanged. The agent discovers skills at
|
|
1286
|
+
startup and loads a skill's full instructions on demand when they are relevant.
|
|
1287
|
+
|
|
1288
|
+
Skills are scanned from three locations (highest precedence first; first match wins on a name collision):
|
|
1289
|
+
|
|
1290
|
+
- `.infer/skills/<name>/SKILL.md` - project
|
|
1291
|
+
- `.agents/skills/<name>/SKILL.md` - open standard
|
|
1292
|
+
- `~/.infer/skills/<name>/SKILL.md` - user-global
|
|
1293
|
+
|
|
1294
|
+
Skills are **enabled by default**; disable with `agent.skills.enabled=false` (or `INFER_AGENT_SKILLS_ENABLED=false`).
|
|
1295
|
+
|
|
1296
|
+
```bash
|
|
1297
|
+
infer skills list # Discover skills (works even when disabled)
|
|
1298
|
+
infer skills install skill-creator # Install from github.com/inference-gateway/skills
|
|
1299
|
+
infer skills install acme/internal-comms # Install from github.com/acme/skills
|
|
1300
|
+
infer skills uninstall pdf # Remove a skill folder by name
|
|
1301
|
+
```
|
|
1302
|
+
|
|
1303
|
+
`install` accepts a skill name, an `org/skill` pair, or a full GitHub tree URL; set `GITHUB_TOKEN`
|
|
1304
|
+
(or `GH_TOKEN`) to raise the rate limit and reach private repositories. See
|
|
1305
|
+
[docs/skills.md](docs/skills.md) for the authoring format.
|
|
1306
|
+
|
|
1307
|
+
## Computer Use
|
|
1308
|
+
|
|
1309
|
+
When enabled, the agent can control the desktop - move and click the mouse, scroll, type text and key
|
|
1310
|
+
combinations, focus applications, and read screenshots. The display backend is detected automatically
|
|
1311
|
+
across **macOS** (via a bundled Swift bridge), **X11**, and **Wayland**.
|
|
1312
|
+
|
|
1313
|
+
Computer Use is **off by default**. Turn it on in `computer_use.yaml` (or `infer config set computer_use.enabled true`):
|
|
1314
|
+
|
|
1315
|
+
```yaml
|
|
1316
|
+
# .infer/computer_use.yaml
|
|
1317
|
+
enabled: true
|
|
1318
|
+
rate_limit:
|
|
1319
|
+
enabled: true
|
|
1320
|
+
screenshot:
|
|
1321
|
+
streaming_enabled: true # also registers the GetLatestScreenshot tool
|
|
1322
|
+
```
|
|
1323
|
+
|
|
1324
|
+
Tools: `MouseMove`, `MouseClick`, `MouseScroll`, `KeyboardType`, `GetFocusedApp`, `ActivateApp`, and
|
|
1325
|
+
`GetLatestScreenshot`. They run silently in the background (bypassing the approval prompt) and are
|
|
1326
|
+
governed by `computer_use.enabled` plus the configured rate limits. On macOS an optional **floating
|
|
1327
|
+
progress window** can mirror what the agent is doing. For a sandboxed desktop to drive, see
|
|
1328
|
+
[examples/computer-use](examples/computer-use/).
|
|
1329
|
+
|
|
1330
|
+
## Persistent Memory
|
|
1331
|
+
|
|
1332
|
+
The agent keeps a durable, cross-session memory: individual Markdown **fact-files** under a global
|
|
1333
|
+
directory (`~/.infer/memory` by default), catalogued by a `MEMORY.md` index. The index is injected
|
|
1334
|
+
into context at session start, and the agent reads or writes individual facts on demand through the
|
|
1335
|
+
`Memory` tool. A session reminder nudges it to consult and keep memory up to date.
|
|
1336
|
+
|
|
1337
|
+
Memory is **enabled by default**. Configure it in `memory.yaml`:
|
|
1338
|
+
|
|
1339
|
+
```yaml
|
|
1340
|
+
# .infer/memory.yaml
|
|
1341
|
+
enabled: true
|
|
1342
|
+
dir: "" # "" => ~/.infer/memory
|
|
1343
|
+
max_chars: 4000 # cap on the injected MEMORY.md index
|
|
1344
|
+
```
|
|
1345
|
+
|
|
1346
|
+
Turn it off with `memory.enabled=false` (or `INFER_MEMORY_ENABLED=false`); the memory-consult
|
|
1347
|
+
reminder below is pruned automatically when memory is disabled.
|
|
1348
|
+
|
|
1349
|
+
## Reminders & Command Hooks
|
|
1350
|
+
|
|
1351
|
+
Two lightweight extension points fire at fixed **agent-loop hook points** - `pre_session`,
|
|
1352
|
+
`pre_stream`, `post_stream`, `pre_tool`, `post_tool`, `pre_queue_drain`, `post_queue_drain`, and
|
|
1353
|
+
`post_session`:
|
|
1354
|
+
|
|
1355
|
+
- **Reminders** (`reminders.yaml`) inject a `<system-reminder>` text block at a hook point, gated by a
|
|
1356
|
+
trigger (`always`, `interval`, `turns_before_max`, or `once`). Reminders ship **enabled** with two
|
|
1357
|
+
defaults: `todo-hygiene` (nudges the agent to keep a todo list) and `memory-consult` (points it at
|
|
1358
|
+
the memory index; auto-pruned when memory is off).
|
|
1359
|
+
- **Command Hooks** (`hooks.yaml`) run a shell command at a hook point - the executable sibling of
|
|
1360
|
+
reminders. They are **off by default**; each command still faces the per-mode bash allow-list when
|
|
1361
|
+
the agent runs it, so allow-list the command and set `enabled: true` to turn hooks on.
|
|
1362
|
+
|
|
1363
|
+
```yaml
|
|
1364
|
+
# .infer/hooks.yaml
|
|
1365
|
+
enabled: true
|
|
1366
|
+
hooks:
|
|
1367
|
+
- name: gofmt
|
|
1368
|
+
hook: post_session
|
|
1369
|
+
command: "gofmt -w ."
|
|
1370
|
+
timeout: 30 # seconds; 0 -> default 30
|
|
1371
|
+
```
|
|
1372
|
+
|
|
1159
1373
|
## Global Flags
|
|
1160
1374
|
|
|
1161
1375
|
- `-v, --verbose`: Enable verbose output
|
|
@@ -1163,6 +1377,22 @@ patterns (TODO sweeps, CI watchdogs), see [Heartbeat Documentation](docs/heartbe
|
|
|
1163
1377
|
|
|
1164
1378
|
## Examples
|
|
1165
1379
|
|
|
1380
|
+
### Docker Compose Examples
|
|
1381
|
+
|
|
1382
|
+
Each directory under [`examples/`](examples/) is a self-contained, runnable setup with its own README
|
|
1383
|
+
and Docker Compose file:
|
|
1384
|
+
|
|
1385
|
+
| Example | Demonstrates |
|
|
1386
|
+
| --------- | -------------- |
|
|
1387
|
+
| [basic](examples/basic/) | Minimal gateway + CLI setup to get started |
|
|
1388
|
+
| [a2a](examples/a2a/) | Agent-to-Agent: multiple agents, a demo site, and a VNC container |
|
|
1389
|
+
| [mcp](examples/mcp/) | MCP server integration with a sample server and config |
|
|
1390
|
+
| [computer-use](examples/computer-use/) | Computer Use driving a sandboxed Ubuntu GUI container |
|
|
1391
|
+
| [model-switching](examples/model-switching/) | Switching models mid-session, with a small frontend |
|
|
1392
|
+
| [shortcuts](examples/shortcuts/) | Custom `/`-shortcuts wired through config |
|
|
1393
|
+
| [web-terminal](examples/web-terminal/) | Browser-based, multi-tab web terminal |
|
|
1394
|
+
| [telegram-channel](examples/telegram-channel/) | Driving the agent from a Telegram channel |
|
|
1395
|
+
|
|
1166
1396
|
### Basic Workflow
|
|
1167
1397
|
|
|
1168
1398
|
```bash
|