/\ ATFGraph /docs
README Downloads
Examples / ATFGraph
Framework reference

This article is retained from the existing framework docs. Self-hosting commands and server-admin access differ from the managed CLI workflow. Start with Get started for the installed product.

Speech notes

Directory examples/python/speech_notes

Save text notes directly or transcribe audio before saving it through a child call. Prepare the SDK and CLI from the repository root:

Agent node label speech-notes, version 1.0.0.

Capabilities

CapabilityKindSignatureModuleSummary
read_notetraversal(session_id: str) -> dictexamples/python/speech_notes/agent.py
save_notetraversal(session_id: str, text: str) -> dictexamples/python/speech_notes/agent.py
transcribe_and_savetraversal(session_id: str, audio_b64: str, format: str = 'webm') -> dictexamples/python/speech_notes/agent.py
voicetraversal(session_id: str, audio_b64: str, transport: str = 'websocket') -> dictexamples/python/speech_notes/agent.pyPCM16 mono 24 kHz input over the worker's realtime transport.

Commands

Taken from this example's own README and module docstrings.

atfg server start
cargo build --bin atfgraphd --bin atfg
python -m atfgraph.worker --module examples.python.speech_notes.agent:app
python -m examples.python.speech_notes.call read_note '{"session_id":"notes-a"}' --session notes-a
python -m examples.python.speech_notes.call save_note '{"session_id":"notes-a","text":"Pack passports"}' --session notes-a
python -m examples.python.speech_notes.web
python -m pip install -e ./python
python -m pip install aiohttp

Files

  • examples/python/speech_notes/README.md
  • examples/python/speech_notes/__init__.py
  • examples/python/speech_notes/agent.py
  • examples/python/speech_notes/agentnode.yaml
  • examples/python/speech_notes/call.py
  • examples/python/speech_notes/requirements.txt
  • examples/python/speech_notes/web/index.html
  • examples/python/speech_notes/web.py

README

Rendered from examples/python/speech_notes/README.md; the source file is not modified.

Save text notes directly or transcribe audio before saving it through a child call. Prepare the SDK and CLI from the repository root:

python -m pip install -e ./python
cargo build --bin atfgraphd --bin atfg
export PATH="$PWD/target/debug:$PATH"
atfg server start

Connect to the default server at http://127.0.0.1:18880, or configure its URL/key. The Console is served under /ui/.

First try persistent text notes without a model:

python -m atfgraph.worker --module examples.python.speech_notes.agent:app
# Another terminal:
python -m examples.python.speech_notes.call save_note '{"session_id":"notes-a","text":"Pack passports"}' --session notes-a
python -m examples.python.speech_notes.call read_note '{"session_id":"notes-a"}' --session notes-a

For browser dictation, configure OPENAI_API_KEY and optional TRANSCRIPTION_MODEL (default whisper-1) on the worker before startup. Then start the local bridge:

python -m pip install aiohttp
python -m examples.python.speech_notes.web

Open http://127.0.0.1:8041/, allow microphone access, record, then select Stop and save. The bridge calls transcribe_and_save, which invokes the recorded save_note child. Reuse the session name to retrieve notes. Graph/provider credentials remain on the bridge/worker. The loopback bridge has no public-service user authentication.

Browser dictation records WebM/Ogg/M4A and transcribes after recording stops. For realtime worker sessions, invoke speech-notes.voice with a session ID, base64 PCM16 mono 24 kHz audio, and WebSocket or WebRTC transport; WebRTC needs aiortc. Set REALTIME_MODEL as required. The worker transcribes and saves through the same child capability. Local tests use provider fixtures; validate microphone behavior and live endpoint compatibility separately.

ATFGraph documentationHosted workflow · Framework reference