|
3 | 3 | # ========================================== |
4 | 4 |
|
5 | 5 | # PostgreSQL & Redis Configuration |
6 | | -# When running locally: localhost:5432 and localhost:6379 |
7 | | -# When running in Docker Compose: postgres:5432 and redis:6379 |
| 6 | +# When running locally: localhost:5432 and localhost:6379. Under Docker Compose the |
| 7 | +# service names (postgres:5432, redis:6379) are supplied by the compose file itself. |
| 8 | +# |
| 9 | +# Credentials are configured as components, not inside connection URLs. Generate each |
| 10 | +# password with `openssl rand -base64 24`; the generated value contains '/', '+' and '=', |
| 11 | +# which would corrupt a hand-built URL. AgentKit escapes every component while it builds |
| 12 | +# the URL, so the password can be used exactly as generated. An explicitly configured |
| 13 | +# DATABASE_URL / DATABASE_READONLY_URL still wins over the components below. |
| 14 | +# Compose refuses to start with an empty or placeholder password, and |
| 15 | +# `scripts/check_deploy_credentials.py` rejects the image defaults (`postgres`), documented |
| 16 | +# placeholders and passwords under 12 characters. |
| 17 | +POSTGRES_HOST=localhost |
| 18 | +POSTGRES_PORT=5432 |
8 | 19 | POSTGRES_USER=postgres |
9 | | -POSTGRES_PASSWORD=postgres |
| 20 | +POSTGRES_PASSWORD=change_me_generate_with_openssl_rand |
10 | 21 | POSTGRES_DB=agentkit |
11 | | -DATABASE_URL=postgresql+asyncpg://postgres:postgres@localhost:5432/agentkit |
| 22 | + |
| 23 | +# Dedicated read-only role for the sql_readonly tool. It must NOT be the application role: |
| 24 | +# the tool refuses to run without it and never falls back to the application credentials. |
| 25 | +# Compose provisions it with `scripts/init_readonly_role.py`; for a local database run that |
| 26 | +# script yourself. |
| 27 | +POSTGRES_READONLY_USER=agentkit_readonly |
| 28 | +POSTGRES_READONLY_PASSWORD=change_me_generate_with_openssl_rand |
| 29 | + |
| 30 | +# Redis requires a password in the compose stack. REDIS_PASSWORD is authoritative: when |
| 31 | +# REDIS_URL carries no credentials of its own, the password is embedded (percent-encoded) |
| 32 | +# automatically, so it never needs to appear inside the URL. |
| 33 | +REDIS_PASSWORD=change_me_generate_with_openssl_rand |
12 | 34 | REDIS_URL=redis://localhost:6379/0 |
13 | 35 |
|
| 36 | +# Host interface the datastore ports bind to. Loopback by default; 0.0.0.0 is an explicit |
| 37 | +# opt-in that exposes PostgreSQL and Redis to the network (see docs/DEPLOY.md). |
| 38 | +POSTGRES_BIND=127.0.0.1 |
| 39 | +REDIS_BIND=127.0.0.1 |
| 40 | + |
14 | 41 | # LLM Provider Configuration |
15 | 42 | # Supported providers: "gemini", "openai", "fake" |
16 | 43 | LLM_PROVIDER=gemini |
@@ -40,11 +67,16 @@ MAX_STEPS=10 |
40 | 67 | RUN_TIMEOUT_S=60 |
41 | 68 | TOOL_TIMEOUT_S=15 |
42 | 69 | SESSION_TTL_S=3600 |
| 70 | +# Maximum messages retained per session (system prompt included). Truncation never leaves a |
| 71 | +# tool result without the assistant tool-call turn it answers. |
| 72 | +SESSION_MAX_MESSAGES=40 |
43 | 73 | TOOL_OUTPUT_MAX_CHARS=2000 |
44 | 74 |
|
45 | 75 | # Real-infrastructure test suite (optional, test-only) |
46 | 76 | # `pytest` skips the live tier unless AGENTKIT_REAL_INFRA=1. Point these at a |
47 | 77 | # DEDICATED test database: the suite truncates runs/steps. |
| 78 | +# REDIS_PASSWORD above is reused to authenticate the suite, so REDIS_TEST_URL needs no |
| 79 | +# credentials; disclose them in the URL only to point at a Redis with a different password. |
48 | 80 | # AGENTKIT_REAL_INFRA=1 |
49 | 81 | # DATABASE_TEST_URL=postgresql+asyncpg://postgres:postgres@localhost:5432/agentkit_test |
50 | 82 | # REDIS_TEST_URL=redis://localhost:6379/15 |
0 commit comments