bamboo-agent 2026.4.2

A fully self-contained AI agent backend framework with built-in web services, multi-LLM provider support, and comprehensive tool execution
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
use crate::agent::core::budget::PreparedContext;

pub(super) fn log_context_truncation(session_id: &str, prepared_context: &PreparedContext) {
    if prepared_context.truncation_occurred {
        tracing::info!(
            "[{}] Context hard-limit fit applied: removed {} segments, using {} tokens of {} ({:.1}%)",
            session_id,
            prepared_context.segments_removed,
            prepared_context.token_usage.total_tokens,
            prepared_context.token_usage.budget_limit,
            prepared_context.token_usage.usage_percentage()
        );
    }
}