Codumentor logo Codumentor Enterprise

Log Collections

Log collections let you analyze sets of log files with Codumentor's agent, without needing a code repository. You curate a collection of log files, link a conversation to it, and the agent gains read access to those files plus shell tools for analysis.

Overview

A log collection is a named group of log files and folders that the agent can analyze. Use log collections when you want the agent to:

Each collection belongs to the user who created it; any signed-in user can create and edit their own collections (no admin role is needed). The operator decides which host paths may be attached with the plugin's allowed_log_roots setting. The agent sees the log files as symlinks in a temporary workspace directory.

Creating a Collection

1. Create the collection

curl -X POST /ui/plugins/log_collection \
  -H "Authorization: Bearer $TOKEN" \
  -H "Content-Type: application/json" \
  -d '{
    "name": "prod-incident-2026-02",
    "description": "Production logs from Feb 2026 outage",
    "isolation_mode": "isolated"
  }'

Response:

{
  "id": 1,
  "name": "prod-incident-2026-02",
  "description": "Production logs from Feb 2026 outage",
  "isolation_mode": "isolated",
  "status": "active",
  "owner_user_id": "alice",
  "created_at": "2026-02-17T10:00:00",
  "updated_at": "2026-02-17T10:00:00"
}

2. Add files or folders to the collection

curl -X POST /ui/plugins/log_collection/1/files \
  -H "Authorization: Bearer $TOKEN" \
  -H "Content-Type: application/json" \
  -d '{
    "files": [
      {
        "real_path": "/var/log/gateway/access.log",
        "symlink_name": "gateway-access.log",
        "label": "API gateway access log"
      },
      {
        "real_path": "/var/log/backend",
        "label": "Backend service logs, rotated daily"
      }
    ]
  }'

Only real_path is required. It must point to an existing file or folder under allowed_log_roots. A folder includes every file in it (recursively, up to 500), which is how rotated or split logs are added; it is re-read when each conversation starts. symlink_name is the name the agent sees and defaults to the path's last component; label is an optional note shown to the agent. The whole batch is validated before anything is stored.

Isolation Modes

Each collection has an isolation mode that controls what the agent can access:

ModeLog filesCode reposDisabled tools
isolatedYesNoknowledge_search, replace_in_file, write_file, agentic_developer
mergedYesYesNone

Working with Log Collections

To start a conversation linked to a collection, include source_type and source_id in the conversation metadata:

{
  "source_type": "log_collection",
  "source_id": 1
}

When a conversation is linked to a log collection, the agent receives:

Managing Collections

List collections

curl /ui/plugins/log_collection \
  -H "Authorization: Bearer $TOKEN"

Returns all collections owned by the authenticated user.

Get a single collection (with files)

curl /ui/plugins/log_collection/1 \
  -H "Authorization: Bearer $TOKEN"

Update a collection

curl -X PUT /ui/plugins/log_collection/1 \
  -H "Authorization: Bearer $TOKEN" \
  -H "Content-Type: application/json" \
  -d '{
    "description": "Updated description",
    "isolation_mode": "merged"
  }'

All fields (name, description, isolation_mode) are optional — only provided fields are updated.

Delete a collection

curl -X DELETE /ui/plugins/log_collection/1 \
  -H "Authorization: Bearer $TOKEN"

Remove a file from a collection

curl -X DELETE /ui/plugins/log_collection/1/files/3 \
  -H "Authorization: Bearer $TOKEN"

API Reference

All endpoints are under /ui/plugins/log_collection and require authentication.

MethodPathDescription
POST/Create a collection
GET/List collections for the authenticated user
GET/settingsAllowed log roots and the per-folder file limit
GET/conversations/{conversation_id}The collection attached to a conversation
GET/{collection_id}Get a collection (includes sources with their current status)
PUT/{collection_id}Update a collection
DELETE/{collection_id}Delete a collection
POST/{collection_id}/filesAdd files or folders to a collection
DELETE/{collection_id}/files/{file_id}Remove a source from a collection

See Also