Adjusted documentation format to work for Wikis

2026-05-05 14:31:53 -06:00
parent b5fb398d8f
commit ce96f27240
72 changed files with 87 additions and 87 deletions
+1 -1
@@ -206,5 +206,5 @@ Here's how to migrate your functions over to Loki from the `llm-functions` repos
patch_file
```
Refer to the [custom bash tools docs](./function-calling/Custom-Bash-Tools.md) to learn how to compile and test bash
Refer to the [custom bash tools docs](Custom-Bash-Tools) to learn how to compile and test bash
tools in Loki without needing to use `argc`.
+10 -10
@@ -1,8 +1,8 @@
Agents in Loki follow the same style as OpenAI's GPTs. They consist of 3 parts:
* [Role](./Roles.md) - Tell the LLM how to behave
* [RAG](./RAG.md) - Pre-built knowledge bases specifically for the agent
* [Function Calling](./function-calling/Tools.md#tools) ([#2](./function-calling/MCP-Servers.md)) - Extends the functionality of the LLM through custom functions it can call
* [Role](Roles) - Tell the LLM how to behave
* [RAG](RAG) - Pre-built knowledge bases specifically for the agent
* [Function Calling](Tools#tools) ([#2](MCP-Servers)) - Extends the functionality of the LLM through custom functions it can call
![Agent example](./images/agents/sql.gif)
@@ -101,7 +101,7 @@ variables: # An array of optional variables that the agent expect
## Static Instructions
By default, Loki agents use statically defined instructions. Think of them as being identical to the instructions for a
[role](./Roles.md#instructions), because they virtually are.
[role](Roles#instructions), because they virtually are.
**Example:**
```yaml
@@ -294,7 +294,7 @@ documents:
```
These documents use the same syntax as those you'd define when constructing RAG normally. To see all the available types
of documents that Loki supports and how to use custom document loaders, refer to the [RAG documentation](./RAG.md#supported-document-sources).
of documents that Loki supports and how to use custom document loaders, refer to the [RAG documentation](RAG#supported-document-sources).
Anytime your agent starts up, it will automatically be using the RAG you've defined here.
@@ -354,7 +354,7 @@ def get_ip_address_from_aws():
Loki automatically compiles these as separate functions for the LLM to call. No extra work is needed. Just make sure you
follow all the same steps to define each function as you would when creating custom Python tools.
For more information on how to build tools in Python, refer to the [custom Python tools documentation](./function-calling/Custom-Tools.md#custom-python-based-tools)
For more information on how to build tools in Python, refer to the [custom Python tools documentation](Custom-Tools#custom-python-based-tools)
## Bash-Based Agent Tools
Bash-based agent tools are virtually identical to custom bash tools, with only one difference. Instead of defining a
@@ -393,8 +393,8 @@ $ ./tools.sh get_ip_address_from_aws
All other special annotations (`@env`, `@arg`, `@option` `@flags`) apply to subcommands as well, so be sure to follow
the same syntax ad formatting as is used to create custom bash tools globally.
For more information on how to write, [build and test](function-calling/Custom-Bash-Tools.md#execute-and-test-your-bash-tools) tools in bash, refer to the
[custom bash tools documentation](function-calling/Custom-Bash-Tools.md).
For more information on how to write, [build and test](Custom-Bash-Tools#execute-and-test-your-bash-tools) tools in bash, refer to the
[custom bash tools documentation](Custom-Bash-Tools).
## TypeScript-Based Agent Tools
TypeScript-based agent tools work exactly the same as TypeScript global tools. Instead of a single `run` function,
@@ -443,7 +443,7 @@ export function _instructions(): string {
}
```
For more information on how to build tools in TypeScript, refer to the [custom TypeScript tools documentation](function-calling/Custom-Tools.md#custom-typescript-based-tools).
For more information on how to build tools in TypeScript, refer to the [custom TypeScript tools documentation](Custom-Tools#custom-typescript-based-tools).
# 5. Conversation Starters
It's often helpful to also have some conversation starters so users know what kinds of things the agent is capable of
@@ -507,7 +507,7 @@ inject_todo_instructions: true # Include the default todo instructions into pr
- Workflows requiring guaranteed completion of all steps
For complete documentation including all configuration options, tool details, and best practices, see the
[Todo System Guide](./TODO-System.md).
[Todo System Guide](TODO-System).
# 7. Sub-Agent Spawning System
@@ -34,7 +34,7 @@ Below are the built-in bash prompt helpers that can be used to enhance user inte
## input
Prompt for text input
![Prompt Utils Input](../images/tools/prompt-utils-input.png)
![Prompt Utils Input](./images/tools/prompt-utils-input.png)
**Example With Validation:**
```bash
@@ -49,7 +49,7 @@ text=$(input "Please enter something:" 2>/dev/tty)
## confirm
Show a confirm dialog with options for yes/no
![Prompt Utils Confirm](../images/tools/prompt-utils-confirm.png)
![Prompt Utils Confirm](./images/tools/prompt-utils-confirm.png)
**Example:**
```bash
@@ -61,7 +61,7 @@ if [[ $confirmed == "0" ]]; then echo "No"; else echo "Yes"; fi
Renders a text based list of options that can be selected by the user using up, down, and enter
keys that then returns the chosen option.
![Prompt Utils List](../images/tools/prompt-utils-list.png)
![Prompt Utils List](./images/tools/prompt-utils-list.png)
**Example:**
```bash
@@ -74,7 +74,7 @@ echo "Your choice: ${options[$choice]}"
Render a text based list of options, where multiple options can be selected by the user using down, up,
and enter keys that then returns the chosen options.
![Prompt Utils Checkbox](../images/tools/prompt-utils-checkbox.png)
![Prompt Utils Checkbox](./images/tools/prompt-utils-checkbox.png)
**Example:**
```bash
@@ -86,7 +86,7 @@ echo "Your choices: ${checked}"
## password
Show a password prompt displaying stars for each character typed.
![Prompt Utils Password](../images/tools/prompt-utils-password.png)
![Prompt Utils Password](./images/tools/prompt-utils-password.png)
**Example With Validation:**
```bash
@@ -117,7 +117,7 @@ echo -e "You wrote:\n${text}"
Evaluate the given prompt command with validation. This prompts the user for input until the
validation functions returns 0.
![Prompt Utils With-validate](../images/tools/prompt-utils-with-validate.png)
![Prompt Utils With-validate](./images/tools/prompt-utils-with-validate.png)
**Example:**
```bash
@@ -137,7 +137,7 @@ pass=$(with_validate 'password "Enter random password"' validate_password 2>/dev
## validate_present
Validate that the prompt returned a value.
![Prompt Utils Validate-Present](../images/tools/prompt-utils-validate-present.png)
![Prompt Utils Validate-Present](./images/tools/prompt-utils-validate-present.png)
**Example:**
```bash
@@ -211,27 +211,27 @@ new_contents="$(patch_file "$path" file.patch)"
## error
Log an error
![Prompt Utils Error](../images/tools/prompt-utils-error.png)
![Prompt Utils Error](./images/tools/prompt-utils-error.png)
## warn
Log a warning
![Prompt Utils Warning](../images/tools/prompt-utils-warning.png)
![Prompt Utils Warning](./images/tools/prompt-utils-warning.png)
## info
Log info
![Prompt Utils Info](../images/tools/prompt-utils-info.png)
![Prompt Utils Info](./images/tools/prompt-utils-info.png)
## debug
Log a debug message
![Prompt Utils Debug](../images/tools/prompt-utils-debug.png)
![Prompt Utils Debug](./images/tools/prompt-utils-debug.png)
## trace
Log a trace message
![Prompt Utils Trace](../images/tools/prompt-utils-trace.png)
![Prompt Utils Trace](./images/tools/prompt-utils-trace.png)
## Colored Output
The following commands allow users to output text in specific colors.
+7 -7
@@ -47,7 +47,7 @@ available settings are listed below:
| `name` | The name of the client (e.g. `openai`, `gemini`, etc.) |
| `auth` | Authentication method: `oauth` for OAuth, or omit to use `api_key` (see [Authentication](#authentication)) |
| `models` | See the [model settings](#model-settings) documentation below |
| `patch` | See the [client patch configuration](./Patches.md#client-configuration-patches) documentation |
| `patch` | See the [client patch configuration](Patches#client-configuration-patches) documentation |
| `extra` | See the [extra settings](#extra-settings) documentation below |
Be sure to also check provider-specific configurations for any extra fields that are added for authentication purposes.
@@ -62,7 +62,7 @@ The `models` array lists the available models from the model client. Each one ha
| `type` | * | `all` | The type of model. Loki supports only 3 types of models: <ul><li>`chat`</li><li>`embedding`</li><li>`reranker`</li></ul> |
| `input_price` | | `all` | The cost in USD per 1M tokens for each input sequence; Loki will keep track of usage costs if this is defined |
| `output_price` | | `all` | The cost in USD per 1M tokens of the model output; Loki will keep track of usage costs if this is defined |
| `patch` | | `all` | See the [model-specific patch configuration](./Patches.md#model-specific-patches) documentation |
| `patch` | | `all` | See the [model-specific patch configuration](Patches#model-specific-patches) documentation |
| `max_input_tokens` | | `all` | The maximum number of input tokens for the model |
| `max_output_tokens` | | `chat` | The maximum number of output tokens for the model |
| `require_max_tokens` | | `chat` | Whether to enforce the `max_output_tokens` constraint. |
@@ -83,7 +83,7 @@ must use one or the other.
## API Key Authentication
Most clients authenticate using an API key. Simply set the `api_key` field directly or inject it from the
[Loki vault](../Vault.md):
[Loki vault](Vault):
```yaml
clients:
@@ -92,7 +92,7 @@ clients:
```
API keys can also be provided via environment variables named `{CLIENT_NAME}_API_KEY` (e.g. `OPENAI_API_KEY`,
`GEMINI_API_KEY`). See the [environment variables documentation](../Environment-Variables.md#client-related-variables)
`GEMINI_API_KEY`). See the [environment variables documentation](Environment-Variables#client-related-variables)
for details.
## OAuth Authentication
@@ -144,12 +144,12 @@ to be used as a simple CLI. As such, there's no terms of service or privacy poli
cannot verify Loki.
So, when you kick off OAuth with Gemini, you may see a page similar to the following:
![](../images/clients/gemini-oauth-page.png)
![](./images/clients/gemini-oauth-page.png)
Simply click the `Advanced` link and click `Go to Loki (unsafe)` to continue the OAuth flow.
![](../images/clients/gemini-oauth-unverified.png)
![](../images/clients/gemini-oauth-unverified-allow.png)
![](./images/clients/gemini-oauth-unverified.png)
![](./images/clients/gemini-oauth-unverified-allow.png)
**Step 3: Use normally**
@@ -291,4 +291,4 @@ users.
To accommodate this, Loki provides a set of prompt helper functions that can be referenced and used within your Bash
tools.
For more information, refer to the [Bash Prompt Helpers documentation](Bash-Prompt-Helpers.md).
For more information, refer to the [Bash Prompt Helpers documentation](Bash-Prompt-Helpers).
@@ -21,7 +21,7 @@ loki --info | grep functions_dir | awk '{print $2}'
```
Once you've created your custom tool, remember to add it to the `visible_tools` array in your global `config.yaml` file
to enable it globally. See the [Tools](Tools.md#enablingdisabling-global-tools) documentation for more information on how Loki utilizes the
to enable it globally. See the [Tools](Tools#enablingdisabling-global-tools) documentation for more information on how Loki utilizes the
`visible_tools` array.
## Environment Variables
@@ -38,7 +38,7 @@ Loki also searches the tools directory on startup for a `.env` file. If found, a
the environment variables defined in the `.env` file available to them.
## Custom Bash-Based Tools
To create a Bash-based tool, refer to the [custom bash tools documentation](Custom-Bash-Tools.md).
To create a Bash-based tool, refer to the [custom bash tools documentation](Custom-Bash-Tools).
## Custom Python-Based Tools
Loki supports tools written in Python.
+3 -3
@@ -13,7 +13,7 @@ loki --list-secrets
# Authentication
Each client in your configuration needs authentication (with a few exceptions; e.g. ollama). Most clients use an API key
(set via `api_key` in the config or through the [vault](./Vault.md)). For providers that support OAuth (e.g. Claude Pro/Max
(set via `api_key` in the config or through the [vault](Vault)). For providers that support OAuth (e.g. Claude Pro/Max
subscribers, Google Gemini), you can authenticate with your existing subscription instead:
```yaml
@@ -29,7 +29,7 @@ loki --authenticate my-claude-oauth
# Or via the REPL: .authenticate
```
For full details, see the [authentication documentation](./clients/Clients.md#authentication).
For full details, see the [authentication documentation](Clients#authentication).
# Configuration
The location of the global Loki configuration varies between systems, so you can use the following command to find your
@@ -70,7 +70,7 @@ shown below:
| Setting | Description |
|-----------------|-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| `repl_prelude` | This setting lets you specify a default `session` or `role` to use when starting Loki in [REPL](./REPL.md) mode. <br>Values can be <ul><li>`role:<name>` to define a role</li><li>`session:<name>` to define a session</li><li>`<session>:<role>` to define both a session and a role to use</li></ul> |
| `repl_prelude` | This setting lets you specify a default `session` or `role` to use when starting Loki in [REPL](REPL) mode. <br>Values can be <ul><li>`role:<name>` to define a role</li><li>`session:<name>` to define a session</li><li>`<session>:<role>` to define both a session and a role to use</li></ul> |
| `cmd_prelude` | This setting lets you specify a default `session` or `role` to use when running one-off queries in Loki via the CLI. <br>Values can be <ul><li>`role:<name>` to define a role</li><li>`session:<name>` to define a session</li><li>`<session>:<role>` to define both a session and a role to use</li></ul> |
| `agent_session` | This setting is used to specify a default session that all agents should start into, unless otherwise specified in the agent configuration. (e.g. `temp`, `default`) |
+27 -27
@@ -15,36 +15,36 @@ in as little time as possible.
![Agent example](./docs/images/agents/sql.gif)
Coming from [AIChat](https://github.com/sigoden/aichat)? Follow the [migration guide](./docs/AIChat-Migration.md) to get started.
Coming from [AIChat](https://github.com/sigoden/aichat)? Follow the [migration guide](AIChat-Migration) to get started.
---
# Quick Links
* [AIChat Migration Guide](./docs/AIChat-Migration.md): Coming from AIChat? Follow the migration guide to get started.
* [Installation](./docs/Installation.md): Install Loki
* [Getting Started](./docs/Getting-Started.md): Get started with Loki by doing first-run setup steps, and learn the basics.
* [REPL](./docs/REPL.md): Interactive Read-Eval-Print Loop for conversational interactions with LLMs and Loki.
* [Custom REPL Prompt](./docs/REPL-Prompt.md): Customize the REPL prompt to provide useful contextual information.
* [Vault](./docs/VAULT.md): Securely store and manage sensitive information such as API keys and credentials.
* [Shell Integrations](./docs/Shell-Integrations.md): Seamlessly integrate Loki with your shell environment for enhanced command-line assistance.
* [Function Calling](./docs/function-calling/Tools.md#Tools): Leverage function calling capabilities to extend Loki's functionality with custom tools
* [Creating Custom Tools](./docs/function-calling/Custom-Tools.md): You can create your own custom tools to enhance Loki's capabilities.
* [Create Custom Python Tools](./docs/function-calling/Custom-Tools.md#custom-python-based-tools)
* [Create Custom TypeScript Tools](./docs/function-calling/Custom-Tools.md#custom-typescript-based-tools)
* [Create Custom Bash Tools](./docs/function-calling/Custom-Bash-Tools.md)
* [Bash Prompt Utilities](./docs/function-calling/Bash-Prompt-Helpers.md)
* [First-Class MCP Server Support](./docs/function-calling/MCP-Servers.md): Easily connect and interact with MCP servers for advanced functionality.
* [Macros](./docs/Macros.md): Automate repetitive tasks and workflows with Loki "scripts" (macros).
* [RAG](./docs/RAG.md): Retrieval-Augmented Generation for enhanced information retrieval and generation.
* [Sessions](/docs/Sessions.md): Manage and persist conversational contexts and settings across multiple interactions.
* [Roles](./docs/Roles.md): Customize model behavior for specific tasks or domains.
* [Agents](/docs/Agents.md): Leverage AI agents to perform complex tasks and workflows, including sub-agent spawning, teammate messaging, and user interaction tools.
* [Todo System](./docs/TODO-System.md): Built-in task tracking for improved agent reliability with smaller models.
* [Environment Variables](./docs/Environment-Variables.md): Override and customize your Loki configuration at runtime with environment variables.
* [Client Configurations](./docs/clients/Clients.md): Configuration instructions for various LLM providers.
* [Authentication (API Key & OAuth)](./docs/clients/Clients.md#authentication): Authenticate with API keys or OAuth for subscription-based access.
* [Patching API Requests](./docs/clients/Patches.md): Learn how to patch API requests for advanced customization.
* [Custom Themes](./docs/Themes.md): Change the look and feel of Loki to your preferences with custom themes.
* [AIChat Migration Guide](AIChat-Migration): Coming from AIChat? Follow the migration guide to get started.
* [Installation](Installation): Install Loki
* [Getting Started](Getting-Started): Get started with Loki by doing first-run setup steps, and learn the basics.
* [REPL](REPL): Interactive Read-Eval-Print Loop for conversational interactions with LLMs and Loki.
* [Custom REPL Prompt](REPL-Prompt): Customize the REPL prompt to provide useful contextual information.
* [Vault](Vault): Securely store and manage sensitive information such as API keys and credentials.
* [Shell Integrations](Shell-Integrations): Seamlessly integrate Loki with your shell environment for enhanced command-line assistance.
* [Function Calling](Tools#Tools): Leverage function calling capabilities to extend Loki's functionality with custom tools
* [Creating Custom Tools](Custom-Tools): You can create your own custom tools to enhance Loki's capabilities.
* [Create Custom Python Tools](Custom-Tools#custom-python-based-tools)
* [Create Custom TypeScript Tools](Custom-Tools#custom-typescript-based-tools)
* [Create Custom Bash Tools](Custom-Bash-Tools)
* [Bash Prompt Utilities](Bash-Prompt-Helpers)
* [First-Class MCP Server Support](MCP-Servers): Easily connect and interact with MCP servers for advanced functionality.
* [Macros](Macros): Automate repetitive tasks and workflows with Loki "scripts" (macros).
* [RAG](RAG): Retrieval-Augmented Generation for enhanced information retrieval and generation.
* [Sessions](Sessions): Manage and persist conversational contexts and settings across multiple interactions.
* [Roles](Roles): Customize model behavior for specific tasks or domains.
* [Agents](Agents): Leverage AI agents to perform complex tasks and workflows, including sub-agent spawning, teammate messaging, and user interaction tools.
* [Todo System](TODO-System): Built-in task tracking for improved agent reliability with smaller models.
* [Environment Variables](Environment-Variables): Override and customize your Loki configuration at runtime with environment variables.
* [Client Configurations](Clients): Configuration instructions for various LLM providers.
* [Authentication (API Key & OAuth)](Clients#authentication): Authenticate with API keys or OAuth for subscription-based access.
* [Patching API Requests](Patches): Learn how to patch API requests for advanced customization.
* [Custom Themes](Themes): Change the look and feel of Loki to your preferences with custom themes.
* [History](#history): A history of how Loki came to be.
---
@@ -53,7 +53,7 @@ Coming from [AIChat](https://github.com/sigoden/aichat)? Follow the [migration g
Loki began as a fork of [AIChat CLI](https://github.com/sigoden/aichat) and has since evolved into an independent project.
See [CREDITS.md](https://github.com/Dark-Alex-17/loki/CREDITS.md) for full attribution and background.
See [CREDITS](https://github.com/Dark-Alex-17/loki/CREDITS) for full attribution and background.
---
@@ -6,7 +6,7 @@ services, those services can expose their functionality through an MCP server.
Loki has first-class support for MCP servers.
As mentioned in the [Loki Vault documentation](../Vault.md), Loki can inject sensitive
As mentioned in the [Loki Vault documentation](Vault.md), Loki can inject sensitive
configuration data into your MCP configuration file to ensure that secrets are not hard-coded.
---
@@ -118,12 +118,12 @@ protocol with the server. The `type` field primarily serves as documentation of
server speaks. Neither type supports `command`, `args`, or `cwd` fields.
## Secret Injection
As mentioned in the [Loki Vault documentation](../Vault.md), you can use Loki Vault to inject secrets into your MCP configuration file.
As mentioned in the [Loki Vault documentation](Vault), you can use Loki Vault to inject secrets into your MCP configuration file.
In fact, this is why you need to set up your vault before using Loki at all: the built-in MCP configuration
requires you set up some secrets to use it.
For more information about how to set up your vault and inject secrets, please refer to the [Loki Vault documentation](../Vault.md).
For more information about how to set up your vault and inject secrets, please refer to the [Loki Vault documentation](Vault).
# Default MCP Servers
Loki ships with a `functions/mcp.json` file that includes some useful MCP servers:
@@ -168,7 +168,7 @@ A special note about `enabled_mcp_servers`: a user can set this to `all` to enab
When running in REPL-mode, the `mcp_server_support` and `enabled_mcp_servers` settings can be overridden using the
`.set` command:
![REPL set MCP servers](../images/mcp/global-settings-overrides-repl.png)
![REPL set MCP servers](./images/mcp/global-settings-overrides-repl.png)
## Role Configuration
When you create a role, you have the following MCP-related configuration options available to you:
@@ -179,7 +179,7 @@ enabled_mcp_servers: github # Which MCP servers the role uses.
The values for `mapping_mcp_servers` are inherited from the `[global configuration](#global-configuration)`.
For more information about roles, refer to the [Roles](../Roles.md) documentation.
For more information about roles, refer to the [Roles](Roles) documentation.
## Agent Configuration
When you create an agent, you have the following MCP-related configuration options available to you:
@@ -192,6 +192,6 @@ mcp_servers: # Which MCP servers the agent uses
The values for `mapping_mcp_servers` are inherited from the [global configuration](#global-configuration).
For more information about agents, refer to the [Agents](../Agents.md) documentation.
For more information about agents, refer to the [Agents](Agents) documentation.
For a full example configuration for an agent, see the [Agent Configuration Example](https://github.com/Dark-Alex-17/loki/blob/main/config.agent.example.yaml) file.
+1 -1
@@ -6,7 +6,7 @@ This isolation ensures that your workspace remains clean and unaffected by macro
![Macro Example](./images/macros/macros-example.gif)
For more information on Loki's REPL, refer to the [REPL](./REPL.md) documentation.
For more information on Loki's REPL, refer to the [REPL](REPL) documentation.
---
+10 -10
@@ -24,7 +24,7 @@ things like
REPL.
* **History Search** Press `ctrl+r` to search the REPL history, and navigate it with `↑↓`
* **Configurable Keybindings:** You can switch between `emacs` style keybindings or `vi` style keybindings
* [**Custom REPL Prompt:**](./REPL-Prompt.md) You can even customize the REPL prompt to display information about the
* [**Custom REPL Prompt:**](REPL-Prompt) You can even customize the REPL prompt to display information about the
current context in the prompt
* **Built-in user interaction tools:** When function calling is enabled in the REPL, the `user__ask`, `user__confirm`,
`user__input`, and `user__checkbox` tools are always available for interactive prompts. These are not injected in the
@@ -51,7 +51,7 @@ openai:gpt-4o 128000 / 4096 | 5 / 15 👁 ⚒
```
![model](./images/repl/model.gif)
For more information about how to add models to Loki, refer to the [clients documentation](./clients/Clients.md).
For more information about how to add models to Loki, refer to the [clients documentation](Clients).
## `.role` - Role management
Loki offers the following commands to manage your roles:
@@ -66,7 +66,7 @@ Loki offers the following commands to manage your roles:
![role](./images/roles/code.gif)
For more information about roles in Loki and how to build them, refer to the [roles documentation](./Roles.md).
For more information about roles in Loki and how to build them, refer to the [roles documentation](Roles).
## `.prompt` - Set a temporary role using a prompt
If you need to create a temporary role that you want to discard after use, you use `.prompt`. `.prompt`-based roles
@@ -89,7 +89,7 @@ Use the following commands to manage sessions in Loki:
![sessions](./images/sessions/sessions-example.gif)
For more information on sessions and how to use them in Loki, refer to the [sessions documentation](./Sessions.md).
For more information on sessions and how to use them in Loki, refer to the [sessions documentation](Sessions).
## `.agent` - Chat with an AI agent
Loki lets you build OpenAI GPT-style agents. The following commands let you interact with and manage your agents in
@@ -106,7 +106,7 @@ Loki:
![agent](./images/agents/sql.gif)
For more information on agents in Loki and how to create them, refer to the [agents documentation](./Agents.md).
For more information on agents in Loki and how to create them, refer to the [agents documentation](Agents).
## `.rag` - Chat with documents
RAG (Retrieval Augmented Generation) enables you to load documents into the LLM so you can ask questions about it or
@@ -123,7 +123,7 @@ complete tasks using the documents as additional context.
![rag](./images/rag/persistent-rag.gif)
For more information about RAG in Loki and how to utilize it, refer to the [rag documentation](./RAG.md).
For more information about RAG in Loki and how to utilize it, refer to the [rag documentation](RAG).
## `.macro` - Execute a macro
Macros in Loki are like "scripts" of commands that can be run in isolated environments; that means they do not use any
@@ -132,7 +132,7 @@ command.
![macro](./images/macros/macros-example.gif)
For more information on macros in Loki and how to create them, refer to the [macros documentation](./Macros.md).
For more information on macros in Loki and how to create them, refer to the [macros documentation](Macros).
## `.file` - Read files and use them as input
Loki lets you specify any number of documents that you can load and use as ephemeral RAG to chat with the LLM. To see
@@ -145,7 +145,7 @@ Usage: .file <file|dir|url|%%|cmd>... [-- <text>...]
![ephemeral-rag](./images/rag/ephemeral-rag.gif)
For more information about ephemeral RAG, refer to the [ephemeral RAG documentation](./RAG.md#ephemeral-rag).
For more information about ephemeral RAG, refer to the [ephemeral RAG documentation](RAGd#ephemeral-rag).
## `.vault` - Manage the Loki vault
The Loki vault lets users store sensitive secrets and credentials securely so that there's no plaintext secrets
@@ -153,7 +153,7 @@ anywhere in your configurations.
![vault](./images/vault/vault-demo.gif)
For more information about the Loki vault, refer to the [vault documentation](./Vault.md).
For more information about the Loki vault, refer to the [vault documentation](Vault).
## `.continue` - Continue the previous response
When you have a response that exceeds the context length, you can use the `.continue` command to continue the generation
@@ -216,7 +216,7 @@ The following entities are supported:
## `.authenticate` - Authenticate the current model client via OAuth
The `.authenticate` command will start the OAuth flow for the current model client if
* The client supports OAuth (See the [clients documentation](./clients/Clients.md#providers-that-support-oauth) for supported clients)
* The client supports OAuth (See the [clients documentation](Clients#providers-that-support-oauth) for supported clients)
* The client is configured in your Loki configuration to use OAuth via the `auth: oauth` property
## `.exit` - Exit an agent/role/session/rag or the Loki REPL itself
+3 -3
@@ -231,6 +231,6 @@ automatically. If you're seeing loops:
---
# Additional Docs
- [Agents](./Agents.md) - Full agent configuration guide
- [Function Calling](./function-calling/Tools.md) - How tools work in Loki
- [Sessions](./Sessions.md) - How conversation state is managed
- [Agents](Agents) - Full agent configuration guide
- [Function Calling](Tools) - How tools work in Loki
- [Sessions](Sessions) - How conversation state is managed
+3 -3
@@ -85,7 +85,7 @@ are globally enabled/disabled globally.
When running in REPL-mode, the `function_calling_support` and `enabled_tools` settings can be overridden using the
`.set` command:
![REPL set function calling](../images/tools/global-settings-overrides-repl.png)
![REPL set function calling](./images/tools/global-settings-overrides-repl.png)
You'll notice that mentioned above, some tools are disabled while others are enabled. How is that determined?
@@ -113,7 +113,7 @@ enabled_tools: query_jira_issues # Which tools the role uses.
The values for `mapping_tools` are inherited from the [global configuration](#global-configuration).
For more information about roles, refer to the [Roles](../Roles.md) documentation.
For more information about roles, refer to the [Roles](Roles) documentation.
## Agent Configuration
When you create an agent, you have the following global tool-related configuration options available to you:
@@ -127,7 +127,7 @@ global_tools: # Which global tools the agent uses
The values for `mapping_tools` are inherited from the [global configuration](#global-configuration).
For more information about agents, refer to the [Agents](../Agents.md) documentation.
For more information about agents, refer to the [Agents](Agents) documentation.
For a full example configuration for an agent, see the [Agent Configuration Example](https://github.com/Dark-Alex-17/loki/blob/main/config.agent.example.yaml) file.
+1 -1
@@ -145,5 +145,5 @@ follows:
}
```
For more information about variable usage within agents, refer to the [Variables section](./Agents.md#user-defined-variables) of the [Agents README](./Agents.md)
For more information about variable usage within agents, refer to the [Variables section](Agents#user-defined-variables) of the [Agents documentation](Agents)
Binary file not shown.

After

Width:  |  Height:  |  Size: 370 KiB

BIN
Binary file not shown.

After

Width:  |  Height:  |  Size: 587 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 55 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 446 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 8.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.0 MiB

BIN
Binary file not shown.

After

Width:  |  Height:  |  Size: 21 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 878 KiB

BIN
Binary file not shown.

After

Width:  |  Height:  |  Size: 170 KiB

BIN
Binary file not shown.

After

Width:  |  Height:  |  Size: 225 KiB

BIN
Binary file not shown.

After

Width:  |  Height:  |  Size: 189 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 67 KiB

BIN
Binary file not shown.

After

Width:  |  Height:  |  Size: 46 KiB

BIN
Binary file not shown.

After

Width:  |  Height:  |  Size: 303 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 63 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 151 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 30 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 78 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 43 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 58 KiB

BIN
Binary file not shown.

After

Width:  |  Height:  |  Size: 60 KiB

BIN
Binary file not shown.

After

Width:  |  Height:  |  Size: 60 KiB

BIN
Binary file not shown.

After

Width:  |  Height:  |  Size: 58 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 70 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 68 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 67 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 66 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 67 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 63 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 55 KiB

BIN
Binary file not shown.

After

Width:  |  Height:  |  Size: 67 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 57 KiB

BIN
Binary file not shown.

After

Width:  |  Height:  |  Size: 60 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 9.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 12 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 7.4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 6.9 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 6.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 8.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 9.5 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 7.2 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 6.4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 24 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 7.2 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 21 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 396 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.9 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.2 KiB