Spaces:
Sleeping
Sleeping
Commit History
-
Read max context from litellm + compact at 90% (#54)
Aksel Joonas ReediUnverified signature* Read max context from litellm.get_model_info + compact at 90% The local _MAX_TOKENS_MAP had Claude Opus 4.6 pinned at 200k, triggering compaction at ~20% of its real 1M window. Swap the hand-maintained table for litellm.get_model_info()['max_input_tokens'], which LiteLLM keeps in sync upstream (Opus 4.6=1M, GPT-5=272k, Sonnet 4.5=200k, etc.). HF router-only ids (MiniMax, Kimi, GLM) aren't in litellm's catalog and fall through to the 200k default — close enough to their advertised ranges and safe if the model lies. Also shifts compaction to fire at 90% of max_context instead of >100%. The old condition waited until context had already overshot, risking the next LLM call hitting ContextWindowExceededError before the compact finished. 90% gives headroom for the summary call + one more turn. * Drop the legacy -10k buffer — the 90% ratio is the headroom now ContextManager was subtracting a fixed 10k tokens from max_context on top of the new 90% compaction threshold, so a 1M-window Opu…28b8f2b -
Route HF inference through /v1 auto-router + add reasoning_effort knob
Users paste bare HF model ids (MiniMaxAI/MiniMax-M2.7, moonshotai/Kimi-K2.6) with an optional :fastest|cheapest|preferred|<provider> suffix; the router picks a provider and handles failover. /model does a live preflight against /v1/models and prints providers, pricing, context, tool support — warn-and- allow for unknowns with fuzzy suggestions. Friendly messages replace LiteLLM's raw traceback for model/provider mismatches, and the noisy 'Give Feedback' banner is suppressed. Adds a reasoning_effort config + /effort command (default high). OpenAI and Anthropic get the top-level param natively; HF router gets it via extra_body with minimal->low normalization for models like MiniMax M2 that require reasoning. Frontend + backend model selectors updated to the bare-id format.0a9e96d
-
Improve agent loop, tools, and research subagent for long-running autonomous tasks
- Add --no-stream and --max-iterations CLI flags for headless operation - Simplify context manager: remove staged pruning, track actual token usage - Add doom-loop detection and context budget to research subagent - Improve file tools: better enforcement, error messages, descriptions - Improve bash tool: longer timeouts, background execution guidance - Add training logging and HP sweep guidance to system prompt - Relax Python requirement to >=3.11 - Remove unused file_content_cache73882d9
-
feat: add headless CLI mode with local filesystem tools and rich terminal rendering
- Add argparse-based headless mode: `python -m agent.main "prompt here"` - Local tool specs override sandbox /app references for CLI mode - System prompt injects CLI-specific context (working directory, no sandbox) - Extract streaming/non-streaming LLM call helpers with LLMResult dataclass - Add shimmer thinking animation (truecolor gradient sweep) - Progressive markdown rendering via rich Live display - Clean MCP shutdown sequence, suppress asyncio teardown noise - Add rich dependency to agent extras577ec48 -
Deduplicate file re-reads via content hashing for local and sandbox tools
6d4f619
-
feat: kill sandbox processes and cancel HF jobs on user interrupt
When the user clicks cancel, long-running sandbox commands and HF jobs now actually stop instead of running to completion in the background. - Sandbox server: track PIDs with Popen, add /api/kill endpoint - Sandbox client: add kill_all() method - HF jobs: track running job IDs in session, cancel on interrupt - Agent loop: cleanup on cancel in both run_agent and exec_approval - exec_approval: add cancellation support (was completely missing) - Sandbox title: set descriptive name instead of inheriting template Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>3c91fc8
-
feat: CLI local mode, slash commands, interrupt support; remove lmnr; frontend fixes
CLI: - Add local tools (bash/read/write/edit) via local_tools.py for CLI mode - Add ToolRouter local_mode to use local tools instead of sandbox - Add slash commands: /help, /undo, /compact, /model, /yolo, /status - Add Ctrl+C interrupt support (single=cancel, double=exit) - Add HF token auto-loading from env/huggingface-cli - Add session_holder for interrupt/model/status access - Add Session.update_model() method Cleanup: - Remove lmnr dependency and all observe/Laminar references - Delete unused logo PNGs Frontend: - Show hardware pricing in tool approval UI - Add sandbox explanation text - Revert bash streaming to panel (caused issues) - Fix setPanelOutput to not force panel view Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>82b0c13
-
sync: org onboarding, model updates, sandbox cleanup, prompt fixes
5af3ab5
-
fix: route all HF token usage through session.hf_token from OAuth
Remove all os.environ.get("HF_TOKEN") fallbacks. Token now flows exclusively through OAuth -> session.hf_token -> tools. - Pass hf_token through Session -> ContextManager -> _get_hf_username - Add session param to docs, repo_files, repo_git handlers - Jobs use HF_ADMIN_TOKEN for creation, user token for job secrets - Remove HF_TOKEN env setup from backend/main.py - Remove module-level username cache (broken for multi-user)33f29a8
-
feat: implement cooperative agent cancellation with cancel button
ecbfd3c
-
feat: restore sandbox tools and proactive compaction
a644598 -
feat: merge HF Space improvements
79b2fcc
-
sandbox start
66a2425
-
subprocess uploading
c60bea4 -
session logging
fa4ba99
-
added the explore subagent, quality ok but not perf
b6155b0
-
adding a user approval step to jobs api + ruff formatting
122b05c
-
prompt update and loading from file
5099f9d
-
prompt change
Henri Bonamy579e839
-
added compaction every x tokens
Henri Bonamy8c943c2
-
fixing tracing
b402135
-
adding observability
4a5166d
-
intermediary commit
1e9763b -
preliminary mcp
8633be8
-
demo cli
93bf088 -
working events and session
63e9959
-
minimal impl. of the agent
5fe810b