Skip to content

Add two_brains - AI agent with dual safety critic#877

Open
kholovmasrur2007-netizen wants to merge 1 commit intoe2b-dev:mainfrom
kholovmasrur2007-netizen:add-two-brains
Open

Add two_brains - AI agent with dual safety critic#877
kholovmasrur2007-netizen wants to merge 1 commit intoe2b-dev:mainfrom
kholovmasrur2007-netizen:add-two-brains

Conversation

@kholovmasrur2007-netizen
Copy link
Copy Markdown

What this adds

Adds two_brains to the Open-source projects section, alphabetically between Teenage AGI and UFO.

What it is

two_brains is an open-source 3-brain AI agent (planner → critic → executor). The interesting bit is the dual critic: a deterministic regex-driven SafetyCritic runs alongside the LLM critic, and the combined score is min(both). Even if the model is 100% confident the plan is fine, the safety critic can drag it under the 85-point execution bar — so rm -rf, sudo, chmod 777, curl | wget, sandbox-traversal, fuzzy success criteria, and writes-without-declared-risks all get blocked before the executor ever touches the disk.

Other safety primitives:

  • Per-user sandbox with parametrised traversal tests (/etc/passwd, C:/Windows, ..\escape, multi-level escapes)
  • 300 s wall-clock timeout in the agent loop
  • Disk-space pre-flight on write_file
  • WebSocket per-IP rate limit (slowapi only covers REST)
  • JWT auth, daily per-user quotas, audit log, Prometheus metrics
  • Web UI streams every pipeline phase live (8 events: planner_started → plan_ready → critic_started → critique_ready → executor_started → tool_call → tool_result → done)
  • Telegram bot front-end included
  • Providers: deterministic, mock, Anthropic, OpenAI, agent (Claude tool-use), local-agent (offline pattern matcher)

Stats

  • 238 tests, CI green on Python 3.11 + 3.12
  • MIT-licensed
  • One-line install: curl -fsSL https://raw.githubusercontent.com/kholovmasrur2007-netizen/two_brains/main/install.sh | bash
  • Latest release: v3.0.0

Happy to amend the entry if you'd like a different category, shorter description, or a different placement in the list.

3-brain AI agent (planner -> critic -> executor) with a deterministic
regex-driven SafetyCritic. The combined score is min(both), so even a
confident correctness pass cannot let rm -rf, sudo, chmod 777, curl|wget,
subprocess, or sandbox traversal through. Below the 85-point bar the
executor refuses to run.

Per-user sandbox with parametrised traversal tests, 300 s wall-clock
timeout, disk-space pre-flight, WebSocket per-IP rate limit, JWT auth,
daily quotas, audit log, Prometheus metrics. Web UI streams every
pipeline phase live; Telegram bot included.

238 tests, CI green on Python 3.11 + 3.12, MIT.

Repo:    https://github.com/kholovmasrur2007-netizen/two_brains
Release: https://github.com/kholovmasrur2007-netizen/two_brains/releases/tag/v3.0.0
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants