惯性聚合 高效追踪和阅读你感兴趣的博客、新闻、科技资讯
阅读原文 在惯性聚合中打开

推荐订阅源

G
Google Developers Blog
Spread Privacy
Spread Privacy
V
Visual Studio Blog
爱范儿
爱范儿
Apple Machine Learning Research
Apple Machine Learning Research
freeCodeCamp Programming Tutorials: Python, JavaScript, Git & More
GbyAI
GbyAI
Google DeepMind News
Google DeepMind News
OSCHINA 社区最新新闻
OSCHINA 社区最新新闻
V
V2EX
J
Java Code Geeks
Cyber Security Advisories - MS-ISAC
Cyber Security Advisories - MS-ISAC
Blog — PlanetScale
Blog — PlanetScale
N
Netflix TechBlog - Medium
B
Blog RSS Feed
博客园 - 【当耐特】
有赞技术团队
有赞技术团队
The Register - Security
The Register - Security
Latest news
Latest news
The Cloudflare Blog
Project Zero
Project Zero
月光博客
月光博客
U
Unit 42
Vercel News
Vercel News
Attack and Defense Labs
Attack and Defense Labs
Know Your Adversary
Know Your Adversary
V
Vulnerabilities – Threatpost
F
Full Disclosure
Schneier on Security
Schneier on Security
Google Online Security Blog
Google Online Security Blog
MyScale Blog
MyScale Blog
L
Lohrmann on Cybersecurity
C
CERT Recently Published Vulnerability Notes
博客园 - 叶小钗
腾讯CDC
博客园 - 三生石上(FineUI控件)
T
The Blog of Author Tim Ferriss
D
Darknet – Hacking Tools, Hacker News & Cyber Security
博客园 - Franky
S
Security Affairs
Hacker News: Ask HN
Hacker News: Ask HN
Security Latest
Security Latest
K
KPMG report finds enterprise disconnect between AI and its ROI | CIO
MongoDB | Blog
MongoDB | Blog
D
DataBreaches.Net
SecWiki News
SecWiki News
Recorded Future
Recorded Future
NISL@THU
NISL@THU
Hacker News - Newest:
Hacker News - Newest: "LLM"
Cloudbric
Cloudbric

Hacker News - Newest: "AI"

AI can't read an investor deck AI as an attorney? Student uses ChatGPT, Gemini to sue UW over alleged racial discrimination Hacking MCP Servers in AI Systems – The Rug Pull: Tool Changes After Approval GitHub - MeepCastana/KubeezCut: Free Web based video editor GitHub - GenAI-Gurus/awesome-eu-ai-act: Curated tools, official sources, OSS, templates, and guides for EU AI Act compliance. Can AI judge journalism? A Thiel-backed startup says yes, even if it risks chilling whistleblowers Coming soon: 10 Things That Matter in AI Right Now DARPA built an AI to fact-check enemy weapons claims What explains heterogeneity in AI adoption? When AI Meets Muscle: Context-Aware Electrical Stimulation Promises a New Way to Guide Human Movements - Department of Computer Science AI Changed How We Build. It Did Not Change What Matters. Linux rules on using AI-generated code - Copilot is OK, but humans must take 'full responsibility for the… Meta spins up AI version of Mark Zuckerberg to engage with employees Code Mode: Let Your AI Write Programs, Not Just Call Tools | TanStack Blog GitHub - Delavalom/graft: Go framework for building AI agents. Type-safe tools, multi-provider (OpenAI, Anthropic, Gemini, Bedrock), zero vendor SDKs. India's TCS tops estimates, says new AI models did not dent services demand Gen Z's fading AI hype Strong feeling: we are in a folded AI reality GitHub - machinarii/total-recall-catalog: A reference catalog of latest knowledge retrieval, memory & RAG systems GitHub - mensfeld/code-on-incus: Give each AI agent its own isolated machine with root, Docker, and systemd. Active defense detects and stops threats automatically.. Quantization, LoRA, and the 8% Problem: Benchmarking Local LLMs for Production AI Iran war: We spoke to the man making Lego-style AI videos that experts say are powerful propaganda Powell, Bessent discussed Anthropic's Mythos AI cyber threat with major U.S. banks GitHub - immartian/bellamem: Persistent belief-graph memory for AI agents. Retrieves decisive context by importance — not recency, not RAG, not /compact. recursive-mode: The Repo-Native Operating System for AI Engineering After the attack on Sam Altman's home, will AI CEO's go on the offensive? The biggest advance in AI since the LLM Opus 4.6 vs GPT 5.4 One Prompt Unity World Generation Test “AI polls” are fake polls Client Challenge Can AI be a 'child of God'? Inside Anthropic's meeting with Christian leaders How to Switch AI Chatbots and Why You Might Want To GitHub - MattMessinger1/agentic_refund_guardrail: Safe refund policy layer for AI agents — Python + TypeScript. Same behavior, shared tests. Adam/papers/emergent_values_whitepaper.md at master · strangeadvancedmarketing/Adam Ask HN: How do you stop playing 20 questions with your AI coding tools How far can automation and AI support psychotherapy? - @theU GitHub - stagas/rtdiff: realtime git diff gui and AI-assisted commits A Mac Studio for Local AI — 6 Months Later A History of the Early Years of AI at the University of Edinburgh Why AI Coding Tools Still Feel Stuck on Localhost MSN AI Datacenters Are Becoming Strategic Targets twitter.com Penn Researchers Use AI to Surface Unreported GLP-1 Side Effects in Reddit Posts Show HN: MoodSense AI (ML and FastAPI and Gradio, Deployed on Hugging Face) Moodsense Ai - a Hugging Face Space by aman179102 AI models are terrible at betting on soccer—especially xAI Grok GitHub - xialeistudio/echoic GitHub - HimashaHerath/github-dev-wrapped: AI-powered weekly GitHub activity reports deployed to GitHub Pages GitHub - alejandrobalderas/claude-code-from-source: Architecture, patterns & internals of Anthropic's AI coding agent — reverse-engineered from source maps AI and Tech brief: Ireland ascendant GitHub - Titovilal/context0: Context0 - Never Surrender Training for a Marathon with an AI Coach: What Worked and What Didn't Cyber Pulse: Agentic Intel - Apps on Google Play I Built an AI PR Reviewer That Catches Bugs by Not Looking for Bugs Gen Z workers are so fearful AI will take their job they’re intentionally sabotaging their company’s AI rollout | Fortune How AI Is Reimagining the Game of Golf–For Both Players and Courses GitHub - nattergabriel/reseed: A CLI tool for managing and distributing agent skills across projects Is SVG the final frontier? My AI workflow evolved from prompts to a near-autonomous workflow MLSharp Help - 3DGS Viewer & Generator I put my cognitive field based AI's runtime on GitHub Is Numble the first AI-proof game? A3: Kubernetes for autonomous AI agent fleets | Emergent Principles Deepali Vyas ("The Elite Recruiter") GitHub - msmarkgu/RelayFreeLLM: A restful API designed to route user prompts to various AI model providers. Unionized ProPublica staff are on strike over AI, layoffs, and wages Unleashing the Advantage of Quantum AI We're heading for an AI-fueled 'dementia crisis,' brain scientist warns The AI-Assisted Breach of Mexico's Government Infrastructure [pdf] GitHub - stef41/lmscan: 🔍 Detect AI-generated text and fingerprint which LLM wrote it. Open-source GPTZero alternative. Zero dependencies, works offline. MSN GitHub - visionscaper/collabmem: Enabling long-term collaboration with Agentic AI - building up episodic and world model memory over time with in-context awareness We gave an AI a 3 year retail lease in SF and asked it to make a profit | Andon Labs AI Code is Hollowing Out Open Source, and Maintainers are Looking the Other Way What leaked "SteamGPT" files could mean for the PC gaming platform's use of AI AI is the boss at this retail store. What could go wrong? GitHub - Wuzu11517/agentic-proxy: Local proxy meant to help reduce With Drones, Geophysics and ArtificiaI Intelligence, Researchers Prepare to Do Battle Against Land Mines A Single Operator, Two AI Platforms, Nine Government Agencies: The Full Technical Report 在 Steam 上购买 FriedrichAI: Offline AI 立省 10% GitHub - inevolin/resume-cli: Hit Claude usage limits? Resume any AI coding session elsewhere. Switch tools at zero friction. GitHub - atripati/ark: AI Runtime Kernel — a context operating system for AI agents. Eliminates tool bloat, loads only what’s needed, and gives LLMs their reasoning space back. How to Build a Secure AI PR Reviewer with Claude, GitHub Actions, and JavaScript This Startup Wants You to Pay Up to Talk With AI Versions of Human Experts Intel Arc Pro B70 Brings 32GB VRAM to Local AI for $949 WordPress 7.0: The Good, the AI, and the Still Missing AI on the couch: Anthropic gives Claude 20 hours of psychiatry IatroBench: Pre-Registered Evidence of Iatrogenic Harm from AI Safety Measures AI Agents Know About Supabase. They Don't Always Use It Right. The history and future of AI at Google, with Sundar Pichai Inside an AI‑enabled device code phishing campaign How Meta Used AI to Map Tribal Knowledge in Large-Scale Data Pipelines AI for Systems: Using LLMs to Optimize Database Query Execution Forecasting the Economic Effects of AI Introducing Tinker: Play with AI, bring your ideas to life AI sheds light on an ancient gaming mystery People really hate AI but not as much as Iran—or Democrats | Fortune What is an AI Product Engineer? Phoebe Gates wants her $185 million AI startup to succeed with 'no ties to my privilege or my last name': 'I have a chip on my shoulder' | Fortune
GitHub - dog-qiuqiu/invincat: A native Python agent CLI built on DeepAgents CLI, featuring an independent memory Agent that captures learnings after each task and delivers efficient AI coding assistance through hierarchical memory management.
qiuqiu123 · 2026-04-27 · via Hacker News - Newest: "AI"

中文文档 | Documentation Index

A Python-based terminal AI programming assistant — collaborate with AI directly in your project directory: read/write files, execute commands, browse the web, and maintain memory across sessions.

Why Invincat

Invincat is designed for real engineering work in local repositories, not demo-only chat.

  • Terminal-native workflow: stay in your project directory and use AI without switching IDEs or browser tabs.
  • Execution with guardrails: shell/file/network actions are approval-gated by default, with optional auto-approve for trusted flows.
  • Plan-first delivery mode: /plan lets teams review and approve checklists before execution, reducing risky one-shot edits.
  • Long-context durability: micro compression + offload keep long sessions usable without losing operational history.
  • Practical memory model: user/project memory stores persist conventions across sessions and are inspectable via /memory.
  • Extensible architecture: MCP tools, skills, and subagents allow adapting the assistant to team-specific workflows.

Agent Architecture

Invincat uses a multi-agent runtime with clear role boundaries.

Execution Flow

  1. User Input enters the session router.
  2. If /plan mode is active, input is routed to the Planner Agent; otherwise to the Main Agent.
  3. Main Agent executes tools (file/shell/web/MCP) under approval and middleware guardrails.
  4. After a non-trivial turn completes, Memory Agent runs asynchronously to extract durable user/project memory updates.
  5. When needed, Main Agent delegates bounded subtasks to local or async subagents.

Agent Roles and Responsibilities

Agent Primary Responsibility Allowed/Expected Behavior Hard Boundary
Main Agent Execute user tasks end-to-end Read/write files, run commands, use MCP/tools, coordinate subtasks Must not directly read/write memory_user.json or memory_project.json
Planner Agent (/plan) Produce and refine executable plans Read-only context gathering, write_todos, approve_plan, optional clarification via ask_user No implementation actions (no file edits, no command execution)
Memory Agent Curate durable memory after each completed turn Score and apply memory ops (create/update/rescore/retier/archive/delete/noop) to user/project stores Conservative extraction; skips low-confidence or ephemeral facts
Local Subagents Parallelize bounded in-process subtasks Handle scoped tasks delegated by main agent with explicit instructions Operate only within delegated scope; main agent remains final integrator
Async Subagents Offload long/remote tasks Launch/update/cancel remote subagent jobs via async tools Treated as delegated workers, not primary conversation owner

Runtime Guardrails

  • Planner mode uses both visible-tool filtering and runtime allow-list enforcement.
  • Memory store files are protected by middleware and updated only through the memory pipeline.
  • Memory extraction runs in post-turn async middleware (aafter_agent) so it does not block user-visible responses.

Documentation


Installation

Requirements: Python 3.11+

# Install from PyPI
pip install invincat-cli

Or install from source:

git clone https://github.com/dog-qiuqiu/invincat.git
cd invincat
pip install -e .

Quick Start

# Start in your project directory
cd ~/my-project
invincat-cli

After the first launch, run /model to configure the model and API Key, then you can start the conversation directly.


Model Configuration

Configure via Interface

Run /model command to open the model management interface:

  1. Press Ctrl+N to register a new model
  2. Fill in the provider, model name, and API Key
  3. Select from the list and press Enter to activate

Supported Providers

Provider Example Models
anthropic claude-sonnet-4-6, claude-opus-4-7
openai gpt-4o, o3
google_genai gemini-2.0-flash, gemini-2.5-pro
openrouter Supports all models on OpenRouter

For OpenAI-compatible interfaces (DeepSeek, Zhipu, local Ollama, etc.), simply set the base_url to connect.

Environment Variables

Variable Description
ANTHROPIC_API_KEY Anthropic API Key
OPENAI_API_KEY OpenAI API Key
GOOGLE_API_KEY Google API Key
OPENROUTER_API_KEY OpenRouter API Key
TAVILY_API_KEY Tavily web search Key (optional)

Basic Usage

Type your question or task directly in the input box and press Enter to send. AI will automatically select the appropriate tools to complete the task:

Search for the latest usage of LangGraph interrupt

Command Mode (/ prefix)

/clear
/threads
/model
... ...

Press Tab to autocomplete available commands. See Slash Commands for the complete list.


Plan Mode

Use planner mode when you want to discuss and approve a plan before execution:

/plan

Then describe your task in chat. The planner agent will:

  • analyze requirements with read-only tools
  • write a todo list (write_todos)
  • ask for explicit approval (approve_plan)

After approval, planner mode exits and keeps the approved checklist visible. The approved checklist is then handed to the main agent for execution. If you reject the plan, the planner stays in planning mode so you can refine requirements and regenerate the checklist.

Exit planner mode anytime:

/exit-plan

/exit-plan also cancels an in-flight planner turn and drops queued planner handoff actions, so no stale plan execution will continue after exit.


File References

Use @ in your message to reference files, and AI will read and understand their content:

@src/main.py Are there any potential performance issues in this file?

Tool Approval

When AI performs operations like file writing, shell commands, or network requests, it will pause by default for confirmation:

Auto-approve Mode: Press Shift+Tab to toggle. When enabled, all tool calls are automatically approved, suitable for trusted task scenarios. The status bar will display an AUTO indicator.

⚠️ It's recommended to enable auto-approve only after you're familiar with the task content.

Input Line Breaks

Press Ctrl+J in the input box to insert a line break, suitable for entering longer code or paragraphs.


Context Management

Micro Compression

A lightweight compression that runs automatically before each model call, no LLM involved, taking <1ms.

How it works: Groups conversation messages by "tool call groups", keeps a dynamic recent window intact, and compresses older large tool outputs in two levels:

  • cleared-light: richer placeholder near the cutoff (keeps head/tail signals)
  • cleared-heavy: stronger placeholder for older groups (keeps concise summary)

Compressible Tool Outputs:

Tool Compression Effect
read_file file content → light/heavy placeholder
edit_file diff output → light/heavy placeholder
write_file write result → light/heavy placeholder
execute shell output → light/heavy placeholder
grep/glob/ls search/list output → light/heavy placeholder
web_search/fetch_url web content → light/heavy placeholder

Not Compressed: agent/subagent results, ask_user responses, MCP tool outputs, compact_conversation results.

Tune micro compression with environment variables:

INVINCAT_MICRO_COMPACT_KEEP_RECENT_GROUPS=3
INVINCAT_MICRO_COMPACT_DYNAMIC_GROUP_FACTOR=12
INVINCAT_MICRO_COMPACT_MAX_KEEP_RECENT_GROUPS=8
INVINCAT_MICRO_COMPACT_LIGHT_NEAR_CUTOFF_GROUPS=2
INVINCAT_MICRO_COMPACT_MIN_COMPRESS_CHARS=240

💡 Micro compression only affects the context sent to the model, does not modify persisted state, and complete history is still saved in checkpoints.

Auto Compression

When context window usage exceeds 80%, the system automatically compresses older messages into summaries to free up space, requiring no manual operation. The status bar token count turns orange above 70% and red above 90% as warnings.

Manual Compression

/offload

Or equivalently /compact. After execution, it shows how many messages were compressed and how many tokens were freed.

Memory System

AI can remember your preferences, project conventions, and important information across sessions.

Memory Architecture Highlights

  • JSON single source of truth: runtime memory uses memory_user.json and memory_project.json only, which keeps reads/writes auditable and deterministic.
  • Dual-scope isolation: separates cross-project personal preferences (user) from repository conventions (project) to avoid memory pollution.
  • Read/write pipeline decoupling:
    • RefreshableMemoryMiddleware is responsible only for loading/rendering/injecting memory.
    • MemoryAgentMiddleware is responsible only for post-turn extraction and structured writes.
  • Async post-turn extraction: memory updates run after main responses, so memory persistence does not block interactive latency.
  • Incremental extraction with recovery: consumes only delta messages after last successful cursor, with full-history fallback when history is rewritten.
  • Evidence-aware project memory: project scope favors durable conventions backed by tool evidence and avoids transient session noise.
  • Deterministic invalid-fact cleanup: stale or contradicted active memories can be removed by rule-based validation, reducing long-lived wrong memory.
  • Strong write safety: schema validation, dedup/conflict guards, path whitelist, and atomic write (tmp + os.replace) prevent corruption.
  • Transparent and operable: /memory provides full-screen live inspection and management for both scopes.

Memory Governance Innovation

This project treats memory as a governed subsystem, not just a longer chat history.

  • Decision/write split: the memory agent decides operations, while runtime validators and guards decide what is actually persisted.
  • Typed lifecycle model: memory evolves through explicit operations (create/update/rescore/retier/archive/delete/noop) instead of opaque free-form rewrites.
  • Built-in drift control: invalid-fact cleanup, scoring/tiering, and archive/delete semantics prevent memory from becoming stale or bloated.
  • Evidence-gated project memory: project conventions require durable signals and tool evidence, reducing accidental writes from transient noise.
  • Operator-friendly governance: memory stores are inspectable JSON, and /memory provides live visibility for review and correction.

Memory Runtime Architecture

flowchart LR
    A[Conversation Turn] --> B[Main Agent Response]
    B --> C[MemoryAgentMiddleware aafter_agent]
    C --> D{Non-trivial + completed + throttle passed?}
    D -- No --> E[Skip extraction]
    D -- Yes --> F[Incremental slice by cursor + anchor]
    F --> G[Collect tool evidence]
    G --> H[Structured ops JSON]
    H --> I[Validate + guardrails]
    I --> J[Atomic write memory_user.json / memory_project.json]
    J --> K[Next turn RefreshableMemoryMiddleware injects active memory]
Loading

Memory Files

Type Path Scope
Global Memory Store ~/.invincat/{assistant_id}/memory_user.json (default: ~/.invincat/agent/memory_user.json) Universal for all projects (coding style, personal preferences)
Project Memory Store {project root}/.invincat/memory_project.json (fallback: {cwd}/.invincat/memory_project.json when project root is not detected) Current project context (repository conventions, architecture, stack); falls back to current working directory when no project root is detected

AGENTS.md is deprecated for runtime memory injection. The runtime memory pipeline now uses memory_*.json as the single source of truth.

Auto Memory Update

Memory updates are triggered after non-trivial completed turns, with:

  • incremental extraction: consume only messages added since the previous memory extraction in the same thread
  • cursor invalidation fallback: if history is rewritten (for example, compaction/checkpoint replay), fallback to one full-history pass
  • turn-interval throttling
  • keyword-based early triggers (preferences/rules/conventions)
  • time/file cooldown guards

Tune behavior via environment variables:

INVINCAT_MEMORY_CONTEXT_MESSAGES=0
INVINCAT_MEMORY_MIN_TURN_INTERVAL=1
INVINCAT_MEMORY_MIN_SECONDS_BETWEEN_RUNS=0
INVINCAT_MEMORY_FILE_COOLDOWN_SECONDS=0

INVINCAT_MEMORY_CONTEXT_MESSAGES=0 means no cap on the incremental delta since the last memory extraction. Set a positive integer to cap the delta to recent N messages.

By default the memory agent runs after every non-trivial turn (MIN_TURN_INTERVAL=1, no wall-clock or file cooldown) so memory stays in sync with the latest signal. Raise the values to re-enable throttling if the extraction cost becomes a concern.

For production tuning (cost-sensitive setups), a practical starting point is:

INVINCAT_MEMORY_MIN_TURN_INTERVAL=2
INVINCAT_MEMORY_MIN_SECONDS_BETWEEN_RUNS=8
INVINCAT_MEMORY_FILE_COOLDOWN_SECONDS=5

Troubleshooting Project Memory Not Updating

If project memory updates appear rare, check in this order:

  1. Is the turn non-trivial and completed? Very short confirmations (ok, thanks, 继续) are skipped.
  2. Did evidence come from supported tools? Project evidence extraction prioritizes read_file, edit_file, write_file, execute, bash, shell.
  3. Is evidence durable and convention-like? Temporary logs or one-off statuses are intentionally ignored.
  4. Is throttling active? MIN_TURN_INTERVAL, wall-clock cooldown, or file cooldown can suppress runs.
  5. Was history rewritten? Cursor mismatch triggers fallback behavior; check whether compaction/replay happened.
  6. Did writes fail guardrails? Invalid/conflicting operations are dropped by schema and safety validation.

Quick verification path:

  1. Run one concrete, non-trivial turn that states a stable project rule.
  2. Ensure at least one supporting read/execute tool result exists in that turn.
  3. Open /memory and check the project tab for new or updated active items.

Memory Design Docs

Memory Manager UI

/memory

Open the full-screen memory manager for live inspection of memory stores:

  • separate pages for user and project scope (1 / 2, or Tab to switch)
  • highlights key fields (status, id, section, content) for each item
  • supports r (refresh), a (show/hide archived), Esc (close)

Skill System

Skills are predefined workflow templates for reusing complex task steps.

Using Skills

/skill:web-research Search for LangGraph best practices
/skill:code-review Check code quality in src/ directory

Skill Locations

Location Path Description
Built-in Skills Installed with package skill-creator
Global Custom ~/.invincat/agent/skills/ Available across projects
Project-level .invincat/skills/ Only available in current project

Creating Custom Skills

/skill-creator

Starts an interactive wizard that guides you through creating and saving new skills.


Session Management

View and Switch Sessions

/threads

Opens the session browser, displaying all historical conversations (time, message count, branch, etc.).

Start New Conversation

/clear

Clears the current conversation and starts a new session (old sessions are still saved and can be retrieved via /threads).


Slash Commands

Type / in the input box and press Tab to view and autocomplete all commands.

Session

Command Description
/clear Clear current conversation, start new session
/threads Browse and restore historical sessions
/plan Enter planner mode; approved checklist is handed to the main agent
/exit-plan Exit planner mode, cancel running planner turn and queued handoff
/quit / /q Exit program

Model & Interface

Command Description
/model Switch or manage model configurations
/theme Switch color theme
/language Switch interface language (Chinese / English)
/tokens View token usage details

Context & Memory

Command Description
/offload / /compact Manually compress context, free tokens
/memory Open full-screen memory manager (live user/project view)

Tools & Extensions

Command Description
/mcp View connected MCP servers and tools
/editor Edit current input in external editor
/skill-creator Interactive wizard for creating new skills
/changelog Open release notes/changelog
/feedback Show feedback channel information
/docs Open project documentation entry

Others

Command Description
/help Display help information
/version Display version number
/reload Reload configuration files
/trace Open current conversation in LangSmith (requires configuration)

FAQ

Q: No response on first launch? You need to configure the model first. Run /model → Press Ctrl+N to register a model → Fill in the API Key.

Q: How to interrupt a running task? Press Esc to interrupt the current AI response; if AI is waiting for tool approval, Esc acts as a rejection.

Q: Context too long causing slow response? Run /offload to manually compress history, or wait for automatic compression (triggers when usage exceeds 80%).

Q: How to make AI remember my coding preferences? Just tell AI directly, for example "Remember: my project uses 4-space indentation, no semicolons", and AI will automatically save it to memory files at the appropriate time.

Q: How to share skills across different projects? Place skill files in the ~/.invincat/agent/skills/ directory for global availability; place in .invincat/skills/ for current project only.