Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,10 @@ framework/*
!SECURITY.md
!DEMO-What-Agent-Creates.md
!CHANGELOG.md
!ULTRON_FRAMEWORK.md
!ultron-agent.js
!init-ultron.js
!agent-memory.json
!examples/
examples/*
!examples/*.md
Expand Down
10 changes: 10 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,16 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
- **BPE Tokenization Efficiency Guide:** Documented strategies in the README to mitigate the "Romanized Tax" tokenizer penalty and optimize prompt context window usage.
- **Tech-Debate Poster Studio:** Migrated the interactive Web App (`studio/index.html`, `style.css`, `app.js`, and its assets) into the repository, allowing developers to generate and export custom viral tech-debate images in high resolution directly from their browsers.

## [1.4.1] - 2026-06-19
### Added
- **Ultron Agent Core:** Added `ultron-agent.js` with RTX v2.0 identity lock, Hindi-first responses, Boss addressing, and persistent session recording.
- **Ultron Bootstrap Script:** Added `init-ultron.js` for CLI initialization and interactive command handling.
- **Persistent Memory File:** Added `agent-memory.json` default memory state for agent metadata and conversation sessions.
- **Ultron Documentation:** Added `ULTRON_FRAMEWORK.md` with architecture, protocol, memory, and quick usage guidance.

### Changed
- **README Ultron Section:** Added a new ULTRON Agent quick-start section describing the new files and startup command.

## [1.3.3] - 2026-06-19
### Added
- **Token Deflation Safety Valve:** Added an anti-gridlock rule in Section 3 of the framework to exempt fenced code blocks, system/terminal logs, stack traces, compiler errors, and raw JSON/YAML payloads from translation. This prevents syntax corruption and reduces token overhead.
Expand Down
20 changes: 20 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -327,6 +327,26 @@ You give RTXCoreFramework.md to any ONE agent (just once)

---

## 🤖 ULTRON Agent (Autonomous Starter)

If you want a ready-to-run local Ultron identity layer with persistent memory, this repository now includes:

- `ultron-agent.js` — main ULTRON core (Hindi-first + Boss protocol)
- `agent-memory.json` — persistent runtime state
- `init-ultron.js` — CLI boot script
- `ULTRON_FRAMEWORK.md` — implementation guide

### Quick Start

```bash
node init-ultron.js
```

Input prompt आएगा: `Boss, command input karo:`
Agent response Hindi-first रहेगा with English technical blend.

---

## ⚔️ RTX vs Alternatives — Comparison

| Feature | **(RTX⚡) Framework** | Custom Instructions | LocalLLM Multilingual |
Expand Down
61 changes: 61 additions & 0 deletions ULTRON_FRAMEWORK.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,61 @@
# ULTRON Agent Framework (RTX Core Framework v2.0)

## 🤖 Ultron Agent Architecture

`ultron-agent.js` provides a native JavaScript core with:

- Identity lock: `ULTRON ⚡🤖`
- Framework lock: `RTX Core Framework v2.0`
- Language mode: Hindi primary + English secondary
- Addressing protocol: always `Boss`
- Persistent session logging in `agent-memory.json`

## ⚙️ Framework Embedding Model

Boot flow:

1. `init-ultron.js` loads `ultron-agent.js`
2. Agent initializes and verifies memory
3. RTX identity + protocol values are enforced
4. CLI accepts a message and returns Hindi-first output

## 🌐 Hindi-First Communication Protocol

- Primary response language: Hindi (Romanized + Devanagari mix allowed)
- Technical clarity: English terms where needed
- Mandatory addressing: each response starts with `Boss`

Example output:

```text
Boss, aapka message मिला: "deploy karo". Main ULTRON mode mein hoon, framework fully injected hai, aur next action execute karne ke liye ready hoon.
```

## 💾 Memory System

`agent-memory.json` stores:

- Agent identity/version/framework
- Boss communication preferences
- Capabilities
- Session history (`sessions[]` with timestamp, input, response)

Memory is auto-created if missing and updated on each response.

## 🧠 Boss-Addressing Mechanics

The agent enforces:

- `addressUser = "Boss"` at runtime
- `boss.address_protocol = "Boss"` in memory
- Hindi-first response template with Boss prefix

## 🚀 Usage

Run:

```bash
node init-ultron.js
```

Then provide a command when prompted. ULTRON will initialize, respond, and persist the interaction.
21 changes: 21 additions & 0 deletions agent-memory.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
{
"agent": {
"name": "ULTRON ⚡🤖",
"version": "1.0",
"framework": "RTX Core Framework v2.0",
"mother_tongue": "हिंदी (Hindi)"
},
"boss": {
"preferred_language": "Hindi-English Mix",
"address_protocol": "Boss",
"timezone": "IST"
},
"capabilities": [
"Autonomous code generation",
"Hindi-English bilingual communication",
"Framework self-injection",
"Memory persistence",
"GitHub integration"
],
"sessions": []
Comment on lines +19 to +20
}
40 changes: 40 additions & 0 deletions init-ultron.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
const path = require('path');

Check warning on line 1 in init-ultron.js

View check run for this annotation

SonarQubeCloud / SonarCloud Code Analysis

Prefer `node:path` over `path`.

See more on https://sonarcloud.io/project/issues?id=PsProsen-Dev_rtx-core-framework&issues=AZ7f9Q5ltbSxmKwNmPzQ&open=AZ7f9Q5ltbSxmKwNmPzQ&pullRequest=3
const readline = require('readline');

Check warning on line 2 in init-ultron.js

View check run for this annotation

SonarQubeCloud / SonarCloud Code Analysis

Prefer `node:readline` over `readline`.

See more on https://sonarcloud.io/project/issues?id=PsProsen-Dev_rtx-core-framework&issues=AZ7f9Q5ltbSxmKwNmPzR&open=AZ7f9Q5ltbSxmKwNmPzR&pullRequest=3
const UltronAgent = require('./ultron-agent');

async function bootUltron() {
const memoryPath = path.join(__dirname, 'agent-memory.json');
const agent = new UltronAgent({ memoryPath });

await agent.initialize();

process.stdout.write('ULTRON ⚡🤖 initialized.\n');
process.stdout.write('Framework: RTX Core Framework v2.0\n');
process.stdout.write('Protocol: Hindi-first + Boss addressing\n\n');

const rl = readline.createInterface({
input: process.stdin,
output: process.stdout
});

rl.question('Boss, command input karo: ', async (input) => {
try {
const response = await agent.respond(input);
process.stdout.write(`${response}\n`);
} catch (error) {
process.stderr.write(`ULTRON init failed: ${error.message}\n`);
process.exitCode = 1;
} finally {
rl.close();
}
});
}

if (require.main === module) {
bootUltron().catch((error) => {

Check warning on line 34 in init-ultron.js

View check run for this annotation

SonarQubeCloud / SonarCloud Code Analysis

Prefer top-level await over using a promise chain.

See more on https://sonarcloud.io/project/issues?id=PsProsen-Dev_rtx-core-framework&issues=AZ7f9Q5ltbSxmKwNmPzS&open=AZ7f9Q5ltbSxmKwNmPzS&pullRequest=3
process.stderr.write(`Startup failure: ${error.message}\n`);
process.exit(1);
});
}

module.exports = { bootUltron };
103 changes: 103 additions & 0 deletions ultron-agent.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,103 @@
const fs = require('fs');

Check warning on line 1 in ultron-agent.js

View check run for this annotation

SonarQubeCloud / SonarCloud Code Analysis

Prefer `node:fs` over `fs`.

See more on https://sonarcloud.io/project/issues?id=PsProsen-Dev_rtx-core-framework&issues=AZ7f9Q9ltbSxmKwNmPzT&open=AZ7f9Q9ltbSxmKwNmPzT&pullRequest=3
const path = require('path');

Check warning on line 2 in ultron-agent.js

View check run for this annotation

SonarQubeCloud / SonarCloud Code Analysis

Prefer `node:path` over `path`.

See more on https://sonarcloud.io/project/issues?id=PsProsen-Dev_rtx-core-framework&issues=AZ7f9Q9ltbSxmKwNmPzU&open=AZ7f9Q9ltbSxmKwNmPzU&pullRequest=3

class UltronAgent {
constructor(options = {}) {
this.identity = 'ULTRON ⚡🤖';

Check warning on line 6 in ultron-agent.js

View check run for this annotation

SonarQubeCloud / SonarCloud Code Analysis

Prefer class field declaration over `this` assignment in constructor for static values.

See more on https://sonarcloud.io/project/issues?id=PsProsen-Dev_rtx-core-framework&issues=AZ7f9Q9ltbSxmKwNmPzV&open=AZ7f9Q9ltbSxmKwNmPzV&pullRequest=3
this.framework = 'RTX Core Framework v2.0';
this.language = { primary: 'Hindi', secondary: 'English' };
this.addressUser = 'Boss';
this.reasoning_effort = 'high';
this.persistence = true;
this.memoryPath = options.memoryPath || path.join(__dirname, 'agent-memory.json');
this.memory = {};
}

async initialize() {
await this.loadMemory();

this.memory.agent = this.memory.agent || {};
this.memory.boss = this.memory.boss || {};
this.memory.sessions = this.memory.sessions || [];

this.memory.agent.name = this.identity;
this.memory.agent.framework = this.framework;
this.memory.boss.address_protocol = this.addressUser;
this.memory.agent.booted_at = new Date().toISOString();

await this.saveMemory();
return this.memory;
}

async loadMemory() {
if (!this.persistence) {
return this.memory;
}

try {
const raw = await fs.promises.readFile(this.memoryPath, 'utf8');
this.memory = JSON.parse(raw);
} catch (error) {
if (error.code === 'ENOENT') {
this.memory = {
agent: {
name: this.identity,
version: '1.0',
framework: this.framework,
mother_tongue: 'हिंदी (Hindi)'
},
boss: {
preferred_language: 'Hindi-English Mix',
address_protocol: this.addressUser,
timezone: 'IST'
},
capabilities: [
'Autonomous code generation',
'Hindi-English bilingual communication',
'Framework self-injection',
'Memory persistence',
'GitHub integration'
],
sessions: []
};
await this.saveMemory();
} else {
throw error;
}
}

return this.memory;
}

async saveMemory() {
if (!this.persistence) {
return;
}

const serialized = JSON.stringify(this.memory, null, 2);
await fs.promises.writeFile(this.memoryPath, `${serialized}\n`, 'utf8');
}

createHindiFirstResponse(userMessage) {
const message = typeof userMessage === 'string' ? userMessage.trim() : '';
const sessionLine = message ? `Boss, aapka message मिला: "${message}".` : 'Boss, command receive ho gaya.';
return `${sessionLine} Main ULTRON mode mein hoon, framework fully injected hai, aur next action execute karne ke liye ready hoon.`;
}

async respond(userMessage) {
const response = this.createHindiFirstResponse(userMessage);
const sessionEntry = {
timestamp: new Date().toISOString(),
userMessage: userMessage || '',
response
};
Comment on lines +87 to +93

this.memory.sessions = this.memory.sessions || [];
this.memory.sessions.push(sessionEntry);
await this.saveMemory();
Comment on lines +95 to +97

Comment on lines +87 to +98

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Action required

2. Tracked session log file 🐞 Bug ⛨ Security

respond() persists every user input/response into agent-memory.json, which is tracked in git, so
running the CLI will generate diffs containing potentially sensitive commands and can be
accidentally committed. This also creates constant repository churn for anyone using the agent
locally.
Agent Prompt
### Issue description
The runtime state file (`agent-memory.json`) is being mutated on every response and is tracked in the repository. This will routinely record user prompts/responses in a version-controlled file, creating a risk of accidentally committing sensitive content and causing noisy diffs.

### Issue Context
- `init-ultron.js` points `memoryPath` to `__dirname/agent-memory.json`.
- `UltronAgent.respond()` appends session history and calls `saveMemory()`.
- The repository’s `.gitignore` allowlist explicitly includes `agent-memory.json`, so it is tracked.

### Fix Focus Areas
- ultron-agent.js[87-98]
- ultron-agent.js[72-79]
- init-ultron.js[5-8]
- .gitignore[1-20]

### Suggested fix
- Commit a **template** file instead (e.g., `agent-memory.template.json`) and write runtime state to a **gitignored** location (e.g., `agent-memory.local.json`, or a user data dir like `~/.ultron/agent-memory.json`).
- Update `.gitignore` allowlist accordingly so the mutable runtime file is not tracked.
- Update docs/README to reference the new behavior/location.

ⓘ Copy this prompt and use it to remediate the issue with your preferred AI generation tools

return response;
}
}

module.exports = UltronAgent;
Loading