nothingworry commited on
Commit
6e24963
Β·
1 Parent(s): 09e23a2

update the readme file

Browse files
Files changed (2) hide show
  1. README.md +24 -1
  2. backend/README.md +35 -0
README.md CHANGED
@@ -113,8 +113,15 @@ Then access:
113
  - πŸ” **Fine-Grained Role-Based Access Control (RBAC)** – Four-tier role system (viewer, editor, admin, owner) with dynamic UI visibility and backend permission enforcement; frontend automatically shows/hides features based on role
114
  - πŸ”„ **Intelligent Multi-Tool Orchestration** – MCP agent orchestrator autonomously selects optimal tool chains (RAG + Web + LLM, etc.) based on query intent, context, latency predictions, and previous tool outputs. Context-aware routing enables sophisticated tool skipping for efficiency
115
  - ⚑ **Robust Error Handling** – Structured error responses, retry mechanisms, and graceful fallbacks (e.g., if RAG fails β†’ fallback to LLM-only)
116
- - πŸ“‘ **Streaming Responses** – Chat responses stream word-by-word using Server-Sent Events (SSE) for real-time user experience
117
  - 🎯 **Rule-First Processing** – Admin rules checked before intent classification - rules can trigger brief responses or block requests entirely
 
 
 
 
 
 
 
118
 
119
  ### Enterprise Features
120
 
@@ -1006,6 +1013,22 @@ This project is licensed under the MIT License - see the [LICENSE](LICENSE) file
1006
  - **Massive Accuracy Improvement**: Re-ranking significantly improves relevance of search results
1007
  - **Seamless Integration**: Works transparently with existing RAG search API
1008
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1009
  ### UI Improvements
1010
  - **Modern Drag-and-Drop**: Intuitive file upload with visual feedback
1011
  - **Enhanced Status Messages**: Clear success/error messages with icons
 
113
  - πŸ” **Fine-Grained Role-Based Access Control (RBAC)** – Four-tier role system (viewer, editor, admin, owner) with dynamic UI visibility and backend permission enforcement; frontend automatically shows/hides features based on role
114
  - πŸ”„ **Intelligent Multi-Tool Orchestration** – MCP agent orchestrator autonomously selects optimal tool chains (RAG + Web + LLM, etc.) based on query intent, context, latency predictions, and previous tool outputs. Context-aware routing enables sophisticated tool skipping for efficiency
115
  - ⚑ **Robust Error Handling** – Structured error responses, retry mechanisms, and graceful fallbacks (e.g., if RAG fails β†’ fallback to LLM-only)
116
+ - πŸ“‘ **Streaming Responses** – Chat responses stream character-by-character using Server-Sent Events (SSE) for real-time user experience
117
  - 🎯 **Rule-First Processing** – Admin rules checked before intent classification - rules can trigger brief responses or block requests entirely
118
+ - 🧠 **Advanced Context Engineering** – Implements Anthropic's context engineering strategies:
119
+ - **High-Fidelity Compaction**: Automatically compresses conversations at 80% token threshold, preserving architectural decisions and unresolved issues
120
+ - **Tool Result Clearing**: Safest form of compaction - removes large tool outputs while keeping metadata
121
+ - **Structured Note-Taking**: Tracks objectives, architectural decisions, and unresolved issues outside context window
122
+ - **XML-Structured Prompts**: All prompts use clear XML sections for better model understanding
123
+ - **Just-in-Time Context Loading**: Selects only relevant memories and tools for each query
124
+ - **Progressive Disclosure**: Agents discover context incrementally through exploration
125
 
126
  ### Enterprise Features
127
 
 
1013
  - **Massive Accuracy Improvement**: Re-ranking significantly improves relevance of search results
1014
  - **Seamless Integration**: Works transparently with existing RAG search API
1015
 
1016
+ ### Context Engineering (Latest)
1017
+ - **Anthropic-Inspired Strategies**: Implements best practices from Anthropic's context engineering research:
1018
+ - **Compaction**: High-fidelity summarization preserving architectural decisions, unresolved issues, and implementation details
1019
+ - **Tool Result Clearing**: Safest form of compaction - removes large tool outputs once processed
1020
+ - **Structured Note-Taking**: Tracks objectives (like Claude playing PokΓ©mon), architectural decisions, and unresolved issues
1021
+ - **XML-Structured Prompts**: All prompts use clear XML sections (`<system>`, `<background_information>`, `<instructions>`) for better model understanding
1022
+ - **Automatic Compression**: Conversations compressed at 80% token threshold, targeting 60% after compression
1023
+ - **Just-in-Time Context**: Selects only relevant memories and tools for each query
1024
+ - **Progressive Disclosure**: Agents discover context incrementally through exploration
1025
+ - **Benefits**:
1026
+ - Reduced token usage and costs
1027
+ - Longer conversation support
1028
+ - Better agent coherence across extended interactions
1029
+ - Improved performance through structured context
1030
+ - **Documentation**: See `ANTHROPIC_CONTEXT_ENGINEERING.md` and `CONTEXT_ENGINEERING_IMPLEMENTATION.md` for detailed implementation
1031
+
1032
  ### UI Improvements
1033
  - **Modern Drag-and-Drop**: Intuitive file upload with visual feedback
1034
  - **Enhanced Status Messages**: Clear success/error messages with icons
backend/README.md CHANGED
@@ -265,6 +265,41 @@ The Next.js frontend includes three powerful visualization components:
265
 
266
  All visualizations are accessible to all roles and automatically populate when agent responses include `reasoning_trace` and `tool_traces` data.
267
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
268
  ## Environment Variables (excerpt)
269
 
270
  Defined in `env.example`:
 
265
 
266
  All visualizations are accessible to all roles and automatically populate when agent responses include `reasoning_trace` and `tool_traces` data.
267
 
268
+ ### Context Engineering (Latest)
269
+
270
+ The system implements comprehensive context engineering strategies based on Anthropic's best practices:
271
+
272
+ - **ContextEngineer Service** (`backend/api/services/context_engineer.py`):
273
+ - **ContextScratchpad**: Structured note-taking with objectives, architectural decisions, and unresolved issues
274
+ - **ContextCompressor**: High-fidelity compaction and tool result clearing
275
+ - **ContextSelector**: Just-in-time context loading and memory selection
276
+ - **ContextIsolator**: Isolation of large tool outputs
277
+
278
+ - **Compaction Strategy**:
279
+ - Monitors token usage and compresses at 80% threshold
280
+ - Uses tool result clearing first (safest), then full compaction
281
+ - Preserves architectural decisions, unresolved issues, and implementation details
282
+ - Targets 60% token usage after compression
283
+
284
+ - **Structured Prompts**:
285
+ - All prompts use XML-style sections (`<system>`, `<background_information>`, `<instructions>`)
286
+ - Clear organization improves model understanding
287
+ - Better separation of concerns
288
+
289
+ - **Integration Points**:
290
+ - Conversation history compression in `agent_orchestrator.py`
291
+ - Tool output compression for RAG and web search
292
+ - Structured scratchpad context in all prompts
293
+ - Memory selection before tool selection
294
+
295
+ - **Benefits**:
296
+ - Reduced token usage and API costs
297
+ - Support for longer conversations
298
+ - Better agent coherence across extended interactions
299
+ - Improved performance through structured context
300
+
301
+ See `ANTHROPIC_CONTEXT_ENGINEERING.md` and `CONTEXT_ENGINEERING_IMPLEMENTATION.md` in the root directory for detailed documentation.
302
+
303
  ## Environment Variables (excerpt)
304
 
305
  Defined in `env.example`: