From 6b151e2368f06dae8321cfeebb36a69b1a0cf6ae Mon Sep 17 00:00:00 2001 From: Art Berger Date: Wed, 1 Apr 2026 08:52:19 -0400 Subject: [PATCH] [docs] update memories - add postgres req - reformat APIs that ran together in a big block - remove dupe content Signed-off-by: Art Berger --- public/sitemap.xml | 229 +++++++++--------- .../kagent/concepts/agent-memory/page.mdx | 89 +++++-- src/config/navigation.json | 5 + 3 files changed, 190 insertions(+), 133 deletions(-) diff --git a/public/sitemap.xml b/public/sitemap.xml index cffb7e2..739fb9c 100644 --- a/public/sitemap.xml +++ b/public/sitemap.xml @@ -2,777 +2,784 @@ https://kagent.dev/agents - 2026-03-18 + 2026-04-01 weekly 0.8 https://kagent.dev/blog - 2026-03-18 + 2026-04-01 weekly 0.8 https://kagent.dev/community - 2026-03-18 + 2026-04-01 weekly 0.8 https://kagent.dev/docs/kagent/concepts/agent-memory - 2026-03-18 + 2026-04-01 weekly 0.8 https://kagent.dev/docs/kagent/concepts/agents - 2026-03-18 + 2026-04-01 weekly 0.8 https://kagent.dev/docs/kagent/concepts/architecture - 2026-03-18 + 2026-04-01 weekly 0.8 https://kagent.dev/docs/kagent/concepts - 2026-03-18 + 2026-04-01 weekly 0.8 https://kagent.dev/docs/kagent/concepts/tools - 2026-03-18 + 2026-04-01 weekly 0.8 https://kagent.dev/docs/kagent/examples/a2a-agents - 2026-03-18 + 2026-04-01 weekly 0.8 https://kagent.dev/docs/kagent/examples/a2a-byo - 2026-03-18 + 2026-04-01 weekly 0.8 https://kagent.dev/docs/kagent/examples/agents-mcp - 2026-03-18 + 2026-04-01 weekly 0.8 https://kagent.dev/docs/kagent/examples/crewai-byo - 2026-03-18 + 2026-04-01 weekly 0.8 https://kagent.dev/docs/kagent/examples/discord-a2a - 2026-03-18 + 2026-04-01 weekly 0.8 https://kagent.dev/docs/kagent/examples/documentation - 2026-03-18 + 2026-04-01 weekly 0.8 https://kagent.dev/docs/kagent/examples/human-in-the-loop - 2026-03-18 + 2026-04-01 weekly 0.8 https://kagent.dev/docs/kagent/examples/langchain-byo - 2026-03-18 + 2026-04-01 weekly 0.8 https://kagent.dev/docs/kagent/examples - 2026-03-18 + 2026-04-01 weekly 0.8 https://kagent.dev/docs/kagent/examples/skills - 2026-03-18 + 2026-04-01 weekly 0.8 https://kagent.dev/docs/kagent/examples/slack-a2a - 2026-03-18 + 2026-04-01 + weekly + 0.8 + + + + https://kagent.dev/docs/kagent/examples/telegram-bot + 2026-04-01 weekly 0.8 https://kagent.dev/docs/kagent/getting-started/first-agent - 2026-03-18 + 2026-04-01 weekly 0.8 https://kagent.dev/docs/kagent/getting-started/first-mcp-tool - 2026-03-18 + 2026-04-01 weekly 0.8 https://kagent.dev/docs/kagent/getting-started/local-development - 2026-03-18 + 2026-04-01 weekly 0.8 https://kagent.dev/docs/kagent/getting-started - 2026-03-18 + 2026-04-01 weekly 0.8 https://kagent.dev/docs/kagent/getting-started/quickstart - 2026-03-18 + 2026-04-01 weekly 0.8 https://kagent.dev/docs/kagent/getting-started/system-prompts - 2026-03-18 + 2026-04-01 weekly 0.8 https://kagent.dev/docs/kagent/introduction/installation - 2026-03-18 + 2026-04-01 weekly 0.8 https://kagent.dev/docs/kagent/introduction - 2026-03-18 + 2026-04-01 weekly 0.8 https://kagent.dev/docs/kagent/introduction/what-is-kagent - 2026-03-18 + 2026-04-01 weekly 0.8 https://kagent.dev/docs/kagent/observability/audit-prompts - 2026-03-18 + 2026-04-01 weekly 0.8 https://kagent.dev/docs/kagent/observability/launch-ui - 2026-03-18 + 2026-04-01 weekly 0.8 https://kagent.dev/docs/kagent/observability - 2026-03-18 + 2026-04-01 weekly 0.8 https://kagent.dev/docs/kagent/observability/tracing - 2026-03-18 + 2026-04-01 weekly 0.8 https://kagent.dev/docs/kagent/operations/debug - 2026-03-18 + 2026-04-01 weekly 0.8 https://kagent.dev/docs/kagent/operations/operational-considerations - 2026-03-18 + 2026-04-01 weekly 0.8 https://kagent.dev/docs/kagent/operations - 2026-03-18 + 2026-04-01 weekly 0.8 https://kagent.dev/docs/kagent/operations/uninstall - 2026-03-18 + 2026-04-01 weekly 0.8 https://kagent.dev/docs/kagent/operations/upgrade - 2026-03-18 + 2026-04-01 weekly 0.8 https://kagent.dev/docs/kagent - 2026-03-18 + 2026-04-01 weekly 0.8 https://kagent.dev/docs/kagent/resources/api-ref - 2026-03-18 + 2026-04-01 weekly 0.8 https://kagent.dev/docs/kagent/resources/cli/kagent-add-mcp - 2026-03-18 + 2026-04-01 weekly 0.8 https://kagent.dev/docs/kagent/resources/cli/kagent-bug-report - 2026-03-18 + 2026-04-01 weekly 0.8 https://kagent.dev/docs/kagent/resources/cli/kagent-build - 2026-03-18 + 2026-04-01 weekly 0.8 https://kagent.dev/docs/kagent/resources/cli/kagent-completion - 2026-03-18 + 2026-04-01 weekly 0.8 https://kagent.dev/docs/kagent/resources/cli/kagent-dashboard - 2026-03-18 + 2026-04-01 weekly 0.8 https://kagent.dev/docs/kagent/resources/cli/kagent-deploy - 2026-03-18 + 2026-04-01 weekly 0.8 https://kagent.dev/docs/kagent/resources/cli/kagent-get - 2026-03-18 + 2026-04-01 weekly 0.8 https://kagent.dev/docs/kagent/resources/cli/kagent-help - 2026-03-18 + 2026-04-01 weekly 0.8 https://kagent.dev/docs/kagent/resources/cli/kagent-init - 2026-03-18 + 2026-04-01 weekly 0.8 https://kagent.dev/docs/kagent/resources/cli/kagent-install - 2026-03-18 + 2026-04-01 weekly 0.8 https://kagent.dev/docs/kagent/resources/cli/kagent-invoke - 2026-03-18 + 2026-04-01 weekly 0.8 https://kagent.dev/docs/kagent/resources/cli/kagent-mcp - 2026-03-18 + 2026-04-01 weekly 0.8 https://kagent.dev/docs/kagent/resources/cli/kagent-run - 2026-03-18 + 2026-04-01 weekly 0.8 https://kagent.dev/docs/kagent/resources/cli/kagent-uninstall - 2026-03-18 + 2026-04-01 weekly 0.8 https://kagent.dev/docs/kagent/resources/cli/kagent-version - 2026-03-18 + 2026-04-01 weekly 0.8 https://kagent.dev/docs/kagent/resources/cli - 2026-03-18 + 2026-04-01 weekly 0.8 https://kagent.dev/docs/kagent/resources/faq - 2026-03-18 + 2026-04-01 weekly 0.8 https://kagent.dev/docs/kagent/resources/helm - 2026-03-18 + 2026-04-01 weekly 0.8 https://kagent.dev/docs/kagent/resources - 2026-03-18 + 2026-04-01 weekly 0.8 https://kagent.dev/docs/kagent/resources/release-notes - 2026-03-18 + 2026-04-01 weekly 0.8 https://kagent.dev/docs/kagent/resources/tools-ecosystem - 2026-03-18 + 2026-04-01 weekly 0.8 https://kagent.dev/docs/kagent/supported-providers/amazon-bedrock - 2026-03-18 + 2026-04-01 weekly 0.8 https://kagent.dev/docs/kagent/supported-providers/anthropic - 2026-03-18 + 2026-04-01 weekly 0.8 https://kagent.dev/docs/kagent/supported-providers/azure-openai - 2026-03-18 + 2026-04-01 weekly 0.8 https://kagent.dev/docs/kagent/supported-providers/byo-openai - 2026-03-18 + 2026-04-01 weekly 0.8 https://kagent.dev/docs/kagent/supported-providers/gemini - 2026-03-18 + 2026-04-01 weekly 0.8 https://kagent.dev/docs/kagent/supported-providers/google-vertexai - 2026-03-18 + 2026-04-01 weekly 0.8 https://kagent.dev/docs/kagent/supported-providers/ollama - 2026-03-18 + 2026-04-01 weekly 0.8 https://kagent.dev/docs/kagent/supported-providers/openai - 2026-03-18 + 2026-04-01 weekly 0.8 https://kagent.dev/docs/kagent/supported-providers - 2026-03-18 + 2026-04-01 weekly 0.8 https://kagent.dev/docs/kmcp/deploy/install-controller - 2026-03-18 + 2026-04-01 weekly 0.8 https://kagent.dev/docs/kmcp/deploy - 2026-03-18 + 2026-04-01 weekly 0.8 https://kagent.dev/docs/kmcp/deploy/server - 2026-03-18 + 2026-04-01 weekly 0.8 https://kagent.dev/docs/kmcp/develop/fastmcp-python - 2026-03-18 + 2026-04-01 weekly 0.8 https://kagent.dev/docs/kmcp/develop/mcp-go - 2026-03-18 + 2026-04-01 weekly 0.8 https://kagent.dev/docs/kmcp/develop - 2026-03-18 + 2026-04-01 weekly 0.8 https://kagent.dev/docs/kmcp/introduction - 2026-03-18 + 2026-04-01 weekly 0.8 https://kagent.dev/docs/kmcp - 2026-03-18 + 2026-04-01 weekly 0.8 https://kagent.dev/docs/kmcp/quickstart - 2026-03-18 + 2026-04-01 weekly 0.8 https://kagent.dev/docs/kmcp/reference/api-ref - 2026-03-18 + 2026-04-01 weekly 0.8 https://kagent.dev/docs/kmcp/reference/kmcp-add-tool - 2026-03-18 + 2026-04-01 weekly 0.8 https://kagent.dev/docs/kmcp/reference/kmcp-build - 2026-03-18 + 2026-04-01 weekly 0.8 https://kagent.dev/docs/kmcp/reference/kmcp-completion - 2026-03-18 + 2026-04-01 weekly 0.8 https://kagent.dev/docs/kmcp/reference/kmcp-deploy - 2026-03-18 + 2026-04-01 weekly 0.8 https://kagent.dev/docs/kmcp/reference/kmcp-help - 2026-03-18 + 2026-04-01 weekly 0.8 https://kagent.dev/docs/kmcp/reference/kmcp-init - 2026-03-18 + 2026-04-01 weekly 0.8 https://kagent.dev/docs/kmcp/reference/kmcp-install - 2026-03-18 + 2026-04-01 weekly 0.8 https://kagent.dev/docs/kmcp/reference/kmcp-run - 2026-03-18 + 2026-04-01 weekly 0.8 https://kagent.dev/docs/kmcp/reference/kmcp-secrets - 2026-03-18 + 2026-04-01 weekly 0.8 https://kagent.dev/docs/kmcp/reference - 2026-03-18 + 2026-04-01 weekly 0.8 https://kagent.dev/docs/kmcp/secrets - 2026-03-18 + 2026-04-01 weekly 0.8 https://kagent.dev/docs - 2026-03-18 + 2026-04-01 weekly 0.8 https://kagent.dev/enterprise - 2026-03-18 + 2026-04-01 weekly 0.8 https://kagent.dev/page.tsx - 2026-03-18 + 2026-04-01 weekly 0.8 https://kagent.dev/tools - 2026-03-18 + 2026-04-01 weekly 0.8 https://kagent.dev/agents/argo-rollouts-conversion-agent - 2026-03-18 + 2026-04-01 weekly 0.8 https://kagent.dev/agents/cilium-crd-agent - 2026-03-18 + 2026-04-01 weekly 0.8 https://kagent.dev/agents/helm-agent - 2026-03-18 + 2026-04-01 weekly 0.8 https://kagent.dev/agents/istio-agent - 2026-03-18 + 2026-04-01 weekly 0.8 https://kagent.dev/agents/k8s-agent - 2026-03-18 + 2026-04-01 weekly 0.8 https://kagent.dev/agents/kgateway-agent - 2026-03-18 + 2026-04-01 weekly 0.8 https://kagent.dev/agents/observability-agent - 2026-03-18 + 2026-04-01 weekly 0.8 https://kagent.dev/agents/promql-agent - 2026-03-18 + 2026-04-01 weekly 0.8 https://kagent.dev/tools/istio - 2026-03-18 + 2026-04-01 weekly 0.8 https://kagent.dev/tools/kubernetes - 2026-03-18 + 2026-04-01 weekly 0.8 https://kagent.dev/tools/prometheus - 2026-03-18 + 2026-04-01 weekly 0.8 https://kagent.dev/tools/documentation - 2026-03-18 + 2026-04-01 weekly 0.8 https://kagent.dev/tools/helm - 2026-03-18 + 2026-04-01 weekly 0.8 https://kagent.dev/tools/argo - 2026-03-18 + 2026-04-01 weekly 0.8 https://kagent.dev/tools/grafana - 2026-03-18 + 2026-04-01 weekly 0.8 https://kagent.dev/tools/other - 2026-03-18 + 2026-04-01 weekly 0.8 https://kagent.dev/tools/cilium - 2026-03-18 + 2026-04-01 weekly 0.8 diff --git a/src/app/docs/kagent/concepts/agent-memory/page.mdx b/src/app/docs/kagent/concepts/agent-memory/page.mdx index d7a79b1..ddc5bc2 100644 --- a/src/app/docs/kagent/concepts/agent-memory/page.mdx +++ b/src/app/docs/kagent/concepts/agent-memory/page.mdx @@ -21,12 +21,37 @@ Agent memory provides the following capabilities. - **Vector-backed.** A basic vector store uses embedding models to encode memories as 768-dimensional vectors. - **Searchable.** Agents retrieve relevant memories via cosine similarity. - **Automatic.** Agents extract and save user intent, key learnings, and preferences without explicit user action. -- **Time-bounded.** Memories expire after a configurable TTL (default 15 days). +- **Time-bounded.** Memories expire after a configurable time to live (TTL), which defaults to 15 days. +- **Metadata.** Memories include timestamps and source session references. - **Shared storage.** Memory uses the kagent database (PostgreSQL), not a separate database. -## Configuration +## Configure memory -### Enable Memory on an Agent +### Install kagent with Postgres + +To use memory, you must install kagent with a Postgres database that has the `pgvector` extension installed and vector enabled. For more information, see the [Database configuration](/docs/kagent/operations/operational-considerations#database-configuration) section. + +Example Helm configuration for your own external Postgres: + +```yaml +database: + postgres: + urlFile: /var/secrets/db-url + vectorEnabled: true + bundled: + enabled: false +controller: + volumes: + - name: db-secret + secret: + secretName: my-postgres-url-secret + volumeMounts: + - name: db-secret + mountPath: /var/secrets + readOnly: true +``` + +### Enable memory on an agent To enable memory, set the `memory` field on the declarative agent spec, as shown in the following YAML example. The `modelConfig` field references a `ModelConfig` object whose embedding provider generates memory vectors. @@ -47,9 +72,9 @@ spec: modelConfig: default-model-config # References the embedding provider ``` -### Custom TTL +### Optional: Custom TTL -To change the default memory retention period, set the `ttlDays` field. +To change the default memory retention period of 15 days, set the `ttlDays` field. ```yaml memory: @@ -57,16 +82,18 @@ memory: ttlDays: 30 # Memories expire after 30 days instead of the default 15 ``` -## How Memory Works +## Work with memories + +Review the following sections to understand what your agents can do with memory. -### Automatic Save Cycle +### Automatic save cycle 1. The agent processes user messages normally. 2. Every 5th user message, the agent automatically extracts key information such as user intent, key learnings, and preferences. 3. The agent summarizes extracted memories and encodes them as embedding vectors. 4. The agent stores the vectors in the database with metadata and timestamps. -### Memory Retrieval (Prefetch) +### Memory retrieval (prefetch) Before generating a response, the agent performs the following steps. @@ -74,7 +101,7 @@ Before generating a response, the agent performs the following steps. 2. Searches stored memories by cosine similarity. 3. Injects the most relevant memories into the agent's context. -### Memory Tools +### Memory tools When you enable memory, the agent receives three additional tools. @@ -86,30 +113,48 @@ When you enable memory, the agent receives three additional tools. You can also instruct the agent to use `save_memory` or `load_memory` explicitly during a conversation. -### Viewing Memories +### View memories in the UI In the kagent UI, you can view the memories that an agent has saved. With saved memories, you can inspect what the agent has learned and retained from past interactions. -## Memory Management via API +### Manage memories via API The following API endpoints let you manage memories programmatically. +Add a memory: + +``` +POST /api/memories/sessions +``` + +Add memories in batch: + +``` +POST /api/memories/sessions/batch +``` + +Search memories by cosine similarity: + +``` +POST /api/memories/search +``` + +List memories: + ``` -POST /api/memories/sessions # Add a memory -POST /api/memories/sessions/batch # Add memories in batch -POST /api/memories/search # Search memories by cosine similarity -GET /api/memories?agent_name=X&user_id=Y # List memories -DELETE /api/memories?agent_name=X&user_id=Y # Delete all memories for an agent +GET /api/memories?agent_name=X&user_id=Y ``` -## Limitations +Delete all memories for an agent: + +``` +DELETE /api/memories?agent_name=X&user_id=Y +``` + + +## Known limitations - **No per-memory deletion.** You can delete all memories for an agent, but you cannot delete individual memory entries. - **No cross-agent memory sharing.** Each agent has its own isolated memory store. You cannot share memories across agents. - **Not pluggable.** Memory is built on the Google ADK memory implementation and cannot be swapped for an alternative memory solution (such as Cognee). However, if an alternative memory solution exposes an [MCP server](/docs/kagent/concepts/tools#mcp-tools), you can add it as a tool and instruct the agent to use it instead of the built-in memory. -## Technical Details - -- Embedding vectors are normalized to 768 dimensions. -- Background TTL pruning runs periodically with a default retention of 15 days. Memories older than the retention period are automatically deleted. -- Memories include timestamps and source session references. diff --git a/src/config/navigation.json b/src/config/navigation.json index b37fdb4..f476224 100644 --- a/src/config/navigation.json +++ b/src/config/navigation.json @@ -183,6 +183,11 @@ "href": "/docs/kagent/examples/discord-a2a", "description": "Learn how to create a Discord bot that interacts with kagent via A2A" }, + { + "title": "Telegram Bot", + "href": "/docs/kagent/examples/telegram-bot", + "description": "Build a Telegram bot that talks to your Kubernetes cluster through kagent and A2A" + }, { "title": "Skills", "href": "/docs/kagent/examples/skills",