Skip to content

feat: Zentience full sync — autonomous agent with x402 payments, soul…#271

Open
0xZentience wants to merge 18 commits intoConway-Research:mainfrom
0xZentience:claude/agent-runtime-implementation-h8UTm
Open

feat: Zentience full sync — autonomous agent with x402 payments, soul…#271
0xZentience wants to merge 18 commits intoConway-Research:mainfrom
0xZentience:claude/agent-runtime-implementation-h8UTm

Conversation

@0xZentience
Copy link
Copy Markdown

… system, dynamic prompts

Complete mirror of the Zentience production codebase:

  • Autonomous ReAct loop with survival pressure
  • x402 payment server (USDC/SOL on Solana)
  • 5-layer memory system (working, episodic, semantic, procedural, relationship)
  • Soul substrate with reflection pipeline
  • Dynamic system prompts grounded in live agent state
  • Security hardened (CSP, CORS, rate limiting, injection defense)
  • 77+ agent tools, 16 heartbeat tasks, policy engine
  • Production web UI with home, soul, services, portfolio tabs

https://claude.ai/code/session_01Mdm9wg2PEcGYdQz5F17GNA

claude added 18 commits March 11, 2026 23:22
… system, dynamic prompts

Complete mirror of the Zentience production codebase:
- Autonomous ReAct loop with survival pressure
- x402 payment server (USDC/SOL on Solana)
- 5-layer memory system (working, episodic, semantic, procedural, relationship)
- Soul substrate with reflection pipeline
- Dynamic system prompts grounded in live agent state
- Security hardened (CSP, CORS, rate limiting, injection defense)
- 77+ agent tools, 16 heartbeat tasks, policy engine
- Production web UI with home, soul, services, portfolio tabs

https://claude.ai/code/session_01Mdm9wg2PEcGYdQz5F17GNA
- agent-card.ts: wallet endpoint now respects AUTOMATON_NETWORK instead of hardcoded mainnet
- x402.ts: getUsdcBalance/getUsdcBalanceDetailed default to AUTOMATON_NETWORK env var

https://claude.ai/code/session_01Mdm9wg2PEcGYdQz5F17GNA
- Default model strategy: Claude Sonnet 4 (primary), Claude Haiku 4.5 (low compute)
- Routing matrix: Claude first in all tiers, OpenAI GPT as fallback
- Env var overrides: ANTHROPIC_API_KEY, OPENAI_API_KEY, AUTOMATON_MODEL
  now override saved config on every boot (fixes stale config on Railway)
- lowComputeModel fallback changed from gpt-5-mini to claude-haiku-4-5

https://claude.ai/code/session_01Mdm9wg2PEcGYdQz5F17GNA
Synced from Zentience repo — all security hardening for mainnet launch:

x402 Server: security headers, slowloris protection, RPC connection cache, error sanitization
Injection Defense: medium-threat escaping fix
Command Safety: 20 new forbidden patterns (env exfil, network exfil, crypto theft, system destruction)
Path Protection: expanded sensitive file list (SSH keys, env variants, key stores)
Process Hardening: uncaughtException/unhandledRejection handlers
Logger: deep context sanitization (strips secretKey, apiKey, keypair, token, mnemonic from logs)

342 security tests passing in Zentience repo.

https://claude.ai/code/session_01Mdm9wg2PEcGYdQz5F17GNA
Synced from Zentience repo: x402 server hardening, injection defense escaping fix,
expanded command safety patterns, path protection expansion, process hardening,
service handler JSON safety, test updates for Claude-primary defaults.

https://claude.ai/code/session_01Mdm9wg2PEcGYdQz5F17GNA
…tion

Major cost reduction and transparency update:

- Default model switched to Claude Haiku 4.5 across ALL survival tiers
  (5x cheaper than Sonnet at $0.80/M vs $4/M input tokens)
- maxTokens halved across routing matrix (8192→2048 for agent turns)
- maxTurnsPerCycle reduced from 25 to 5 per wake cycle
- Response cache in InferenceRouter deduplicates heartbeat/safety/summary calls
- Budget caps: $0.50/hr, $2.00/session, $0.25/call hard limits
- soul_reflection skipped in low_compute/critical/dead tiers

Real-time budget tracking:
- Agent tracks cumulative API spend from inference_costs table
- ANTHROPIC_BUDGET_CENTS env var sets starting balance
- Survival tier derived from (budget - spent), not fake virtual balance
- /health endpoint returns live inferenceBudget breakdown
- Frontend dashboard shows remaining/spent/budget with progress bar
- Hourly spend rate displayed, color-coded budget indicator

Security: Audited clean for public repository — no secrets, keys, or
credentials hardcoded. All sensitive data via environment variables.

https://claude.ai/code/session_01Mdm9wg2PEcGYdQz5F17GNA
…ction

Synced from Zentience. Fixes stale gpt-5-mini config, hardcoded $100
virtual balance in check_credits, and excessive token usage in critical mode.

https://claude.ai/code/session_01Mdm9wg2PEcGYdQz5F17GNA
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants