chore: polish some modules readme (#272)
This commit is contained in:
parent
cf66809349
commit
3afa72095b
@ -1,21 +1,22 @@
|
|||||||
---
|
---
|
||||||
display_name: AgentAPI
|
display_name: AgentAPI
|
||||||
description: Building block for modules that need to run an agentapi server
|
description: Building block for modules that need to run an AgentAPI server
|
||||||
icon: ../../../../.icons/coder.svg
|
icon: ../../../../.icons/coder.svg
|
||||||
verified: true
|
verified: true
|
||||||
tags: [internal]
|
tags: [internal, library]
|
||||||
---
|
---
|
||||||
|
|
||||||
# AgentAPI
|
# AgentAPI
|
||||||
|
|
||||||
The AgentAPI module is a building block for modules that need to run an agentapi server. It is intended primarily for internal use by Coder to create modules compatible with Tasks.
|
> [!CAUTION]
|
||||||
|
> We do not recommend using this module directly. Instead, please consider using one of our [Tasks-compatible AI agent modules](https://registry.coder.com/modules?search=tag%3Atasks).
|
||||||
|
|
||||||
We do not recommend using this module directly. Instead, please consider using one of our [Tasks-compatible AI agent modules](https://registry.coder.com/modules?search=tag%3Atasks).
|
The AgentAPI module is a building block for modules that need to run an AgentAPI server. It is intended primarily for internal use by Coder to create modules compatible with Tasks.
|
||||||
|
|
||||||
```tf
|
```tf
|
||||||
module "agentapi" {
|
module "agentapi" {
|
||||||
source = "registry.coder.com/coder/agentapi/coder"
|
source = "registry.coder.com/coder/agentapi/coder"
|
||||||
version = "1.0.1"
|
version = "1.0.2"
|
||||||
|
|
||||||
agent_id = var.agent_id
|
agent_id = var.agent_id
|
||||||
web_app_slug = local.app_slug
|
web_app_slug = local.app_slug
|
||||||
@ -50,4 +51,4 @@ module "agentapi" {
|
|||||||
|
|
||||||
## For module developers
|
## For module developers
|
||||||
|
|
||||||
For a complete example of how to use this module, see the [goose module](https://github.com/coder/registry/blob/main/registry/coder/modules/goose/main.tf).
|
For a complete example of how to use this module, see the [Goose module](https://github.com/coder/registry/blob/main/registry/coder/modules/goose/main.tf).
|
||||||
|
|||||||
@ -13,7 +13,7 @@ Run [Aider](https://aider.chat) AI pair programming in your workspace. This modu
|
|||||||
```tf
|
```tf
|
||||||
module "aider" {
|
module "aider" {
|
||||||
source = "registry.coder.com/coder/aider/coder"
|
source = "registry.coder.com/coder/aider/coder"
|
||||||
version = "1.1.1"
|
version = "1.1.2"
|
||||||
agent_id = coder_agent.example.id
|
agent_id = coder_agent.example.id
|
||||||
}
|
}
|
||||||
```
|
```
|
||||||
@ -30,29 +30,8 @@ module "aider" {
|
|||||||
|
|
||||||
## Module Parameters
|
## Module Parameters
|
||||||
|
|
||||||
| Parameter | Description | Type | Default |
|
> [!NOTE]
|
||||||
| ---------------------------------- | -------------------------------------------------------------------------- | -------- | ------------------- |
|
> The `use_screen` and `use_tmux` parameters cannot both be enabled at the same time. By default, `use_screen` is set to `true` and `use_tmux` is set to `false`.
|
||||||
| `agent_id` | The ID of a Coder agent (required) | `string` | - |
|
|
||||||
| `folder` | The folder to run Aider in | `string` | `/home/coder` |
|
|
||||||
| `install_aider` | Whether to install Aider | `bool` | `true` |
|
|
||||||
| `aider_version` | The version of Aider to install | `string` | `"latest"` |
|
|
||||||
| `use_screen` | Whether to use screen for running Aider in the background | `bool` | `true` |
|
|
||||||
| `use_tmux` | Whether to use tmux instead of screen for running Aider in the background | `bool` | `false` |
|
|
||||||
| `session_name` | Name for the persistent session (screen or tmux) | `string` | `"aider"` |
|
|
||||||
| `order` | Position of the app in the UI presentation | `number` | `null` |
|
|
||||||
| `icon` | The icon to use for the app | `string` | `"/icon/aider.svg"` |
|
|
||||||
| `experiment_report_tasks` | Whether to enable task reporting | `bool` | `true` |
|
|
||||||
| `system_prompt` | System prompt for instructing Aider on task reporting and behavior | `string` | See default in code |
|
|
||||||
| `task_prompt` | Task prompt to use with Aider | `string` | `""` |
|
|
||||||
| `ai_provider` | AI provider to use with Aider (openai, anthropic, azure, etc.) | `string` | `"anthropic"` |
|
|
||||||
| `ai_model` | AI model to use (can use Aider's built-in aliases like "sonnet", "4o") | `string` | `"sonnet"` |
|
|
||||||
| `ai_api_key` | API key for the selected AI provider | `string` | `""` |
|
|
||||||
| `custom_env_var_name` | Custom environment variable name when using custom provider | `string` | `""` |
|
|
||||||
| `experiment_pre_install_script` | Custom script to run before installing Aider | `string` | `null` |
|
|
||||||
| `experiment_post_install_script` | Custom script to run after installing Aider | `string` | `null` |
|
|
||||||
| `experiment_additional_extensions` | Additional extensions configuration in YAML format to append to the config | `string` | `null` |
|
|
||||||
|
|
||||||
> **Note**: `use_screen` and `use_tmux` cannot both be enabled at the same time. By default, `use_screen` is set to `true` and `use_tmux` is set to `false`.
|
|
||||||
|
|
||||||
## Usage Examples
|
## Usage Examples
|
||||||
|
|
||||||
@ -68,7 +47,7 @@ variable "anthropic_api_key" {
|
|||||||
module "aider" {
|
module "aider" {
|
||||||
count = data.coder_workspace.me.start_count
|
count = data.coder_workspace.me.start_count
|
||||||
source = "registry.coder.com/coder/aider/coder"
|
source = "registry.coder.com/coder/aider/coder"
|
||||||
version = "1.1.1"
|
version = "1.1.2"
|
||||||
agent_id = coder_agent.example.id
|
agent_id = coder_agent.example.id
|
||||||
ai_api_key = var.anthropic_api_key
|
ai_api_key = var.anthropic_api_key
|
||||||
}
|
}
|
||||||
@ -93,7 +72,7 @@ variable "openai_api_key" {
|
|||||||
module "aider" {
|
module "aider" {
|
||||||
count = data.coder_workspace.me.start_count
|
count = data.coder_workspace.me.start_count
|
||||||
source = "registry.coder.com/coder/aider/coder"
|
source = "registry.coder.com/coder/aider/coder"
|
||||||
version = "1.1.1"
|
version = "1.1.2"
|
||||||
agent_id = coder_agent.example.id
|
agent_id = coder_agent.example.id
|
||||||
use_tmux = true
|
use_tmux = true
|
||||||
ai_provider = "openai"
|
ai_provider = "openai"
|
||||||
@ -114,7 +93,7 @@ variable "custom_api_key" {
|
|||||||
module "aider" {
|
module "aider" {
|
||||||
count = data.coder_workspace.me.start_count
|
count = data.coder_workspace.me.start_count
|
||||||
source = "registry.coder.com/coder/aider/coder"
|
source = "registry.coder.com/coder/aider/coder"
|
||||||
version = "1.1.1"
|
version = "1.1.2"
|
||||||
agent_id = coder_agent.example.id
|
agent_id = coder_agent.example.id
|
||||||
ai_provider = "custom"
|
ai_provider = "custom"
|
||||||
custom_env_var_name = "MY_CUSTOM_API_KEY"
|
custom_env_var_name = "MY_CUSTOM_API_KEY"
|
||||||
@ -131,7 +110,7 @@ You can extend Aider's capabilities by adding custom extensions:
|
|||||||
module "aider" {
|
module "aider" {
|
||||||
count = data.coder_workspace.me.start_count
|
count = data.coder_workspace.me.start_count
|
||||||
source = "registry.coder.com/coder/aider/coder"
|
source = "registry.coder.com/coder/aider/coder"
|
||||||
version = "1.1.1"
|
version = "1.1.2"
|
||||||
agent_id = coder_agent.example.id
|
agent_id = coder_agent.example.id
|
||||||
ai_api_key = var.anthropic_api_key
|
ai_api_key = var.anthropic_api_key
|
||||||
|
|
||||||
@ -210,7 +189,7 @@ data "coder_parameter" "ai_prompt" {
|
|||||||
module "aider" {
|
module "aider" {
|
||||||
count = data.coder_workspace.me.start_count
|
count = data.coder_workspace.me.start_count
|
||||||
source = "registry.coder.com/coder/aider/coder"
|
source = "registry.coder.com/coder/aider/coder"
|
||||||
version = "1.1.1"
|
version = "1.1.2"
|
||||||
agent_id = coder_agent.example.id
|
agent_id = coder_agent.example.id
|
||||||
ai_api_key = var.anthropic_api_key
|
ai_api_key = var.anthropic_api_key
|
||||||
task_prompt = data.coder_parameter.ai_prompt.value
|
task_prompt = data.coder_parameter.ai_prompt.value
|
||||||
@ -308,7 +287,3 @@ If you encounter issues:
|
|||||||
3. **Browser mode issues**: If the browser interface doesn't open, check that you're accessing it from a machine that can reach your Coder workspace
|
3. **Browser mode issues**: If the browser interface doesn't open, check that you're accessing it from a machine that can reach your Coder workspace
|
||||||
|
|
||||||
For more information on using Aider, see the [Aider documentation](https://aider.chat/docs/).
|
For more information on using Aider, see the [Aider documentation](https://aider.chat/docs/).
|
||||||
|
|
||||||
```
|
|
||||||
|
|
||||||
```
|
|
||||||
|
|||||||
@ -13,8 +13,9 @@ Run [Amazon Q](https://aws.amazon.com/q/) in your workspace to access Amazon's A
|
|||||||
```tf
|
```tf
|
||||||
module "amazon-q" {
|
module "amazon-q" {
|
||||||
source = "registry.coder.com/coder/amazon-q/coder"
|
source = "registry.coder.com/coder/amazon-q/coder"
|
||||||
version = "1.1.1"
|
version = "1.1.2"
|
||||||
agent_id = coder_agent.example.id
|
agent_id = coder_agent.example.id
|
||||||
|
|
||||||
# Required: see below for how to generate
|
# Required: see below for how to generate
|
||||||
experiment_auth_tarball = var.amazon_q_auth_tarball
|
experiment_auth_tarball = var.amazon_q_auth_tarball
|
||||||
}
|
}
|
||||||
@ -81,7 +82,7 @@ module "amazon-q" {
|
|||||||
```tf
|
```tf
|
||||||
module "amazon-q" {
|
module "amazon-q" {
|
||||||
source = "registry.coder.com/coder/amazon-q/coder"
|
source = "registry.coder.com/coder/amazon-q/coder"
|
||||||
version = "1.1.1"
|
version = "1.1.2"
|
||||||
agent_id = coder_agent.example.id
|
agent_id = coder_agent.example.id
|
||||||
experiment_auth_tarball = var.amazon_q_auth_tarball
|
experiment_auth_tarball = var.amazon_q_auth_tarball
|
||||||
experiment_use_tmux = true
|
experiment_use_tmux = true
|
||||||
@ -93,7 +94,7 @@ module "amazon-q" {
|
|||||||
```tf
|
```tf
|
||||||
module "amazon-q" {
|
module "amazon-q" {
|
||||||
source = "registry.coder.com/coder/amazon-q/coder"
|
source = "registry.coder.com/coder/amazon-q/coder"
|
||||||
version = "1.1.1"
|
version = "1.1.2"
|
||||||
agent_id = coder_agent.example.id
|
agent_id = coder_agent.example.id
|
||||||
experiment_auth_tarball = var.amazon_q_auth_tarball
|
experiment_auth_tarball = var.amazon_q_auth_tarball
|
||||||
experiment_report_tasks = true
|
experiment_report_tasks = true
|
||||||
@ -105,7 +106,7 @@ module "amazon-q" {
|
|||||||
```tf
|
```tf
|
||||||
module "amazon-q" {
|
module "amazon-q" {
|
||||||
source = "registry.coder.com/coder/amazon-q/coder"
|
source = "registry.coder.com/coder/amazon-q/coder"
|
||||||
version = "1.1.1"
|
version = "1.1.2"
|
||||||
agent_id = coder_agent.example.id
|
agent_id = coder_agent.example.id
|
||||||
experiment_auth_tarball = var.amazon_q_auth_tarball
|
experiment_auth_tarball = var.amazon_q_auth_tarball
|
||||||
experiment_pre_install_script = "echo Pre-install!"
|
experiment_pre_install_script = "echo Pre-install!"
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user