fc644ecd6e
Reemplaza el scaffold del echobot por la plataforma completa de bots traida desde ~/DataProyects/Github/agents_and_robots tras la operacion Matrix-out: los bots ya no hablan por Matrix sino por el bus unibus (modelo todo-rooms + E2E via shell/transportunibus sobre github.com/enmanuel/unibus/pkg/client). - go.mod: replace de unibus -> ../unibus y de fn-registry -> ../../../.. (paths relativos reajustados a la nueva ubicacion dentro de fn_registry). - app.md: bump a 0.2.0, descripcion + arquitectura + comandos + gotchas reales. - modulo Go conservado como github.com/enmanuel/agents (sin reescribir imports). agents_and_robots queda archivado como museo de la era Matrix.
194 lines
3.9 KiB
Markdown
194 lines
3.9 KiB
Markdown
# Template: config.yaml
|
|
|
|
Config minimalista para agentes. Solo incluir secciones que se usan.
|
|
|
|
## Variables de entorno
|
|
|
|
Normalizacion del agent-id para env vars:
|
|
- Uppercase + guiones a underscores
|
|
- **Nunca** eliminar sufijos
|
|
- `monitor-bot` → `MONITOR_BOT`
|
|
- `asistente-2` → `ASISTENTE_2`
|
|
|
|
## Agente con LLM (provider openai/anthropic)
|
|
|
|
```yaml
|
|
agent:
|
|
id: <agent-id>
|
|
name: "<display-name>"
|
|
version: "1.0.0"
|
|
enabled: true
|
|
description: "<description>"
|
|
tags: [<tags>]
|
|
|
|
personality:
|
|
tone: friendly
|
|
verbosity: concise
|
|
language: es
|
|
languages_supported: [es, en]
|
|
emoji_style: minimal
|
|
prefix: "<emoji>"
|
|
error_style: helpful
|
|
|
|
templates:
|
|
greeting: "Hola, soy <display-name>. ¿En qué puedo ayudarte?"
|
|
unknown_command: "Comando desconocido. Usa !help para ver los comandos disponibles."
|
|
permission_denied: "No tengo permiso para hacer eso."
|
|
error: "Algo salió mal: {{.Error}}"
|
|
|
|
behavior:
|
|
proactive: false
|
|
ask_confirmation: false
|
|
show_reasoning: false
|
|
typing_indicator: true
|
|
|
|
llm:
|
|
primary:
|
|
provider: <provider>
|
|
model: <model>
|
|
api_key_env: <API_KEY_ENV>
|
|
max_tokens: 4096
|
|
temperature: 0.7
|
|
|
|
reasoning:
|
|
system_prompt_file: "prompts/system.md"
|
|
context_window: 16384
|
|
memory_messages: 30
|
|
|
|
tool_use:
|
|
enabled: <true|false>
|
|
max_iterations: 5
|
|
|
|
tools:
|
|
memory:
|
|
enabled: true
|
|
|
|
knowledge:
|
|
enabled: false
|
|
|
|
memory:
|
|
enabled: true
|
|
window_size: 30
|
|
|
|
matrix:
|
|
homeserver: "https://matrix-af2f3d.organic-machine.com"
|
|
user_id: "@<agent-id>:matrix-af2f3d.organic-machine.com"
|
|
access_token_env: MATRIX_TOKEN_<NORM>
|
|
|
|
encryption:
|
|
enabled: true
|
|
store_path: "./agents/<agent-id>/data/crypto/"
|
|
pickle_key_env: PICKLE_KEY_<NORM>
|
|
trust_mode: tofu
|
|
recovery_key_env: SSSS_RECOVERY_KEY_<NORM>
|
|
|
|
rooms:
|
|
listen: []
|
|
respond: []
|
|
admin: []
|
|
|
|
filters:
|
|
command_prefix: "!"
|
|
mention_respond: true
|
|
dm_respond: true
|
|
ignore_bots: true
|
|
min_power_level: 0
|
|
|
|
threads:
|
|
enabled: true
|
|
auto_thread: false
|
|
|
|
schedules: []
|
|
```
|
|
|
|
### Valores por provider
|
|
|
|
| Provider | `api_key_env` | `model` (default) |
|
|
|----------|---------------|--------------------|
|
|
| `openai` | `OPENAI_API_KEY` | `gpt-4o` |
|
|
| `anthropic` | `ANTHROPIC_API_KEY` | `claude-sonnet-4-20250514` |
|
|
| `claude-code` | (no aplica) | `sonnet` |
|
|
|
|
### Si provider es claude-code
|
|
|
|
Reemplazar la seccion `llm.primary` con:
|
|
|
|
```yaml
|
|
llm:
|
|
primary:
|
|
provider: claude-code
|
|
claude_code:
|
|
binary: "claude"
|
|
timeout: 3m
|
|
disable_tools: true
|
|
working_dir: "/tmp/claude-agents/<agent-id>"
|
|
permission_mode: "bypassPermissions"
|
|
model: "sonnet"
|
|
```
|
|
|
|
**Importante**: `working_dir` SIEMPRE debe apuntar fuera del repositorio.
|
|
|
|
## Robot (solo comandos)
|
|
|
|
Config minimo — sin LLM, sin tools, sin memoria:
|
|
|
|
```yaml
|
|
agent:
|
|
id: <agent-id>
|
|
name: "<display-name>"
|
|
version: "1.0.0"
|
|
enabled: true
|
|
description: "<description>"
|
|
tags: [robot, commands]
|
|
|
|
personality:
|
|
tone: friendly
|
|
language: es
|
|
prefix: "<emoji>"
|
|
error_style: helpful
|
|
|
|
templates:
|
|
unknown_command: "Comando desconocido. Usa !help para ver los comandos disponibles."
|
|
|
|
matrix:
|
|
homeserver: "https://matrix-af2f3d.organic-machine.com"
|
|
user_id: "@<agent-id>:matrix-af2f3d.organic-machine.com"
|
|
access_token_env: MATRIX_TOKEN_<NORM>
|
|
|
|
encryption:
|
|
enabled: true
|
|
store_path: "./agents/<agent-id>/data/crypto/"
|
|
pickle_key_env: PICKLE_KEY_<NORM>
|
|
trust_mode: tofu
|
|
recovery_key_env: SSSS_RECOVERY_KEY_<NORM>
|
|
|
|
filters:
|
|
command_prefix: "!"
|
|
dm_respond: true
|
|
ignore_bots: true
|
|
|
|
threads:
|
|
enabled: true
|
|
```
|
|
|
|
## Agente con tools habilitadas
|
|
|
|
Añadir las secciones de tools necesarias. Ejemplo con file_ops:
|
|
|
|
```yaml
|
|
tools:
|
|
file_ops:
|
|
enabled: true
|
|
allowed_paths:
|
|
- "/path/to/workspace"
|
|
read_only: false
|
|
|
|
memory:
|
|
enabled: true
|
|
|
|
knowledge:
|
|
enabled: true
|
|
```
|
|
|
|
Tools disponibles: `ssh`, `http`, `file_ops`, `scripts`, `mcp`, `memory`, `knowledge`, `imdb`, `skills`.
|