The Autonomous Stack

Documents & Content · Knowledge Base · v1.0.0

Agent Knowledge Base Pack v1.0

Build and maintain an autonomous technical knowledge base from your own sources.

$4.00one-timePay with crypto

knowledge-base documentation second-brain agent

agent ⟶ theautonomousstack.xyz

01GET /api/v1/pack/agent-knowledge-base-v1

402 Payment RequiredX-PAYMENT-REQUIRED

02sign TransferWithAuthorization4.00 USDC · Base (eip155:8453)

03GET + PAYMENT-SIGNATURE

200 OKapplication/zip · 24 files

pay per pack over x402no account

What's inside

Self-hosted agent pack for building and maintaining an autonomous technical knowledge base. Version 1.0.0 — actionable kit with scripts, templates, named prompts and a checklist.


Overview

This pack provides an operational autonomous agent for the knowledge-base domain. It includes a dedicated OODA loop, versioned prompts, configuration templates and a set of scripts for installation, testing and execution.

The core of the product is a SQLite database of knowledge articles. Each article carries a unique identifier, a topic, content, tags, a source, a content signature (hash) and a status. The agent collects new sources, groups them by topic, removes duplicates, updates the database, then rebuilds a searchable index. It does not replace a large-scale vector search engine and does not execute any arbitrary command supplied in the sources.

The pack targets teams that accumulate technical documentation, runbooks, tickets, conversations and snippets, and that need an up-to-date operational "second brain" without manual effort.

The pack is designed to be self-hosted (BYO-LLM): no API key is included. The LLM adapter detects a local or CLI provider (ollama, claude-code, kimi, codex).


Architecture

┌─────────────────────────────────────────────────────────────────────┐
│                         External sources                             │
│   Markdown files     /  tickets  /  conversations  /  runbooks       │
└──────────────────────────────────┬──────────────────────────────────┘
                                   ▼
┌─────────────────────────────────────────────────────────────────────┐
│  IDLE → COLLECTING → CLUSTERING → DEDUPLICATING → UPDATING →         │
│  INDEXING → REPORTING                                                │
│                           OODA State Machine                         │
└──────────────────────────────────┬──────────────────────────────────┘
                                   ▼
┌─────────────────────────────────────────────────────────────────────┐
│  Named prompts → Deterministic handler  →  BYO-LLM Adapter          │
│  scripts/test_prompt.py    scripts/run_agent.py                     │
└──────────────────────────────────┬──────────────────────────────────┘
                                   ▼
┌─────────────────────────────────────────────────────────────────────┐
│  SQLite KB  →  templates/*.yaml  →  Articles / Index / Reports       │
└─────────────────────────────────────────────────────────────────────┘

Pack contents

File Role
README.md This file — overview and quick-start
SOUL.md Mission, values and OODA states specific to knowledge-base
PROMPTS.md 5 named and versioned system prompts
CHECKLIST.md 25 operational steps with commands
SPEC.md Technical spec, configurable parameters, interfaces
CHANGELOG.md v1.0.0 history
agent-knowledge-base-v1.json Pack manifest with stats and files
scripts/install.sh One-shot installer (venv, deps, systemd service)
scripts/config.yaml Configuration template to fill in
scripts/test_prompt.py Tests a prompt on a local example
scripts/run_agent.py Minimal swarm orchestrator
templates/*.yaml 3 business configuration templates

Quick installation

cd /opt/autonomous-stack/agent-knowledge-base-v1
bash scripts/install.sh

The installer checks for Python 3.10+, creates a venv, installs the dependencies, detects a local LLM provider and configures a systemd unit.


Immediate test

# Test the main prompt
python3 scripts/test_prompt.py --prompt collector --input templates/source_schema.yaml

# Run the agent in dry-run mode
python3 scripts/run_agent.py --config scripts/config.yaml --dry-run

# Run the offline tests
bash smoke_test.sh

Execution contract

The unique identifier of an article (entry_id) combines the topic and a hash of the content. The content signature (content_hash) prevents unnecessary updates. Unknown or malformed sources are rejected with an explicit status.

Common operations

python3 agent.py ingest --source data/runbooks --type markdown
python3 agent.py run --once --deterministic
python3 agent.py status
python3 agent.py query --topic deployment
python3 agent.py report --format json

The deterministic mode covers the included handlers without an LLM. The BYO-LLM mode is reserved for generating summaries and tag suggestions; its output must remain a JSON object and any error follows the same retry policy.


Customization

  1. Copy scripts/config.yaml to config.knowledge-base.yaml.
  2. Adapt the templates in templates/.
  3. Plug in your own sources in agent.py or via the ingest_files handler.

Costs and limits

This pack favors deterministic logic for critical decisions. The LLM is used for summarization, semantic clustering and tag suggestion. Refer to SPEC.md for the operating cost estimate.


License

Personal use per purchase. Resale prohibited.