Skip to main content

Crate selfware

Crate selfware 

Source
Expand description

Selfware Workshop - Your Personal AI Companion

A sophisticated agent framework for autonomous coding tasks, built on the selfware philosophy: software you own, software that knows you, software that lasts.

  • Tools: 54 built-in tools for file, git, cargo, search, and more
  • Safety: Multi-layer validation, path protection, command filtering
  • Persistence: Checkpoint system for long-running tasks
  • Self-Healing: Error classification, recovery strategies, exponential backoff
  • Cognition: PDVR cycle (Plan-Do-Verify-Reflect), working memory
  • Garden View: Visualize your codebase as a living garden
  • Local-First: Runs on your hardware, your rules

§Quick Start

use selfware::{Agent, Config};

let config = Config::load(None)?;
let mut agent = Agent::new(config).await?;
agent.run_task("Tend to the garden").await?;

Re-exports§

pub use safety::redact;
pub use safety::sandbox;
pub use safety::threat_modeling;
pub use analysis::analyzer;
pub use analysis::bm25;
pub use analysis::vector_store;

Modules§

agent
analysis
Code analysis module
api
checkpoint
Task Checkpointing & Persistence
cli
Selfware Workshop - Your Personal AI Companion
cognitive
Cognitive and AI capabilities module
config
Configuration Management
container
Container Management System
errors
input
Modern Input System for Selfware
memory
Agent Memory Management
multiagent
Multi-Agent Chat System
output
Output Control Module
planning
Hierarchical Planning System
process_manager
Process Manager - Background Process Lifecycle Management
resource
Resource management for CPU, GPU, memory, and disk
safety
Security and safety module
supervision
Process supervision and recovery mechanisms
swarm
Multi-Agent Swarm System
telemetry
Telemetry & Observability
token_count
Shared token counting utilities.
tokens
Token Usage Tracking and Cost Optimization
tool_parser
Robust tool call parser with XML and JSON fallback
tools
ui
Selfware UI System
verification
Verification Gates - Automatic validation after every code change
workflows
Agent Workflows

Macros§

tool_span
Create a span for tracking tool execution with automatic duration and outcome logging

Functions§

is_shutdown_requested
Check whether a graceful shutdown has been requested.
request_shutdown
Signal that a graceful shutdown has been requested.
shutdown_tracing
Flush and shut down the tracing background writer. Call this during graceful shutdown to ensure all logs are flushed.