Files
ai/gateway/knowledge
Tim Olson 47471b7700 Expand model tag support: add GLM-5.1, simplify Anthropic IDs, scan tags anywhere in message
- Flink update_bars debouncing
- update_bars subscription idempotency bugfix
- Price decimal correction bugfix of previous commit
- Add GLM-5.1 model tag alongside renamed GLM-5
- Use short Anthropic model IDs (sonnet/haiku/opus) instead of full version strings
- Allow @tags anywhere in message content, not just at start
- Return hasOtherContent flag instead of trimmed rest string
- Only trigger greeting stream when tag has no other content
- Update workspace knowledge base references to platform/workspace and platform/shapes
- Hierarchical knowledge base catalog
- 151 Trading Strategies knowledge base articles
- Shapes knowledge base article
- MutateShapes tool instead of workspace patch
2026-04-28 15:05:15 -04:00
..

Dexorder Knowledge Base

This directory contains global knowledge documents that are automatically loaded into the agent's context at startup.

Structure

  • platform/: Platform architecture and capabilities
  • trading/: Trading concepts and fundamentals
  • indicators/: Indicator development and usage
  • strategies/: Strategy development and patterns

Document Format

Documents should be in Markdown format with:

  • Clear headings for chunking
  • Optional YAML frontmatter for tags
  • Code examples where relevant
  • Cross-references to other docs

Frontmatter Fields

description (required) — One or two sentences describing what the article covers. This is injected into every agent's system prompt as a KB catalog so agents know what to look up without making an extra tool call.

tags (optional) — List of topic tags for categorization.

Example with Frontmatter

---
description: "Patterns for writing custom Python indicator scripts that compute values from OHLCV data and plot live on the chart."
tags: [indicators, python, development]
---

# Custom Indicator Development

Content here...

How It Works

  1. At gateway startup, the DocumentLoader scans this directory
  2. Each markdown file is chunked by headers (max ~1000 tokens per chunk)
  3. Content hash tracking enables incremental updates

Updating Documents

During Development

  • Edit markdown files
  • Restart gateway or call reload endpoint: POST /admin/reload-knowledge

In Production

  • Update markdown files in git
  • Deploy new version
  • Gateway will detect changes and update vectors automatically

Adding New Documents

  1. Create markdown file in appropriate subdirectory
  2. Use clear section headers (##, ###) for automatic chunking
  3. Include practical examples and code samples
  4. Add tags in frontmatter if using complex categorization
  5. Restart gateway or reload knowledge

Best Practices

  • Keep chunks focused: Each section should cover one topic
  • Use examples: Code samples and practical examples help
  • Link concepts: Reference other docs for deeper dives
  • Update regularly: Keep knowledge current with platform changes
  • Test queries: Verify RAG retrieves relevant chunks

Maintenance

The DocumentLoader tracks:

  • Content hashes for change detection
  • Number of chunks per document
  • Last update timestamps

Check logs for load statistics:

Knowledge documents loaded: { loaded: 5, updated: 2, skipped: 3 }