No description
  • Rust 97.8%
  • Shell 1.5%
  • Makefile 0.7%
Find a file
mik-tf b0d2e29fd9 feat: migrate all storage from SQLite to OSIS (#45, #91)
Replace SQLite entirely with OSIS SDK client calls to hero_osis server.
- NEW: osis_store.rs — wraps AiClient CRUD for conversations, messages,
  memories, audit log, and usage log
- DELETED: db.rs (711 lines), conversation.rs (90 lines)
- REMOVED: rusqlite dependency
- All REST API endpoints unchanged — zero frontend impact
- New env: OSIS_URL (default http://127.0.0.1:6666/hero_osis)

Tested: 8 unit, 119 smoke, 18 integration, 19 E2E — all pass.

Signed-off-by: mik-tf
2026-03-25 19:52:30 -04:00
crates feat: migrate all storage from SQLite to OSIS (#45, #91) 2026-03-25 19:52:30 -04:00
docs hero_agent: Rust-native AI agent for Hero OS 2026-03-21 00:32:32 -04:00
scripts hero_agent: Rust-native AI agent for Hero OS 2026-03-21 00:32:32 -04:00
.gitignore hero_agent: Rust-native AI agent for Hero OS 2026-03-21 00:32:32 -04:00
Cargo.lock feat: migrate all storage from SQLite to OSIS (#45, #91) 2026-03-25 19:52:30 -04:00
Cargo.toml feat: migrate all storage from SQLite to OSIS (#45, #91) 2026-03-25 19:52:30 -04:00
LICENSE hero_agent: Rust-native AI agent for Hero OS 2026-03-21 00:32:32 -04:00
Makefile hero_agent: Rust-native AI agent for Hero OS 2026-03-21 00:32:32 -04:00
README.md hero_agent: Rust-native AI agent for Hero OS 2026-03-21 00:32:32 -04:00

hero_agent

Rust-native AI agent for Hero OS. Drop-in replacement for hero_shrimp (Bun/TypeScript), following the same HeroRpcServer pattern as every other Hero service: Unix socket, OpenRPC, auto-MCP.

Status

Fully implemented — 3 crates, 56 built-in tools, SSE streaming, MCP integration, OSIS-backed memory and conversations.

Why Rust

  • Native OSIS SDK integration — conversations, memories, user scoping without RPC bridge
  • Native SSE streaming via tokio + axum
  • One stack — same build, debug, deploy model as every other Hero service
  • HeroRpcServer pattern: health, discovery, inspector dashboard — all built in
  • LLM APIs are stable REST/SSE — no SDK needed, just reqwest + serde

Crate structure

crates/
├── hero_agent/          Core library — agent loop, LLM client, MCP, memory, tools
├── hero_agent_server/   Binary — HTTP server, SSE routes, admin dashboard
└── hero_agent_tools/    56 built-in tools — file ops, git, web, shell, planning

hero_shrimp naming

hero_agent intentionally uses hero_shrimp socket paths and naming conventions (e.g. hero_shrimp.sock) so it slots into the existing Hero ecosystem as a drop-in replacement without requiring changes to other services or the frontend.

When the decision is made to switch from hero_shrimp to hero_agent in production, a proper rename should be done across the ecosystem — updating socket paths, service names, and references in hero_services, hero_archipelagos, and other dependent repos.

Build and run

make build       # Build release binary
make run         # Run locally (TCP port for dev)
make test        # Run unit tests
make smoke-test  # Run integration smoke tests

Acknowledgment

hero_agent exists thanks to hero_shrimp. The architecture, tool design, agent loop, skill system, and SSE protocol were all pioneered by hero_shrimp in TypeScript. hero_agent is a Rust port — we followed the same design faithfully and hope it stays true to its origins.

Architecture

See docs/spec.md for the complete design and architecture specification.