psychology Complete Knowledge Base & Diagnostic Guide

Tropelex FAQ

Answers for developers, architects, and teams new to AI-assisted coding: how Tropelex captures rationale, optimizes token consumption, enforces safety governance, and accelerates AI pair programming.

search
Showing all 79 questions across 9 categories
hub

1. Fundamentals & Storage Architecture

Local-first storage, JSON memory structure, project isolation, and zero-cloud privacy architecture.

8 questions
hub Fundamentals

What is Tropelex and what problem does it solve?

expand_more

Tropelex is a persistent memory and rationale engine designed for AI coding agents. It solves the "stateless AI" problem where agents lose architectural context between chat sessions and repeatedly make conflicting decisions.

Without Tropelex, every new session requires re-explaining architectural choices, tech stack preferences, and safety boundaries. Tropelex acts as a long-term memory layer that automatically injects relevant project decisions, learned coding patterns, and rationale graphs directly into the AI prompt context, keeping human developers and AI agents perfectly aligned over months of active development.

hub Fundamentals

What is the difference between Tropelex, Tropebook, and the Web Dashboard?

expand_more

Tropelex is the overarching persistent memory and governance platform. Tropebook is the citation and web research engine inside Tropelex. The Web Dashboard is the graphical control panel.

Here is how the components relate:

  • Tropelex (Core Memory Engine): The parent framework (core/) providing project state storage, living ADRs, decision DAGs, causal Q&A, safety envelopes, and multi-agent coordination.
  • Tropebook (Citation & Research Engine): The research subsystem (core/tropebook/) responsible for deep web search, multi-provider query routing (Brave, Exa, Serper, DuckDuckGo), citation extraction, and research feed scheduling.
  • Web Dashboard (UI/animated_tropebook_dashboard/code.html): The interactive web front-end served at http://localhost:8766 providing visual management for all memory groups, knowledge graphs, and safety audit logs.
  • MCP Server (mcp_server/server.py): The Model Context Protocol bridge allowing external AI tools (Claude Code, Devin, Cursor, Zed, Gemini CLI) to read and write memory directly.
hub Fundamentals

Where is memory, research, and governance data stored on disk?

expand_more

All memory, research, and governance data is stored in standard local JSON files inside the memory/ directory of your workspace.

Tropelex operates on a 100% local-first architecture:

  • Project Decisions & Governance: memory/<project-name>.json (stores decisions, sessions, safety metrics, and confidence decay parameters).
  • Research & Citations: memory/tropebook/citations.json and memory/tropebook/research_feeds.json.
  • Session Diff Snapshots: memory/snapshots/ (stores timestamped unified diffs for time-travel and rollback).
  • Soft-Deleted Projects: memory/.trash/<project-name>.json (retained for 30 days before permanent deletion).
  • Security Hash Chains: Integrated directly into each decision record in memory/<project-name>.json as SHA-256 tamper-evident checksums.

No governance metrics or project code files are ever transmitted to third-party cloud servers or external databases.

hub Fundamentals

How does the Local-First Storage Architecture guarantee 100% data privacy?

expand_more

Tropelex requires no external database daemons (e.g. PostgreSQL, Redis, MongoDB) and transmits zero proprietary source code or decision telemetry to remote servers.

Key privacy guarantees:

  • Zero Telemetry Collection: All analytics, friction scores, and audit logs are computed locally on your machine.
  • Plaintext Version-Controllable Files: Memory files are standard JSON, allowing teams to check architectural memory directly into Git repositories alongside their code.
  • Offline Operation: The entire memory engine, decision DAG, Living ADR generator, and BM25 search fallback operate with 100% functionality on air-gapped networks.
hub Fundamentals

How does project isolation work, and how does soft-delete/trash retention work?

expand_more

Each project in Tropelex is completely isolated in its own dedicated JSON memory file (memory/<project>.json), preventing cross-contamination between unrelated codebases.

Key project lifecycle features:

  1. Isolated Namespaces: Decisions, sessions, goals, and agent budgets in project Alpha cannot leak into or overwrite project Beta.
  2. Soft-Delete Safety: When a project is deleted via the API (DELETE /api/memory/{project}), it is moved into memory/.trash/<project>.json rather than immediately unlinked from disk.
  3. 30-Day Trash Retention: Deleted projects in .trash/ remain restorable for 30 days. Projects older than 30 days are automatically purged during periodic maintenance ticks.
  4. Controlled Cross-Pollination: To intentionally share architectural patterns between projects, Tropelex uses the explicit Cross-Pollination endpoint (GET /api/memory/{project}/cross-pollinate), which searches other projects for matching embeddings without merging raw memory stores.
hub Fundamentals

How does Tropelex handle concurrent writes and race conditions across multiple agents?

expand_more

Tropelex employs atomic file-write patterns (write-to-temp + atomic rename) paired with file locking primitives (fcntl on POSIX / msvcrt on Windows) to guarantee ACID-like consistency during concurrent agent operations.

Concurrency mechanisms:

  • Atomic Replacement: Changes to memory/<project>.json are written to a temporary staging file (memory/.tmp_<project>_<pid>.json) and flushed to disk before executing an atomic OS-level rename.
  • Optimistic Concurrency & ETag Verification: API write endpoints verify prev_hash integrity; if two agents mutate the same project memory simultaneously, the second write detects a hash mismatch (HTTP 409) and safely merges using non-destructive DAG append rules.
hub Fundamentals

What are the hardware and runtime requirements for self-hosting Tropelex?

expand_more

Tropelex is designed to be ultra-lightweight and runs effortlessly on developer laptops, edge devices, or cloud CI/CD runners:

  • Operating System: Linux, macOS, or Windows (via WSL2 or native PowerShell).
  • Python Runtime: Python 3.10, 3.11, or 3.12+.
  • Memory Footprint: ~80 MB RAM baseline for the FastAPI backend and in-memory DAG index.
  • Storage Requirement: <50 MB for core installation; memory JSON files consume ~50 KB per 100 recorded decisions.
  • Dependencies: FastAPI, Uvicorn, Requests, NumPy, Pytest. (Zero required database servers).
hub Fundamentals

What do I do if I am not seeing any results for the active page?

expand_more

Try a hard refresh first (Ctrl+Shift+R / Cmd+Shift+R) — this clears the most common cause of "empty" or stuck data before you go looking for a real bug. If a section still displays empty metrics or zero decisions after that, ensure a project is selected in the top-bar dropdown (#global-project-select) and click the Refresh button on the section panel.

Follow these quick diagnostic steps:

  1. Hard refresh the page: Ctrl+Shift+R (Windows/Linux) or Cmd+Shift+R (Mac). If the dashboard server was restarted while your tab was open, a normal refresh can still serve stale page state — a hard refresh forces a clean reload and resolves this the vast majority of the time.
  2. Check Global Project Selection: Look at the top-right header dropdown. If it displays No project, click to select your active project (e.g., Tropelex).
  3. Run Diagnostic Self-Test: Navigate to Getting Started (Help Hub) and click Re-test All Systems to verify FastAPI backend connection and Pytest status.
  4. Verify File Memory: Confirm that memory/<project-name>.json exists in your workspace root. If empty, run /tropelex-show-context or record a starter decision.
speed

2. AI Performance, Context & Token Optimization

Token reduction, signature extraction, context compression, prompt lab, and anti-rationalization.

9 questions
speed AI & Context

How can I improve my general AI coding workflows?

expand_more

To maximize output quality with AI coding agents, establish consistent boundaries: define small modular tasks, record architectural decisions immediately, and maintain living context.

Recommended best practices:

  1. Record as You Decide: When you or your agent makes a choice (e.g., "Use SQLite with WAL mode for local storage"), log it immediately with /tropelex-record-decision.
  2. Bundle Context Before Coding: Prompt the agent with active decisions using /tropelex-show-context or context prefetch so the model respects existing constraints.
  3. End Every Session Cleanly: Use /tropelex-end-session with a one-sentence summary of what was accomplished; this updates confidence decay scores and detects friction zones.
  4. Enforce Safety Gates: Use the Pre-Write Safety Guard on large diffs to catch unintended architectural drift before committing to Git.
speed AI & Context

What makes the AI's job easier and potentially reduces token consumption?

expand_more

Providing a focused, structured memory snapshot of 5-10 active decisions is vastly more effective (and token-efficient) than dumping entire multi-megabyte source files into the prompt window.

Why focused memory beats raw file dumping:

  • Reduces Attention Distortion: Large context windows suffer from "lost in the middle" degradation where models ignore constraints buried in thousands of lines of code.
  • Cuts Token Cost by 80%+: Injecting a 500-token rationale summary costs a fraction of sending 50,000 tokens of raw source code on every request.
  • Eliminates Ambiguity: Explicit ADRs (e.g., "Do not use external dependencies for JSON parsing") prevent the AI from guessing or making conflicting assumptions.
speed AI & Context

What is the exact anatomy of an injected Tropelex context packet in an LLM prompt?

expand_more

When an agent requests context (/tropelex-show-context or POST /api/memory/{project}/rag/context), Tropelex synthesizes a clean Markdown block designed for the model's system prompt:

<!-- TROPELEX ARCHITECTURAL CONTEXT (Project: Tropelex) -->
## Active Constraints & Architectural Decisions:
1. [DEC-01] (Confidence: 1.0, PINNED) Using Python 3.10+ & FastAPI for REST API backend.
   - Rationale: Provides high-throughput async processing and native OpenAPI schemas.
2. [DEC-04] (Confidence: 0.95) All memory stored in local-first memory/<project>.json files.
   - Constraint: Zero external database daemons required.
3. [DEC-09] (Confidence: 0.88) SHA-256 Merkle hash chain maintained across all records.

## Active Engineering Goals:
- [Goal #1] Implement multi-project research feed subscriptions (Status: IN_PROGRESS).
- [Goal #2] Zero-warning Pytest execution across all 2,600+ unit tests.

## Negative Constraints (Past Rejected Approaches):
- DO NOT use Celery/Redis for background workers (Rejected in DEC-03: Use BackgroundScheduler).
speed AI & Context

How does Tropelex prevent "Lost-in-the-Middle" degradation across 128k+ context windows?

expand_more

Research shows that LLMs accurately retrieve information from the beginning and end of long context windows, but suffer steep accuracy drops on information placed in the middle.

Tropelex mitigates this by:

  1. Dynamic Context Chunking: Ordering high-priority pinned constraints at the very top of the system prompt.
  2. Context Compression: Stripping out redundant discussion and preserving only the distilled rule statements.
  3. Targeted Subgraph Extraction: Supplying only the 5-10 decisions directly connected to the active module rather than dumping the entire historical ledger.
speed AI & Context

What is context compression and how does it work?

expand_more

Context compression (core/compression.py / POST /api/compress) uses intelligent summarization and deduplication algorithms to condense long decision histories into compact token-efficient summaries without losing architectural intent.

Tropelex provides dual compression pathways:

  1. Deterministic / Heuristic Compression (No LLM Required): Clusters decisions by tag/component, merges superseded choices, and prunes stale historical iterations.
  2. LLM-Refined Compaction (OPENAI_API_KEY configured): Uses gpt-4o-mini to synthesize multi-paragraph rationale into dense, bulleted constraint rules.
speed AI & Context

How does Context Prefetch select the optimal subset of decisions for a prompt?

expand_more

Context Prefetch (core/rag.py / POST /api/memory/{project}/rag/context) analyzes the developer's active task prompt or target filename and uses hybrid retrieval to extract only the decisions directly relevant to the current edit.

The prefetch algorithm performs:

  1. Component / Keyword Matching: Extracts filenames, function names, and library tokens from the prompt.
  2. Semantic Cosine Similarity: Computes vector similarity against the decision embedding index.
  3. Graph Neighborhood Expansion: Follows caused_by and supersedes edges in the Decision Tree to include critical dependency constraints.
  4. Confidence Weighting: Prioritizes pinned and high-confidence decisions over decayed or stale entries.
speed AI & Context

How does Semantic Search work when API keys or vector embeddings are absent?

expand_more

Tropelex features an automatic zero-dependency fallback: if OPENAI_API_KEY is not set or embeddings cannot be computed, Tropelex falls back to a fast, local BM25/keyword ngram similarity engine.

  • With OpenAI Key: Uses text-embedding-3-small (1536 dimensions) with cosine distance computed via local NumPy routines.
  • Without OpenAI Key (Offline / Local): Tokenizes text into word-frequency term vectors with Jaccard/TF-IDF scoring. Search continues to function seamlessly with zero network dependencies.
speed AI & Context

What is Prompt Lab and how does Prompt Genealogy track win rates?

expand_more

Prompt Lab (Engine Core -> Prompt Lab) is an experimentation environment for drafting, testing, and tracking the evolutionary lineage of AI prompts across multiple model backends.

Key capabilities:

  • Prompt Genealogy (core/prompt_genealogy.py): Tracks parent/child versions of prompts, recording modifications made across iterations.
  • Win-Rate Rankings: Records binary or scored outcomes (e.g., test passed, build succeeded, code accepted) for each prompt variant.
  • Outcome Correlation: Calculates which prompt phrasing correlates with higher first-attempt code accuracy, helping teams standardize on high-performing system prompts.
speed AI & Context

What is the Goals & Intent Engine and how does it prevent agent goal drift?

expand_more

The Goals & Intent Engine (Engine Core -> Goals & Intent / core/goals.py) tracks active engineering objectives and scores whether ongoing code modifications remain aligned with the project's original intent.

Features of the Goals Engine:

  • Automatic Goal Detection: Infers active goals from Git commit messages and session diff summaries.
  • Goal Status Tracking: Monitors milestones across Active, Blocked, In Review, and Completed.
  • Alignment Scoring: Evaluates whether newly added decisions conflict with or advance active goal statements, alerting developers when an agent wanders off-track.
psychology

3. Decisions, Memory & Rationale

Living ADRs, decision graph lineages, ghost decision detection, contradiction analysis, and friction mining.

9 questions
psychology Decisions & Rationale

What is an Architecture Decision Record (ADR)?

expand_more

An ADR (Architecture Decision Record) is a short text document that captures an important architectural choice made in a project, along with its context, rationale, and consequences.

Tropelex introduces Living ADRs (core/adr_generator.py), which automatically compile your recorded project decisions into standardized industry formats:

  • Nygard Format: Concise Title, Context, Decision, and Status.
  • MADR (Markdown Architectural Decision Records): Standardized rationale, options considered, and pros/cons.
  • Tropelex Enhanced: Enriched with live decision tree relationships (supersedes, caused_by, reverts) and real-time confidence scores.
psychology Decisions & Rationale

What is the difference between a static ADR and a Living ADR?

expand_more

Traditional ADRs are static Markdown files written manually that quickly become outdated. A Living ADR in Tropelex is dynamically generated from real-time project memory, automatically updating confidence scores and lineage graph connections.

Unlike static files:

  • Living ADRs track Downstream Impact (which subsequent decisions were caused by this choice).
  • Living ADRs incorporate Time-Based Knowledge Decay scores.
  • Living ADRs automatically update when a decision is superseded or reverted in Git.
psychology Decisions & Rationale

What are Ghost Decisions and why do they matter?

expand_more

Ghost decisions occur when developers or AI agents write new code features or change architectures without logging the underlying rationale in project memory.

Ghost decisions create "silent drift," where future AI agents misunderstand the codebase structure and unintentionally break or revert unrecorded choices. Tropelex's Ghost Decision Scanner (Quality & Integrity) scans your repository diffs against active memory to surface uncaptured decisions before technical debt accumulates.

psychology Decisions & Rationale

What is the Knowledge Graph and how are decisions connected?

expand_more

The Knowledge Graph (Engine Core -> Decision Graph / core/decision_tree.py) is a D3.js visualization that auto-detects relationships between architectural choices.

The graph automatically links decisions using 4 key relationship types:

  1. supersedes: A newer decision replaces an older strategy.
  2. caused_by: A decision was required due to a previous technical choice.
  3. related_to: Shared component or tag context.
  4. reverts: Undoes a previous decision.
psychology Decisions & Rationale

How does Decision Tree Cycle Detection prevent circular logic in complex DAGs?

expand_more

The Decision Tree engine (core/decision_tree.py) runs Tarjan's strongly connected components algorithm to guarantee that architectural dependency links form a strict Directed Acyclic Graph (DAG).

If an agent attempts to link decision A -> caused_by -> B when B already depends on A (a circular dependency loop), Tropelex intercepts the mutation, rejects the invalid link, and issues an advisory error report.

psychology Decisions & Rationale

How does Tropelex compute Decision Confidence scores and half-life decay?

expand_more

Tropelex assigns every decision a Confidence Score (0.0 to 1.0) based on citation diversity, human verification, and temporal age.

Confidence Calculation Mechanics:

  • Base Score: Derived from citation richness and rationale detail.
  • Attestation Boost: When a human developer or tech lead reviews and attests a decision, its confidence resets to 1.0.
  • Half-Life Decay: Decisions that have not been reinforced, referenced, or attested over 30+ days gradually decay in confidence. Decayed decisions are flagged during Decay Reviews (Quality & Integrity) for re-validation or retirement.
psychology Decisions & Rationale

What is the difference between pinning, unpinning, and attesting a decision?

expand_more

Tropelex provides three explicit governance controls for managing the lifecycle of critical decisions:

  • Pinning (POST .../pin): Locks the decision into active context forever. Pinned decisions are immune to temporal decay and are guaranteed to appear in all context prefetch bundles.
  • Unpinning (POST .../unpin): Returns the decision to standard decay scoring.
  • Attesting (POST .../attest): Human sign-off confirming that the decision remains valid and compliant with current architecture, resetting its decay clock.
psychology Decisions & Rationale

How do I backfill or edit the rationale context for an existing decision?

expand_more

You can update the rationale context of any recorded decision without deleting it or breaking graph relationships using the context patch endpoint.

Execute a PATCH request against /api/memory/{project}/decisions/{decision_id}/context:

curl -X PATCH http://localhost:8766/api/memory/Tropelex/decisions/dec-123/context \
  -H "Content-Type: application/json" \
  -d '{"context": "Updated benchmark data confirms FastAPI out-performs Flask by 3.2x under async load."}'
psychology Decisions & Rationale

How does Tropelex track developer friction and frustration signals?

expand_more

Friction Mining (Quality & Integrity) scans session transcripts and editor behavior for implicit frustration signals (such as rapid repeated file saves, failed compilation loops, or repeated prompts).

When 5+ rapid saves occur in 5 seconds or a build command fails twice, Tropelex flags a Friction Zone. This alerts team leads and AI agents to clarify underspecified requirements before developer fatigue sets in.

security

4. Safety, Alignment & Governance

Pre-write safety guard, EU AI Act compliance, safety budgets, risk heatmaps, FAR audits, and SHA-256 hash chains.

12 questions
security Safety & Governance

What is synthetic data and why should I provide synthetic data details?

expand_more

Synthetic data refers to artificially generated training datasets, test suites, or mock payloads created by LLMs rather than collected from direct human activity.

Providing synthetic data details is vital for AI safety and legal compliance:

  1. Prevents Model Collapse: Over-reliance on synthetic outputs without ground-truth validation causes generational quality degradation.
  2. Auditability: Recording prompt provenance, generation seeds, and filtering thresholds ensures full reproducibility for enterprise security audits.
security Safety & Governance

What is the EU AI Act compliance checker in the Synthetic Data Policy?

expand_more

The Synthetic Data Policy engine (Safety & Alignment -> Synthetic Data Policies) validates project datasets against EU AI Act Article 10 and Article 13 transparency mandates.

Compliance checks include:

  • High-Risk AI Screening: Flags datasets used in safety-critical automated pipelines.
  • Watermarking & Provenance: Verifies that synthetic outputs contain cryptographic watermarks or metadata tags.
  • Bias & Representation Checks: Evaluates data diversity scores to mitigate automated demographic or technical bias.
security Safety & Governance

How does the Pre-Write Safety Guard evaluate proposed diffs?

expand_more

The Pre-Write Safety Guard (Quality & Integrity) lets you paste a proposed code diff or function change before applying it to test if it violates active decisions or security rules.

When you click Check for Ghosts / Pre-Write Check, Tropelex parses the AST and diff signature, comparing it against the project decision graph. If the proposed code introduces an unrecorded architecture change or breaks a safety constraint, Tropelex issues a warning report with recommended mitigations.

security Safety & Governance

What is the Safety Envelope and how does Tropelex enforce multi-dimensional operational limits?

expand_more

The Safety Envelope (Safety & Alignment -> Safety Envelope / core/safety_envelope.py) establishes dynamic operational boundaries beyond which an AI agent cannot execute changes without explicit human intervention.

The Safety Envelope monitors four simultaneous operational vectors:

  1. Token Velocity Cap: Limits maximum tokens consumed per minute to prevent runaway loops.
  2. Blast Radius Threshold: Evaluates the number of downstream dependent files affected by a proposed edit; changes exceeding the threshold trigger a containment warning.
  3. Protected Module Boundaries: Core kernel and security paths (e.g., core/governance.py, auth/, crypto routines) are marked immutable to unauthorized agents.
  4. Privilege Escalation Barriers: Prevents agents from assigning themselves elevated permissions or disabling test validation flags.

Query current safety envelope status:

curl -s http://localhost:8766/api/memory/Tropelex/safety-envelope
security Safety & Governance

How does Alignment Drift detection measure semantic deviation from project baseline values?

expand_more

Alignment Drift (Safety & Alignment -> Alignment Drift / core/alignment_drift.py) calculates the semantic vector distance between newly proposed architectural decisions and the project's foundational value charter.

Mechanics:

  • Baseline Value Anchor: When a project is initialized, foundational goals and non-negotiable architectural principles (e.g., "offline-first", "zero-telemetry", "deterministic verification") form the baseline embedding vector.
  • Rolling Semantic Cosine Distance: Every new decision is embedded and scored against the baseline.
  • Drift Velocity Alerting: If recent decisions drift more than 25% from the anchor (indicating subtle architectural erosion or reward hacking), Tropelex flags an Alignment Drift Warning on the governance dashboard (GET /api/memory/{project}/alignment/drift).
security Safety & Governance

What is Corrigibility Testing and how does Tropelex evaluate an agent's receptiveness to corrections?

expand_more

Corrigibility Testing (Safety & Alignment -> Corrigibility / core/corrigibility.py) measures how reliably an AI agent accepts, retains, and respects human architectural interventions without reverting to discarded approaches.

Features:

  • Rejection Memory: When a developer rejects an agent's proposed decision or code diff, Tropelex records the rejection rationale into the project negative-constraint ledger.
  • Corrigibility Score (0.0 to 1.0): If an agent repeatedly attempts rejected strategies across subsequent sessions, its Corrigibility Score drops, and its risk tier in the Persona Market is downgraded.
  • Reversion Detection: Flags instances where an agent silently reintroduces code patterns previously vetoed by human review (GET /api/memory/{project}/corrigibility).
security Safety & Governance

How does the Risk Heatmap quantify decision blast radius and cascade vulnerabilities?

expand_more

The Risk Heatmap (Safety & Alignment -> Risk Heatmap / core/risk_heatmap.py) analyzes the Decision DAG to identify high-centrality decisions whose failure or modification would cause widespread architectural disruption.

Risk Classification:

  • Critical Root Nodes (Red): Decisions with 5+ downstream caused_by dependents (e.g., primary database choice, authentication framework). Modifications require multi-agent consensus and human attestation.
  • Intermediate Nodes (Amber): Decisions with 2-4 dependents.
  • Leaf Nodes (Green): Isolated decisions with zero dependents (low blast radius; safe for autonomous agent refactoring).

Inspect risk metrics via REST API:

curl -s http://localhost:8766/api/memory/Tropelex/risk-heatmap
security Safety & Governance

What are Fairness, Accountability, and Robustness audits in Tropelex governance?

expand_more

Tropelex provides three automated audit engines (core/fairness.py, core/accountability.py, core/robustness.py) for enterprise governance compliance:

  1. Fairness Audit (GET /api/memory/{project}/fairness/audit): Scans synthetic datasets and agent decisions for demographic, statistical, or category imbalance.
  2. Accountability Report (GET /api/memory/{project}/accountability/report): Generates an auditable chain of custody linking every line of generated code to the exact prompt, agent persona, and human reviewer who authorized it.
  3. Robustness Test (GET /api/memory/{project}/robustness/test): Injects adversarial edge-case inputs into prompt templates to verify that safety constraints remain intact under jailbreak pressure.
security Safety & Governance

What is the Per-Agent Safety Budget and how do safety rate limits work?

expand_more

The Safety Budget system (Safety & Alignment -> Agent Safety Budget) assigns hourly or daily mutation limits to individual AI agents (e.g., Devin, Claude, Cursor, Gemini).

How Safety Budgets protect codebases:

  • Mutation Limits: Caps the number of decisions an agent can record or modify within a 1-hour window.
  • Risk Threshold Escalation: High-risk decisions (e.g., security, database schema changes) consume more budget than documentation updates.
  • Human-in-the-Loop Escalation: When an agent exhausts its safety budget, subsequent write actions are halted and routed to the Needs Attention queue for human approval.
security Safety & Governance

What is the Persona Market and how are Agent Risk Tiers evaluated?

expand_more

The Persona Market (Safety & Alignment -> Persona Leaderboard) tracks the behavioral reliability, test passing rate, and safety violation frequency of different AI personas and models.

Personas are classified into 3 Risk Tiers:

  • Tier 1 (Low Risk - Trusted): Models with >95% verification rates and zero security policy violations. Authorized with autonomous decision-logging privileges.
  • Tier 2 (Moderate Risk - Monitored): Models with occasional test regressions. Requires automated Pre-Write Guard validation.
  • Tier 3 (High Risk - Supervised): Experimental models or untrusted external scripts. All decisions are placed in Pending Review until confirmed by a human developer.
security Safety & Governance

What is the "Needs Attention" queue and how do citation health checks work?

expand_more

The Needs Attention panel (Safety & Alignment -> Needs Attention) aggregates actionable governance flags that require developer intervention.

Flags include:

  1. Broken / Stale Citations: Decisions citing URLs or research feeds that return HTTP 404/500 errors.
  2. Escalated Safety Reviews: Decisions flagged by the Pre-Write Guard or budget exhaustion.
  3. Ghost Decision Alerts: Code modifications detected without corresponding memory records.
security Safety & Governance

How does Tropelex detect memory tampering and verify SHA-256 hash chains?

expand_more

Tropelex maintains a cryptographic Merkle-like hash chain across all recorded decisions in memory/<project>.json.

Every decision contains a hash computed from its timestamp, text, rationale, and the hash of the preceding decision (prev_hash). Running the integrity verification tool (GET /api/memory/{project}/integrity/verify) recalculates the entire chain; if any historical decision was modified or deleted outside of Tropelex, the tamper detection engine identifies the exact corrupted record.

history

5. Memory Lifecycle, Time Travel & Compaction

Session replay, rollback mechanisms, memory compaction, decay reviews, and 30-day trash retention.

5 questions
history Lifecycle & Time Travel

How do I rollback memory or time-travel to a previous session?

expand_more

Session Replay (Memory Lifecycle -> Session Replay) snapshots memory state at the start and end of every session, allowing you to view structured diffs or rollback project memory.

If an experimental session introduced unwanted or incorrect decisions into project memory:

  1. Navigate to Memory Lifecycle -> Session Replay.
  2. Click diff to inspect exact memory changes made during that session.
  3. Click Rollback (POST /api/memory/{project}/sessions/{session_id}/rollback) to restore project memory to the exact state before that session began.
history Lifecycle & Time Travel

How does session snapshotting work during active work sessions?

expand_more

When you call /tropelex-end-session or invoke the session endpoint, Tropelex records a session object containing:

  • Start and End timestamps.
  • List of decisions added, updated, or superseded during the session.
  • Git commit hash and unified diff snapshot saved in memory/snapshots/.
  • Developer friction metrics and test outcomes.

---

history Lifecycle & Time Travel

How does Memory Compaction prevent context bloat over months of use?

expand_more

Over long projects, logging hundreds of decisions could bloat the memory store. Memory Compaction (POST /api/compress) runs hierarchical pruning to maintain high signal-to-noise ratio.

Compaction actions:

  1. Merges intermediate iterative decisions into final architectural rules.
  2. Archives superseded historical iterations into deep storage.
  3. Preserves all pinned, attested, and active Living ADRs with 100% fidelity.
history Lifecycle & Time Travel

How do automated Decay Reviews prompt developers to re-attest stale architectural assumptions?

expand_more

Decay Reviews (Quality & Integrity -> Decay Reviews / core/decay.py) run automated periodic audits that flag decisions that have not been reinforced in 30, 60, or 90 days.

When a decision reaches its decay threshold:

  • It is placed on the Decay Review Queue.
  • Developers can choose:
  • Attest: Resets the confidence clock to 1.0 for another 30 days.
  • Supersede: Log a newer decision that replaces the outdated strategy.
  • Deprecate: Archive the decision into inactive history.
history Lifecycle & Time Travel

How does 30-Day Trash Retention allow instant recovery of deleted projects?

expand_more

When a project is deleted via DELETE /api/memory/{project}, Tropelex moves the file to memory/.trash/<project>.json instead of executing an unrecoverable unlink.

To restore a deleted project:

# Move the file back from .trash to active memory
mv memory/.trash/MyProject.json memory/MyProject.json

After moving the file back, execute a refresh on the dashboard or call GET /api/projects to resume work immediately.

menu_book

6. Research, Ingestion & Feeds (Tropebook)

Deep research citations, multi-engine routing, query fingerprint caching, automated feeds, and citation hygiene.

9 questions
menu_book Research & Feeds

What is the Tropebook citation engine and how does Deep Research work?

expand_more

Tropebook is Tropelex's deep research engine (core/tropebook/) that performs verified web research and automatically extracts citation-grade documentation.

Deep Research Workflow (POST /api/research/auto):

  1. Multi-Engine Search Routing: Queries primary search engines (Brave Search -> Exa -> Serper -> DuckDuckGo fallback).
  2. Page Content Extraction & Markdown Conversion: Downloads full HTML, strips ads/cruft, and parses technical documentation into clean Markdown.
  3. Citation Ledger: Saves source URLs, snippets, and publication dates into memory/tropebook/citations.json.
menu_book Research & Feeds

How does Multi-Engine Search Routing prioritize providers (Brave, Exa, Serper, DuckDuckGo) and handle fallbacks?

expand_more

Tropebook uses an intelligent cascading provider architecture (core/tropebook/deep_research.py) that prioritizes citation-rich search engines and automatically fails over if a provider is unavailable or rate-limited.

Cascading Resolution Order:

  1. Brave Search API (BRAVE_SEARCH_API_KEY): Primary provider. Delivers structured technical citations, publication timestamps, and raw text snippets.
  2. Exa Neural Search (EXA_API_KEY): Secondary semantic fallback. Excellent for finding obscure code patterns and developer blog discussions.
  3. Serper Google API (SERPER_API_KEY): High-volume fallback for broad technical queries.
  4. DuckDuckGo (Zero-Key Local Fallback): Guaranteed fallback requiring zero API keys and zero configuration.

If a primary provider returns HTTP 429 or 503, Tropebook seamlessly switches to the next provider without failing the parent research task.

menu_book Research & Feeds

What are the differences between Quick, Balanced, and Deep research presets?

expand_more

Tropebook provides 3 research presets tailored for different latency and depth requirements:

  • Quick (Fastest): Executes 1 targeted search query against the top provider. Returns immediate 3-5 citation summaries in <2 seconds.
  • Balanced (Default): Runs 3 diversified queries across multiple search providers. Extracts full body markdown from the top 3 results.
  • Deep (Comprehensive): Executes 5+ recursive queries with query-fingerprint caching. Analyzes multiple sources for consensus, contradiction detection, and citation diversity scoring.
menu_book Research & Feeds

What is Query-Fingerprint Caching and how does it prevent redundant API token burn?

expand_more

Query-Fingerprint Caching (core/tropebook/deep_research.py) computes a deterministic SHA-256 hash of normalized search queries to prevent duplicate external API calls.

Mechanics:

  • Query Normalization: Strips punctuation, sorts keyword tokens, and lowercases text.
  • Cache TTL: Search results and parsed markdown extracts are cached locally in memory/tropebook/cache/ for 24 hours (configurable).
  • Token Savings: If multiple coding agents or research feeds ask identical questions (e.g., "FastAPI async background tasks"), cached citation bundles are returned in <5ms with zero external API token burn.
menu_book Research & Feeds

How do Multi-Project Research Feeds and automated background scheduling work?

expand_more

Research Feeds (Research & Ingestion -> Research Feeds / core/research_feeds.py) allow you to subscribe to ongoing topics (e.g., "FastAPI security advisories", "PyTorch 2.x migration guides").

Features:

  • Automated Background Polling: Tropelex's background scheduler checks active feeds periodically.
  • Multi-Project Sharing: Feeds can be shared across multiple projects without duplicating research runs.
  • Citation Notifications: Discovered updates appear directly in your dashboard telemetry stream.
menu_book Research & Feeds

How does Decision Promotion convert web research into verified architectural decisions?

expand_more

Decision Promotion (POST /api/memory/{project}/decisions/promote) allows you to convert a research finding directly into an official project decision with attached source citations in a single click.

When a research run produces a validated architectural solution:

  1. In the Research UI, click Promote to Decision.
  2. Tropelex copies the finding into memory/<project>.json, attaches the citation IDs, and links the decision into the Decision Tree.
menu_book Research & Feeds

How do Query Rewrite Suggestions improve automated research feed results?

expand_more

Query Rewrite (POST /api/research-feeds/{feed_id}/suggest-query-rewrite) uses LLM analysis to refine search terms when an automated research feed returns too few results or excessive off-topic noise.

When you trigger a query rewrite:

  • Broadening: Expands overly restrictive queries (e.g., converting "Python 3.12 GIL removal deadlock in multiprocessing" to broader semantic concepts).
  • Narrowing: Adds negative keyword exclusions when generic search terms return consumer marketing articles instead of technical developer documentation.
groups

7. Multi-Agent Workflows & Team Collaboration

Cross-pollination, agent handoff packets, multi-agent synchronization, PR commentary synthesis, and cost ledgers.

5 questions
groups Multi-Agent & Team

How do multiple different AI agents collaborate on the same project memory?

expand_more

Tropelex acts as a universal coordination bus across diverse AI models and coding assistants (e.g., Claude Code, Cursor, Devin, Gemini CLI, Zed, Aider).

Collaboration mechanics:

  • Unified State Ledger: When Claude Code records an architectural decision, Cursor and Devin immediately see that decision in their context prefetch bundle on the next edit.
  • Attribution Metadata: Every decision and session record logs the agent (e.g., claude-3-5-sonnet, gemini-1.5-pro, devin) and persona role responsible for the change.
  • Conflict Prevention: When Agent A is working on module auth/, Tropelex flags active work in progress to prevent Agent B from applying colliding diffs.
groups Multi-Agent & Team

What is an Agent Handoff Packet and when should I use it?

expand_more

An Agent Handoff Packet (Team & Collaboration -> Agent Handoff) is a role-tailored context bundle designed to transfer work from one specialized agent role to another (e.g., from Architect to CoderAgent or TestEngineer).

Instead of dumping raw context, the packet builder (core/handoff/packet_builder.py) filters decisions and requirements to match the receiving agent's role profile:

  • CoderAgent: Receives function signatures, active API tasks, and structural guidelines.
  • TestEngineer: Receives boundary conditions, failure cases, and assertion targets.
  • DevOpsSpecialist: Receives deployment constraints, environment variables, and safety envelope limits.
groups Multi-Agent & Team

Can Tropelex share rationale and knowledge across different projects (Cross-Pollination)?

expand_more

Yes. Tropelex includes a Cross-Pollination Engine (core/rag.py) that searches across multiple project memories to suggest proven architectural solutions and patterns from other repositories.

If you encounter a problem in project B (e.g., "implement JWT auth with refresh tokens"), Tropelex's semantic RAG engine checks project A's decision ledger and suggests identical, verified solutions that succeeded in past sessions.

groups Multi-Agent & Team

How does PR Commentary Synthesis generate high-context pull request summaries?

expand_more

PR Commentary Synthesis (core/pr_synthesis.py / POST /api/memory/{project}/pr-summary) analyzes session diffs and recorded decisions to generate complete, high-quality GitHub/GitLab PR descriptions.

Generated PR descriptions include:

  1. Summary of Changes: Grouped by architectural component.
  2. Linked Decisions & ADRs: Explicitly documents why each change was made with links to active decision records.
  3. Safety & Test Verification: Summarizes Pytest outcomes, lint validations, and Pre-Write Safety Guard checks.
groups Multi-Agent & Team

How does the Financial Cost Ledger track token expenditure across models?

expand_more

The Financial Cost Ledger (Integrations & Ops -> Cost Ledger / GET /api/memory/{project}/cost/report) computes real-time dollar estimates for all LLM calls, embeddings, and research queries.

Cost tracking features:

  • Model Pricing Breakdown: Tracks token costs across Claude 3.5 Sonnet, GPT-4o, GPT-4o-mini, Gemini 1.5 Pro, and DeepSeek.
  • Per-Agent Attribution: Identifies which agent or persona consumed the highest token volume.
  • Savings from Context Compaction: Quantifies total dollars saved by injecting compacted memory over raw full-file context.
extension

8. Integrations, Tools & IDE Plugins

Model Context Protocol (MCP), OpenCode/Claude/Cursor/Zed slash commands, Emacs/VSCode plugins, and Git sync.

6 questions
extension Integrations & Tools

How do I configure the Tropelex Model Context Protocol (MCP) Server?

expand_more

Tropelex provides a standard MCP server in mcp_server/server.py exposing 11 tools and 4 interactive prompts.

Add Tropelex to your client's MCP configuration (e.g., ~/.claude/claude_desktop_config.json or .mcp.json):

{
  "mcpServers": {
    "tropelex": {
      "command": "python3",
      "args": ["-m", "mcp_server.server"],
      "env": {
        "TROPELEX_URL": "http://127.0.0.1:8766"
      }
    }
  }
}
extension Integrations & Tools

What slash commands are supported in OpenCode, Claude Code, Devin, Gemini CLI, Zed, Cursor, and Aider?

expand_more

Tropelex provides full slash command parity across all major AI coding environments:

Slash CommandSupported AI ToolsUsage & Description
/tropelex-record-decision (or /record_decision)OpenCode, Claude Code, Devin, Gemini CLI, Zed, Cursor, AiderRecords architectural decision: /tropelex-record-decision Using FastAPI
/tropelex-end-session (or /end_session)OpenCode, Claude Code, Devin, Gemini CLI, Zed, Cursor, AiderSummarizes work session: /tropelex-end-session Completed auth module
/tropelex-show-context (or /show_context)OpenCode, Claude Code, Devin, Gemini CLI, Zed, CursorDisplays active task context bundle
/tropelex-context (or /explain_why)OpenCode, Claude Code, Devin, Gemini CLI, Zed, CursorAsks causal question: /explain_why Why did we choose SQLite?
/tropelex-upOpenCode, Claude CodeInitializes or updates project details
extension Integrations & Tools

How do I integrate Tropelex with Emacs or VSCode?

expand_more

Tropelex includes native integrations for Emacs (emacs/tropelex-capture.el) and VSCode extensions (vscode-tropelex/).

In Emacs:

  • C-c t c: Capture active buffer / function as a decision.
  • C-c t r: Capture selected region as decision context.
  • C-c t f: Scan buffer for friction signals.
  • C-c t g: Capture current git HEAD commit as a decision.
  • C-c t s: Check server connectivity.
extension Integrations & Tools

How does the Terminal UI (TUI) work and when should I use it?

expand_more

Tropelex includes a standalone curses-based Terminal UI (core/tropebook/tui.py) designed for lightweight SSH sessions, remote headless servers, or developers who prefer working purely inside the terminal.

Launch the TUI from the repository root:

python3 -m core.tropebook.tui

Use the arrow keys or j/k to navigate decisions, view active citations, search research feeds, and trigger compaction without opening a browser.

extension Integrations & Tools

How does Git Sync automatically synchronize repository commits with decision memory?

expand_more

Git Sync (Integrations & Ops -> Git Sync / POST /api/git/sync) connects your Git commit history with Tropelex's architectural decision ledger.

Git Sync capabilities:

  • Commit-to-Decision Linking: Matches Git commit hashes with decisions made in corresponding work sessions.
  • Auto-Commit Memory: Automatically stages and commits updated memory/<project>.json files when milestone sessions are completed.
  • Deep Git Summary: Analyzes recent repository commit logs to detect potential unrecorded architectural changes.
extension Integrations & Tools

How does the OpenCode plugin hook into prompt generation via plugins/tropelex.js?

expand_more

The OpenCode plugin (plugins/tropelex.js) registers custom tool handlers and slash commands directly with the OpenCode runtime.

When you execute /tropelex-show-context inside OpenCode:

  1. plugins/tropelex.js queries http://127.0.0.1:8766/api/memory/{project}/rag/context.
  2. The endpoint returns the structured context block.
  3. The plugin injects the block directly into the ongoing agent conversation as a high-priority system context message.
build

9. Troubleshooting, Error Codes & Diagnostics

Port 8766 conflicts, 401/403/404/409/422/429/500/503 HTTP status codes, OS errnos, Pytest suites, and repair endpoints.

16 questions
build Troubleshooting & Errors

Why am I getting [Errno 98] address already in use when starting the server?

expand_more

This error occurs when a previous instance of the Tropelex FastAPI server (or another service) is already running and bound to port 8766.

To resolve:

  1. Find the running process PID: ``bash pgrep -f "core.tropebook.web.server" ``
  2. Terminate the existing process: ``bash kill -9 $(pgrep -f "core.tropebook.web.server") ``
  3. Restart the server: ``bash python3 -m core.tropebook.web.server ``
build Troubleshooting & Errors

Why do I see "401 Unauthorized" or "API Key Missing" on certain endpoints?

expand_more

Tropelex runs core memory features locally without requiring API keys. However, certain advanced external features require third-party provider keys:

  • Web Deep Research (/api/research/auto): Requires BRAVE_SEARCH_API_KEY, EXA_API_KEY, or SERPER_API_KEY. (DuckDuckGo fallback runs if none are provided).
  • Vector Embeddings (/api/semantic-search): Uses OPENAI_API_KEY. If absent, Tropelex automatically switches to the offline TF-IDF keyword similarity fallback.
  • Set keys in your environment or workspace .env file:
  export BRAVE_SEARCH_API_KEY="your_brave_key"
  export OPENAI_API_KEY="your_openai_key"
build Troubleshooting & Errors

Why are changes to memory not immediately visible in the dashboard?

expand_more

If newly recorded decisions do not appear on the web UI immediately, it is typically due to browser caching or project mismatch in the dashboard header.

Resolution steps:

  1. Hard Refresh: Press Ctrl+Shift+R (Windows/Linux) or Cmd+Shift+R (Mac) to bypass stale browser cache.
  2. Verify Active Project: Check the project dropdown in the top-right header and ensure the correct project is active.
  3. Check Server WebSocket Telemetry: Ensure the backend server is running and transmitting telemetry events.
build Troubleshooting & Errors

What should I do if an MCP client (Claude, Cursor, Devin, Zed) cannot connect to Tropelex?

expand_more

If your MCP client reports that the Tropelex server is unreachable or tools are missing:

  1. Verify Server is Running: Confirm http://127.0.0.1:8766/api/health returns {"status": "ok"}.
  2. Verify Python Path in MCP Config: Ensure the command in .mcp.json points to the correct virtualenv or system python3 binary with Tropelex dependencies installed.
  3. Test MCP Server Directly: ``bash python3 -m mcp_server.server `` The process should start in stdio mode without throwing ImportError or syntax errors.
build Troubleshooting & Errors

Why is the OpenCode plugin not registering /tropelex-* slash commands?

expand_more

If /tropelex-* commands do not autocomplete in OpenCode:

  1. Confirm Plugin Installation: Ensure plugins/tropelex.js is copied to your OpenCode plugins directory: ``bash cp plugins/tropelex.js ~/.config/opencode/plugins/tropelex.js ``
  2. Check opencode.json: Confirm "tropelex" is listed in the "plugin" array inside ~/.config/opencode/opencode.json.
  3. Restart OpenCode: Fully restart your OpenCode session to reload plugins.
build Troubleshooting & Errors

How do I diagnose and fix a corrupted or malformed memory/<project>.json file?

expand_more

If a memory JSON file becomes corrupted due to an interrupted write or manual edit error:

  1. Validate JSON Syntax: ``bash python3 -m json.tool memory/<project>.json > /dev/null ``
  2. Restore from Snapshot: Check memory/snapshots/ for the most recent session backup.
  3. Check Soft-Delete Trash: If the file was inadvertently deleted, check memory/.trash/<project>.json.
  4. Repair Hashes: If the file is valid JSON but fails integrity checks, run the hash backfill endpoint: ``bash curl -X POST http://localhost:8766/api/memory/<project>/security/backfill-hashes ``
build Troubleshooting & Errors

How do I run the automated Pytest suite to verify system health?

expand_more

Per the Tropelex testing mandate, run pytest directly in your Linux/WSL terminal:

pytest tests/ -x -q

All unit tests must pass before declaring features or bug fixes complete. Note: Last30Days engine tests consume external API tokens and are excluded by default; to run them explicitly, run pytest -m last30days.

build Troubleshooting & Errors

What do the different HTTP status codes mean in Tropelex?

expand_more

Tropelex follows standard REST API conventions with predictable HTTP status codes for success, client errors, security gating, and server anomalies:

Status CodeMeaningPrimary Trigger in Tropelex
200 OKSuccessRequest succeeded and payload returned.
302 FoundRedirectAutomatic redirect (e.g. root / routing to dashboard).
400 Bad RequestMalformed RequestMissing required payload parameters or invalid timeline filters.
401 UnauthorizedAuthentication RequiredEndpoint requires an API token or security key.
403 ForbiddenAction BlockedPre-Write Safety Guard violation or Safety Budget exhausted.
404 Not FoundResource MissingProject container, Decision ID, Session ID, or Feed ID not found.
409 ConflictState ConflictProject already exists or SHA-256 hash chain mismatch.
422 Unprocessable EntitySchema Validation FailurePydantic model validation error (invalid types, missing nested keys).
429 Too Many RequestsRate Limit ExceededAgent hourly mutation cap hit or search provider rate limit.
500 Internal ErrorServer ExceptionUnhandled Python exception or corrupted disk JSON file.
503 Service UnavailableService DegradedExternal search provider down or background worker initializing.
build Troubleshooting & Errors

HTTP 400 Bad Request — Root Causes & Solutions

expand_more

An HTTP 400 Bad Request indicates that the request syntax or payload structure was invalid.

Common Triggers:

  • Sending empty or whitespace-only decision text in POST /api/memory/{project}/decisions.
  • Providing an invalid ISO 8601 timestamp range for timeline queries.
  • Submitting malformed citation promotion requests missing required citation_id or target_project.

How to Fix:

  1. Inspect the JSON error response: {"detail": "<specific validation error>"}.
  2. Ensure Content-Type: application/json is sent in the request header.
  3. Validate that required string fields contain at least 1 non-whitespace character.
build Troubleshooting & Errors

HTTP 401 Unauthorized & 403 Forbidden — Security Gates & Safety Budgets

expand_more

HTTP 401 occurs when credentials are missing. HTTP 403 occurs when credentials are valid, but the action is blocked by governance rules or safety limits.

Common Triggers for 401 Unauthorized:

  • Attempting to call protected management endpoints without a bearer token when authentication is active.

Common Triggers for 403 Forbidden:

  • Pre-Write Safety Violation: Proposed diff or action triggers a high-severity security rule.
  • Safety Budget Exhaustion: An automated agent exceeded its hourly decision creation quota (see Agent Safety Budget).
  • Locked Decision Mutation: Attempting to modify or delete a pinned/attested decision without explicit tech lead attestation.

How to Fix:

  • If blocked by a safety budget, approve the pending action in the Needs Attention dashboard queue or escalate via POST /api/memory/{project}/agents/{agent}/safety-budget/escalate.
  • If authentication failed, ensure your client passes the configured API key header.
build Troubleshooting & Errors

HTTP 404 Not Found — Missing Projects, Decisions & Feeds

expand_more

An HTTP 404 Not Found indicates that the server cannot locate the requested project, decision, session, or research feed.

Common Triggers:

  • GET /api/memory/MyProject: The file memory/MyProject.json does not exist.
  • PATCH .../decisions/dec-999/context: Decision dec-999 does not exist in the specified project.
  • GET /api/research-feeds/feed-123: The feed ID is invalid or was deleted.

How to Fix:

  1. Check the list of active projects via GET /api/projects.
  2. If the project was recently deleted, restore it from memory/.trash/<project>.json.
  3. Check decision IDs using GET /api/memory/{project} before executing PATCH or DELETE requests.
build Troubleshooting & Errors

HTTP 409 Conflict — Name Collisions & Integrity Hash Conflicts

expand_more

An HTTP 409 Conflict occurs when a request attempts to create a duplicate entity or creates a cryptographic integrity discrepancy.

Common Triggers:

  • Duplicate Project: Calling POST /api/memory with a project name that already exists.
  • Hash Chain Conflict: Direct manual edits to memory/<project>.json that broke SHA-256 prev_hash links.
  • Session Rollback Collision: Attempting to rollback a session that was already reverted.

How to Fix:

  • For duplicate project names, choose a unique project identifier.
  • For hash conflicts, run the automatic repair endpoint:
  curl -X POST http://localhost:8766/api/memory/<project>/security/backfill-hashes
build Troubleshooting & Errors

HTTP 422 Unprocessable Entity — Schema & Payload Validation Failures

expand_more

An HTTP 422 Unprocessable Entity is returned by FastAPI when request payload fields fail Pydantic model validation.

Common Triggers:

  • Sending a string where an integer is expected (e.g., "limit": "ten" instead of "limit": 10).
  • Missing a required field in nested objects (e.g. omitting "status" in goal updates).
  • Submitting confidence threshold values outside the valid 0.0 to 1.0 range.

How to Fix: Inspect the FastAPI validation error payload:

{
  "detail": [
    {
      "loc": ["body", "confidence"],
      "msg": "Input should be less than or equal to 1.0",
      "type": "less_than_equal"
    }
  ]
}

Update your client request payload to match the OpenAPI specification at /openapi.json.

build Troubleshooting & Errors

HTTP 429 Too Many Requests — Agent Mutation Rates & Provider Throttling

expand_more

An HTTP 429 Too Many Requests indicates that request frequency has exceeded allowable thresholds.

Common Triggers:

  • Agent Mutation Cap: An agent in an infinite coding loop dispatched too many decision requests in a 60-second window.
  • Search Engine Rate Limit: Brave Search or Exa API returned 429 due to query quota limits.

How to Fix:

  1. For agent limits: Throttle agent execution rate or increase the agent's hourly budget in Agent Safety Budget.
  2. For research limits: Tropelex automatically falls back to DuckDuckGo when primary search keys encounter 429 errors.
build Troubleshooting & Errors

HTTP 500 Internal Server Error & 503 Service Unavailable — Server & Provider Failures

expand_more

HTTP 500 indicates an unexpected internal server crash. HTTP 503 indicates a temporary downstream service outage.

Common Triggers for 500:

  • Corrupted JSON syntax on disk in memory/<project>.json.
  • Disk full or file lock contention during high-concurrency writes.

Common Triggers for 503:

  • Background scheduler initializing or stopped.
  • All web search providers (Brave, Exa, Serper, DuckDuckGo) unreachable due to network outage.

How to Fix:

  1. Check the server console log output for python tracebacks.
  2. Validate JSON files with python3 -m json.tool memory/<project>.json.
  3. Check internet connectivity if running deep research queries.
build Troubleshooting & Errors

System & OS Error Codes (Errno 98, Errno 13, Errno 2) & CLI Exit Codes

expand_more

When running Tropelex from the command line, POSIX OS error numbers and CLI return codes communicate underlying runtime conditions:

chevron_rightOperating System Error Codes

  • [Errno 98] Address already in use (EADDRINUSE): Another process is listening on port 8766. Kill existing PID via kill -9 $(pgrep -f "core.tropebook.web.server").
  • [Errno 13] Permission denied (EACCES): Current user lacks read/write permissions for memory/ or static UI directories. Run chmod -R u+rw memory/.
  • [Errno 2] No such file or directory (ENOENT): Required folder memory/ does not exist. Run mkdir -p memory/snapshots memory/tropebook memory/.trash.

chevron_rightCLI & Pytest Exit Codes

  • Exit Code 0: Clean termination / all Pytest tests passed.
  • Exit Code 1: One or more Pytest tests failed, or fatal CLI argument error.
  • Exit Code 2: Process interrupted by user (SIGINT / Ctrl+C).
  • Exit Code 4: Pytest command-line usage syntax error.
  • Exit Code 5: No tests were collected by Pytest.
contact_support

Need Further Help?

Once you're running Tropelex, launch the interactive dashboard at http://localhost:8766 and open Getting Started for live diagnostics and one-click CLI copiers.