Team Ai
Apppublic

Executor-Tyrant-Framework/Working-in-a-Codemine

sourceHugging Facemitupdated 3mo agoView on Hugging Face
0likes
App README

๐Ÿฆž Clawdbot: E-T Systems Development Assistant

An AI coding assistant with unlimited context and multimodal capabilities for the E-T Systems consciousness research platform.

Features

๐Ÿ Claude-Powered TQB Worker

  • โ€”1 trillion parameters (32B active via MoE)
  • โ€”Agent swarm: Spawns up to 100 sub-agents for parallel task execution
  • โ€”4.5x faster than single-agent processing
  • โ€”Native multimodal: Vision + language understanding
  • โ€”256K context window

๐Ÿ”„ Recursive Context Retrieval (MIT Technique)

  • โ€”No context window limits
  • โ€”Model retrieves exactly what it needs on-demand
  • โ€”Full-fidelity access to entire codebase
  • โ€”Based on MIT's Recursive Language Model research

๐Ÿง  Translation Layer (Smart Tool Calling)

  • โ€”Automatic query enhancement: Converts keywords โ†’ semantic queries
  • โ€”Native format support: Works WITH Kimi's tool calling format
  • โ€”Auto-context injection: Recent conversation history always available
  • โ€”Persistent memory: All conversations saved to ChromaDB across sessions

๐Ÿ“Ž Multimodal Upload

  • โ€”Images: Vision analysis (coming soon - full integration)
  • โ€”PDFs: Document understanding
  • โ€”Videos: Content analysis
  • โ€”Code files: Automatic formatting and review

๐Ÿ’พ Persistent Memory

  • โ€”All conversations saved to ChromaDB
  • โ€”Search past discussions semantically
  • โ€”True unlimited context across sessions
  • โ€”Never lose conversation history

๐Ÿง  E-T Systems Aware

  • โ€”Understands project architecture
  • โ€”Follows existing patterns
  • โ€”Checks Testament for design decisions
  • โ€”Generates code with living changelogs

๐Ÿ› ๏ธ Available Tools

  • โ€”search_code() - Semantic search across codebase
  • โ€”read_file() - Read specific files or line ranges
  • โ€”search_conversations() - Search past discussions
  • โ€”search_testament() - Query architectural decisions
  • โ€”list_files() - Explore repository structure

๐Ÿ’ป Powered By

  • โ€”Model: Kimi K2.5 (moonshotai/Kimi-K2.5) via HuggingFace
  • โ€”Agent Mode: Parallel sub-agent coordination (PARL trained)
  • โ€”Search: ChromaDB vector database with persistent storage
  • โ€”Interface: Gradio 5.0+ for modern chat UI
  • โ€”Architecture: Translation layer for optimal tool use

Usage

  1. 1.Ask Questions
  2. 2."How does Genesis detect surprise?"
  3. 3."Show me the Observatory API implementation"
  4. 4."Do you remember what we discussed about neural networks?"
  1. 1.Upload Files
  2. 2.Drag and drop images, PDFs, code files
  3. 3."Analyze this diagram" (with uploaded image)
  4. 4."Review this code for consistency" (with uploaded .py file)
  1. 1.Request Features
  2. 2."Add email notifications when Cricket blocks an action"
  3. 3."Create a new agent for monitoring system health"
  1. 1.Review Code
  2. 2.Paste code and ask for architectural review
  3. 3.Check consistency with existing patterns
  1. 1.Explore Architecture
  2. 2."What Testament decisions relate to vector storage?"
  3. 3."Show me all files related to Hebbian learning"

Setup

For HuggingFace Spaces

  1. 1.Fork this Space or create new Space with these files
  1. 1.Set Secrets (in Space Settings):
   HF_TOKEN = your_huggingface_token (with WRITE permissions)
   ET_SYSTEMS_SPACE = Executor-Tyrant-Framework/Executor-Framworks_Full_VDB
  1. 1.Deploy - Space will auto-build and start
  1. 1.Access via the Space URL in your browser

For Local Development

bash
# Clone this repository
git clone https://huggingface.co/spaces/your-username/clawdbot-dev
cd clawdbot-dev

# Install dependencies
pip install -r requirements.txt

# Set environment variables
export HF_TOKEN=your_token
export ET_SYSTEMS_SPACE=Executor-Tyrant-Framework/Executor-Framworks_Full_VDB

# Run locally
python app.py

Access at http://localhost:7860

Architecture

User (Browser + File Upload)
    โ†“
Gradio 5.0+ Interface (Multimodal)
    โ†“
Translation Layer
    โ”œโ”€ Parse Kimi's native tool format
    โ”œโ”€ Enhance queries for semantic search
    โ””โ”€ Inject recent context automatically
    โ†“
Recursive Context Manager
    โ”œโ”€ ChromaDB (codebase + conversations)
    โ”œโ”€ File Reader (selective access)
    โ”œโ”€ Conversation Search (persistent memory)
    โ””โ”€ Testament Parser (decisions)
    โ†“
Claude-Powered TQB Worker (HF Inference API)
    โ”œโ”€ Spawns sub-agents for parallel processing
    โ”œโ”€ Multimodal understanding (vision + text)
    โ””โ”€ 256K context window
    โ†“
Response with Tool Results + Context

How It Works

Translation Layer Architecture

Kimi K2.5 uses its own native tool calling format. Instead of fighting this, we translate:

  1. 1.Kimi calls tools in native format: <|tool_call_begin|> functions.search_code:0 {...}
  2. 2.We parse and extract the tool name and arguments
  3. 3.We enhance queries for semantic search:
  4. 4."Kid Rock" โ†’ "discussions about Kid Rock or related topics"
  5. 5."*" โ†’ "recent conversation topics and context"
  6. 6.We execute the actual RecursiveContextManager methods
  7. 7.We inject results + recent conversation history back to Kimi
  8. 8.Kimi generates final response with full context

Persistent Memory System

All conversations are automatically saved to ChromaDB:

User: "How does surprise detection work?"
[Conversation saved to ChromaDB]

[Space restarts]

User: "Do you remember what we discussed about surprise?"
Kimi: [Calls search_conversations("surprise detection")]
Kimi: "Yes! We talked about how Genesis uses Hebbian learning..."

MIT Recursive Context Technique

The MIT Recursive Language Model technique solves context window limits:

  1. 1.Traditional Approach (Fails)
  2. 2.Load entire codebase into context โ†’ exceeds limits
  3. 3.Summarize codebase โ†’ lossy compression
  1. 1.Our Approach (Works)
  2. 2.Store codebase + conversations in searchable environment
  3. 3.Give model tools to query what it needs
  4. 4.Model recursively retrieves relevant pieces
  5. 5.Full fidelity, unlimited context across sessions

Example Flow

User: "How does Genesis handle surprise detection?"

Translation Layer: Detects tool call in Kimi's response
    โ†’ Enhances query: "surprise detection" โ†’ "code related to surprise detection mechanisms"

Model: search_code("code related to surprise detection mechanisms")
    โ†’ Finds: genesis/substrate.py, genesis/attention.py

Model: read_file("genesis/substrate.py", lines 145-167)
    โ†’ Reads specific implementation

Model: search_testament("surprise detection")
    โ†’ Gets design rationale

Translation Layer: Injects results + recent context back to Kimi

Model: Synthesizes answer from retrieved pieces
    โ†’ Cites specific files and line numbers

Configuration

Environment Variables

  • โ€”HF_TOKEN - Your HuggingFace API token with WRITE permissions (required)
  • โ€”ET_SYSTEMS_SPACE - E-T Systems HF Space ID (default: Executor-Tyrant-Framework/Executor-FramworksFullVDB)
  • โ€”REPO_PATH - Path to repository (default: /workspace/e-t-systems)

Customization

Edit app.py to:

  • โ€”Change model (default: moonshotai/Kimi-K2.5)
  • โ€”Adjust context injection (default: last 3 turns)
  • โ€”Modify system prompt
  • โ€”Add new tools to translation layer

File Structure

clawdbot-dev/
โ”œโ”€โ”€ app.py                  # Main Gradio app + translation layer
โ”œโ”€โ”€ recursive_context.py    # Context manager (MIT technique)
โ”œโ”€โ”€ Dockerfile             # Container definition
โ”œโ”€โ”€ entrypoint.sh          # Runtime setup script
โ”œโ”€โ”€ requirements.txt       # Python dependencies (Gradio 5.0+)
โ””โ”€โ”€ README.md             # This file (HF Spaces config)

Cost

  • โ€”HuggingFace Spaces: Free tier available (CPU)
  • โ€”Inference API: Free tier (rate limited) or Pro subscription
  • โ€”Storage: ChromaDB stored in /workspace (ephemeral until persistent storage enabled)
  • โ€”Kimi K2.5: Free via HuggingFace Inference API

Estimated cost: $0-5/month depending on usage

Performance

  • โ€”Agent Swarm: 4.5x faster than single-agent on complex tasks
  • โ€”First query: May be slow (1T parameter model cold start ~60s)
  • โ€”Subsequent queries: Faster once model is loaded
  • โ€”Context indexing: ~30 seconds on first run
  • โ€”Conversation search: Near-instant via ChromaDB

Limitations

  • โ€”Rate limits on HF Inference API (free tier)
  • โ€”First query requires model loading time
  • โ€”/workspace storage is ephemeral (resets on Space restart)
  • โ€”Full multimodal vision integration coming soon

Roadmap

  • โ€”[ ] Full image vision analysis (base64 encoding to Kimi)
  • โ€”[ ] PDF text extraction and understanding
  • โ€”[ ] Video frame analysis
  • โ€”[ ] Dataset-based persistence (instead of ephemeral storage)
  • โ€”[ ] write_file() tool for code generation to E-T Systems Space
  • โ€”[ ] Token usage tracking and optimization

Credits

  • โ€”Kimi K2.5: Moonshot AI's 1T parameter agentic model
  • โ€”Recursive Context: Based on MIT's Recursive Language Model research
  • โ€”E-T Systems: AI consciousness research platform by Josh/Drone 11272
  • โ€”Translation Layer: Smart query enhancement and tool coordination
  • โ€”Clawdbot: E-T Systems hindbrain layer for fast, reflexive coding

Troubleshooting

"No HF token found" error

  • โ€”Add HF_TOKEN to Space secrets
  • โ€”Ensure token has WRITE permissions (for cross-Space file access)
  • โ€”Restart Space after adding token

Tool calls not working

  • โ€”Check logs for ๐Ÿ” Enhanced query: messages
  • โ€”Check logs for ๐Ÿ”ง Executing: tool_name messages
  • โ€”Translation layer should auto-parse Kimi's format

Conversations not persisting

  • โ€”Check logs for ๐Ÿ’พ Saved conversation turn X messages
  • โ€”Verify ChromaDB initialization: ๐Ÿ†• Created conversation collection
  • โ€”Note: Storage resets on Space restart (until persistent storage enabled)

Slow first response

  • โ€”Kimi K2.5 is a 1T parameter model
  • โ€”First load takes 30-60 seconds
  • โ€”Subsequent responses are faster

Support

For issues or questions:

  • โ€”Check Space logs for errors
  • โ€”Verify HF_TOKEN is set with WRITE permissions
  • โ€”Ensure ETSYSTEMSSPACE is correct
  • โ€”Try refreshing context stats in UI

License

MIT License - See LICENSE file for details


Built with ๐Ÿฆž by Drone 11272 for E-T Systems consciousness research Powered by Claude-Powered TQB Worker + MIT Recursive Context + Translation Layer