KIW1 β The Autonomous, Self-Improving Enterprise Agent Companion
π‘ Inspiration
Modern LLMs excel at generating text in single-turn conversations, but in real enterprise and daily workflows, they suffer from three core limitations:
- Static Inability to Learn: They repeat the exact same mistakes across sessions because they have no persistent correction ledger.
- Ungrounded Hallucinations & Cutoffs: They lack temporal awareness, failing on real-time data or hallucinating outdated pre-training cutoff metrics.
- Security Vulnerabilities: External web data and multi-agent workflows are vulnerable to prompt injections, tool poisoning, and sensitive PII leaks.
We built KIW1 to transform AI from a passive text chatbot into an active, self-improving Taskmaster, a Collaborative Partner, and a Fortified Enterprise Fleet that safely handles heavy-lifting workflows across weeks of asynchronous operation.
β‘ What KIW1 Does
1. Taskmaster: Heavy-Lifting Multi-Step Chore Workflows
KIW1 doesn't just draft textβit orchestrates complex, messy chores end-to-end:
- Ingests real-time forex (160+ currencies) and open web intelligence.
- Passes untrusted content through Model Armor for zero-data-leak PII/secret masking and tool poisoning defense.
- Executes sandboxed computations in an isolated Python runtime.
- Verifies cross-department policies through a Zero-Trust Gateway.
- Persists verified deliverables into a spatial memory bank and unattended delivery ledger.
2. Collaborative Partner: Adaptive Alignment & Correction Ledger
- Prompt Refinery: Computes an intent clarity index $C(p)$ using entropy scoring: $$C(p) = 1 - \frac{H(\text{Ambiguity})}{H_{\max}}$$ If $C(p) < \tau_{\text{clarity}}$, KIW1 leads the conversation with targeted multiple-choice questions to remove ambiguity.
- Correction Ledger: When a user corrects KIW1, it synthesizes an immutable standing rule with reinforcement weights $w_r$: $$w_r(n) = \log(1 + n) \cdot \gamma_{\text{recency}}$$ preventing the agent from ever making the same mistake again.
3. Fortified Enterprise Fleet & Agent Registry
- Agent Registry: Central discovery catalog for publishing, versioning, and lifecycle management of institutional agents (
secops-sentinel,finops-analyzer,devops-orchestrator,compliance-guardian,taskmaster-executive). - Zero-Trust Security: Every inter-agent call is signed with an HMAC-SHA256 cryptographic token: $$\text{Token} = \text{HMAC-SHA256}(K_{\text{agent}}, \text{AgentID} \parallel \text{Payload} \parallel \text{Nonce} \parallel t)$$
- Model Armor Guardrails: Real-time inline sanitization neutralizing prompt injections, jailbreaks, and sensitive credentials (
API_KEY,CREDIT_CARD,SSN,EMAIL).
4. Memory Palace: Spatial Retention with Decay Curves
Memories are stored in hierarchical spatial rooms and loci with temporal retention curves: $$S(t) = S_0 \cdot e^{-\lambda t} + \alpha \cdot R_{\text{recall}}$$ ensuring relevant institutional context persists across multi-week operations.
5. Closed Self-Improvement Loop (+30% Benchmark Delta)
When recurring failures occur, KIW1 triggers an adversarial research cycle, synthesizes verified rules, and re-evaluates itself on benchmark suites, achieving a provable performance gain: $$\Delta S = \sum_{i=1}^{N} \left( S_{\text{after}}^{(i)} - S_{\text{before}}^{(i)} \right) \ge +30\%$$
π οΈ How We Built It
- Agent Framework: Google Agent Development Kit (ADK) & Vertex AI.
- LLM Backbone: Gemini 2.5 Flash (for instant reasoning) & Gemini 2.5 Pro (for deep research).
- Cloud Infrastructure: Google Cloud Run, Cloud Firestore (durable multi-session persistence), Cloud Pub/Sub, and Cloud Scheduler.
- Security & Guardrails: Model Armor inline pattern heuristics, HMAC-SHA256 Zero-Trust Gateway, and gVisor-compatible Python Sandbox.
- Telemetry & Observability: OpenTelemetry W3C TraceContext standards emitting parent-child span waterfall traces.
ποΈ Challenges We Faced
- Model Training Cutoffs vs. Live Web Truth: Gemini models defaulted to internal pre-training cutoffs when answering real-time queries. We solved this by creating dynamic temporal anchoring and integrating open forex feeds with live scraping engines.
- Atomic Cloud Synchronization: Synchronizing local UI cache with distributed Firestore collections required strict batch operations (
_firestore_client.batch()) to prevent state drift during concurrent benchmark evaluations. - Zero-Trust Cross-Department Isolation: Ensuring finance, DevOps, and SecOps agents could collaborate in multi-agent swarms without leaking departmental data or unauthorized tool executions.
π What We Learned
Mathematical formulation of agent reflection, combined with cryptographic token identities and inline guardrails, makes autonomous fleets reliable enough for mission-critical enterprise production.
Built With
- duckduckgo-search
- fastapi
- forex-api
- gemini-2.5-flash
- gemini-2.5-pro
- google-agent-development-kit
- google-cloud-firestore
- google-cloud-pubsub
- google-cloud-run
- google-cloud-scheduler
- gvisor-sandbox
- hmac-sha256
- html5
- model-armor
- opentelemetry
- pii-redaction
- prompt-injection-defense
- python
- rbac
- self-improving-agents
- spatial-memory
- vanilla-css
- vertex-ai
- zero-trust
Log in or sign up for Devpost to join the conversation.