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
5 changes: 5 additions & 0 deletions Justfile
Original file line number Diff line number Diff line change
Expand Up @@ -25,3 +25,8 @@ run-ui:
run-server:
@echo "Running server..."
cargo run -p goose-server

# make GUI with latest binary
make-ui:
@just release
cd ui/desktop && npm run bundle:default
11 changes: 10 additions & 1 deletion crates/goose-server/src/state.rs
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,11 @@ use goose::providers::configs::GroqProviderConfig;
use goose::{
agent::Agent,
developer::DeveloperSystem,
memory::MemorySystem,
providers::{configs::ProviderConfig, factory},
systems::goose_hints::GooseHintsSystem,
};
use std::sync::Arc;
use std::{env, sync::Arc};
use tokio::sync::Mutex;

/// Shared application state
Expand All @@ -21,6 +22,14 @@ impl AppState {
let provider = factory::get_provider(provider_config.clone())?;
let mut agent = Agent::new(provider);
agent.add_system(Box::new(DeveloperSystem::new()));

// Add memory system only if GOOSE_SERVER__MEMORY is set to "true"
if let Ok(memory_enabled) = env::var("GOOSE_SERVER__MEMORY") {
if memory_enabled.to_lowercase() == "true" {
agent.add_system(Box::new(MemorySystem::new()));
}
}

let goosehints_system = Box::new(GooseHintsSystem::new());
agent.add_system(goosehints_system);

Expand Down