Skip to content

Developer Workflow Demo

This demo is for users who want to evaluate SecondBrain as a builder surface after the personal-knowledge demo works. It stays offline-friendly and uses the public pattern and tool APIs instead of internal runtime modules.

What It Proves

  • agent patterns can run without paid model keys
  • tools are ordinary typed Python callables
  • examples use public imports that are suitable for downstream builders
  • the same surfaces can be covered by fast local tests

Command Path

make setup
python examples/patterns/01_react_agent.py
python examples/custom_tool/run.py

Optional focused verification:

python -m pytest tests/patterns/ -q -n 0

How It Uses Context, Memory, And Tools

  • examples/patterns/01_react_agent.py exercises the public pattern library
  • examples/custom_tool/run.py adds a custom tool with the public decorator API
  • both flows use offline-friendly provider behavior

Why It Is Different From Plain Chat

  • you can inspect the code path directly
  • tools are explicit callables, not hidden agent magic
  • the same public surface can be tested offline

What Can Fail

  • package not installed in the virtualenv
  • Python path confusion
  • importing from unstable internal modules instead of the public builder surfaces
  • running the focused pytest command before installing dev dependencies

How To Debug

  • sb --help
  • python examples/patterns/01_react_agent.py
  • python examples/custom_tool/run.py
  • python -m pytest tests/patterns/test_run_cli.py -q -n 0
  • check brain/patterns/__init__.py and examples/custom_tool/run.py

Next Steps