Reference
Getting Started
Core classes for building AI assistants
- ChatBot
-
Main entry point for building and managing conversational AI chatbots with integrated
- Conversation
-
Manages sequences of messages in conversational AI interactions, primarily returned by ChatBot methods.
- Message
-
Represents a single message in a conversational AI interaction, discovered through Conversation objects.
ChatBot Methods
Configuration and interaction methods for the ChatBot class
- ChatBot.model()
-
Configure the language model to use for generating responses.
- ChatBot.provider_model()
-
Set provider and model using a single string (e.g., “openai:gpt-4o”).
- ChatBot.preset()
-
Apply a pre-configured behavior template to instantly specialize the chatbot.
- ChatBot.temperature()
-
Control the randomness and creativity level of chatbot responses.
- ChatBot.max_tokens()
-
Set the maximum number of tokens for chatbot responses.
- ChatBot.persona()
-
Set a persona that shapes the chatbot’s tone and behavior.
- ChatBot.system_prompt()
-
Set a custom system prompt, overriding any preset system prompt.
- ChatBot.get_system_prompt()
-
Get the final constructed system prompt that will be sent to the LLM.
- ChatBot.avoid()
-
Configure topics or behaviors the chatbot must refuse to engage with.
- ChatBot.get_avoid_topics()
-
Get the list of topics or behaviors this chatbot is configured to avoid.
- ChatBot.tools()
-
Configure tools for this chatbot with unified API for custom and built-in tools.
- ChatBot.add_tools()
-
Add specific built-in tools.
- ChatBot.verbose()
-
Enable or disable verbose diagnostic output during chat interactions.
- ChatBot.chat()
-
Send a message to the chatbot and get a response within a conversation context.
- ChatBot.start_conversation()
-
Start a new conversation with this chatbot.
- ChatBot.continue_conversation()
-
Continue an existing conversation with a new message.
- ChatBot.show()
-
Display diagnostic information or launch chat interfaces.
- ChatBot.get_config_summary()
-
Get a comprehensive summary of the current chatbot configuration.
- ChatBot.get_config()
-
Return a copy of the full chatbot configuration dictionary.
- ChatBot.prompt_builder()
-
Create an attention-optimized prompt builder for declarative prompt composition.
- ChatBot.structured_prompt()
-
Configure the chatbot with a structured prompt built from keyword sections.
- ChatBot.chain_prompts()
-
Chain multiple structured prompts in attention-optimized order.
- ChatBot.check_llm_status()
-
Check the status of LLM integration and get setup help if needed.
- ChatBot.quick_start()
-
Get a quick-start guide tailored to this chatbot’s current configuration.
- ChatBot.create_chat_session()
-
Create a chat session backed by the configured LLM provider.
Prompt Engineering
Attention-optimized prompt construction
- PromptBuilder
-
Builds structured prompts using attention mechanisms and cognitive principles.
- PromptBuilder.persona()
-
Set a behavioral persona to anchor the model’s response style and establish expertise
- PromptBuilder.task_context()
-
Define the primary task context that establishes what needs to be accomplished.
- PromptBuilder.focus_on()
-
Set the primary focus that leverages both front-loading and recency bias for maximum
- PromptBuilder.critical_constraint()
-
Add a critical constraint that will be front-loaded for maximum attention and impact.
- PromptBuilder.constraint()
-
Add a standard constraint to the prompt that will appear in the additional constraints
- PromptBuilder.core_analysis()
-
Define core analysis requirements as a high-priority, required structured section.
- PromptBuilder.structured_section()
-
Add a structured section with clear hierarchical boundaries and visual organization.
- PromptBuilder.avoid_topics()
-
Specify topics or behaviors to avoid through negative constraints that guide AI responses
- PromptBuilder.output_format()
-
Specify output formatting requirements to prevent ambiguous responses and ensure structured
- PromptBuilder.example()
-
Add an input/output example for few-shot learning and response format demonstration.
- PromptBuilder.final_emphasis()
-
Set final emphasis that leverages recency bias to ensure critical instructions receive
- PromptBuilder.vocabulary()
-
Add domain-specific vocabulary definitions to ensure consistent understanding of
- PromptBuilder.pathways()
-
Add conversational pathway guidance to structure and guide conversation flow.
- PromptBuilder.print()
-
Print the assembled prompt to stdout.
- Priority
-
Control where a prompt section is placed relative to other sections.
- PromptSection
-
Represents a structured section of an attention-optimized prompt with priority and ordering
- VocabularyTerm
-
Define domain-specific terminology with multilingual support for consistent AI understanding.
- architectural_analysis_prompt()
-
Create a pre-configured
PromptBuilderfor architectural analysis. - code_review_prompt()
-
Create a pre-configured
PromptBuilderfor code review. - debugging_prompt()
-
Create a pre-configured
PromptBuilderfor debugging.
Conversation Pathways
State-machine conversation flows with branching and fallbacks
- Pathways
-
Chainable builder for defining structured conversational pathways.
- Pathways.state()
-
Define a state with natural language description as the primary identifier.
- Pathways.required()
-
Specify required information for the current state to be considered complete.
- Pathways.optional()
-
Specify optional information that would be helpful but not required.
- Pathways.tools()
-
Specify tools available for use in the current state.
- Pathways.success_condition()
-
Define what indicates successful completion of the current state.
- Pathways.next_state()
-
Define direct transition to the next state.
- Pathways.branch_on()
-
Define conditional branch to another state based on specific conditions.
- Pathways.fallback()
-
Define fallback transition when normal state progression fails.
- Pathways.agent()
-
Assign an agent to the current state.
- Pathways.register_agent()
-
Register an
Agentinstance for use in pathway states. - Pathways.get_agent()
-
Get the agent assigned to a specific state.
- Pathways.visualize()
-
Create an HTML visualization of this pathway and save to file.
Conversation Methods
Methods for managing conversation history
- Conversation.add_message()
-
Append a message with the given role to the conversation.
- Conversation.add_user_message()
-
Add a user-role message to the conversation.
- Conversation.add_assistant_message()
-
Add an assistant-role message to the conversation.
- Conversation.add_system_message()
-
Add a system-role message to the conversation.
- Conversation.get_messages()
-
Return messages, optionally filtered by role.
- Conversation.get_last_message()
-
Return the most recent message, optionally filtered by role.
- Conversation.clear_messages()
-
Remove all messages from the conversation.
- Conversation.set_context_window()
-
Limit how many recent messages
get_context_messages()returns. - Conversation.get_context_messages()
-
Return messages within the configured context window.
- Conversation.get_message_count()
-
Return the total number of messages in the conversation.
- Conversation.to_dict()
-
Serialize the conversation to a plain dictionary.
- Conversation.from_dict()
-
Reconstruct a conversation from a dictionary produced by
to_dict().
File Attachments
Multi-modal file handling for conversations
- Attachments
-
File attachment handler for Talk Box conversations.
- Attachments.with_prompt()
-
Add a text prompt to accompany the file attachments.
- Attachments.to_chat_contents()
-
Convert attachments to chatlas-compatible content list.
- Attachments.get_metadata()
-
Get metadata for all processed attachments.
- Attachments.summary()
-
Get a human-readable summary of attached files.
- AttachmentMetadata
-
Metadata for individual file attachments.
Tools
Tool registration, execution, and built-in utilities
- tool()
-
Register a function as a Talk Box tool.
- ToolCategory
-
Categorize tools by their primary function.
- ToolContext
-
Provide runtime context to every tool execution.
- ToolResult
-
Represent the outcome of a tool execution.
- get_global_registry()
-
Return the process-wide
ToolRegistrysingleton. - load_tool_box()
-
Register all built-in Tool Box tools in the global registry.
- get_builtin_tool()
-
Get a specific built-in tool by name.
- load_selected_tools()
-
Register a subset of the built-in Tool Box tools.
Testing & Validation
Automated testing for chatbot quality assurance
- autotest_avoid_topics()
-
Comprehensive avoid topics testing with automated violation detection.
- autotest_pathways()
-
Automated testing for pathway adherence in chatbots.
- TestResults
-
Enhanced test results container with rich reporting and analysis capabilities.
- TestResults.to_dataframe()
-
Convert test results to a pandas
DataFrame. - TestResults.to_great_table()
-
Create a styled Great Tables report from the test results.
- PathwayTestResults
-
Aggregate and summarize the outcomes of a
autotest_pathways()run. - ToolEnabledConversation
-
Extend
Conversationwith automatic tool invocation support. - create_tool_conversation()
-
Create a
ToolEnabledConversationwith default settings.
Guardrails
Composable input/output validation for chatbot messages
- Guard
-
A configured guardrail ready to be attached to a ChatBot.
- Guard.check()
-
Run the guard against the given text.
- GuardAction
-
The outcome of a guard check.
- GuardPhase
-
When the guard runs in the message lifecycle.
- GuardResult
-
The result of evaluating a guardrail against a message.
- GuardPipeline
-
Ordered pipeline of guards that processes messages sequentially.
- GuardPipeline.add()
-
Add a guard to the end of the pipeline.
- GuardPipeline.run()
-
Run all applicable guards against the text.
- GuardPipelineResult
-
Result of running a message through the full guard pipeline.
- guardrail()
-
Decorator that turns a function into a composable guardrail.
- ChatBot.guardrail()
-
Add a guardrail to the chatbot’s validation pipeline.
- ChatBot.guard_stats()
-
Get activation statistics for all attached guardrails.
- no_pii()
-
Guard that detects and handles Personally Identifiable Information.
- max_response_length()
-
Guard that enforces a maximum response length.
- max_input_length()
-
Guard that rejects user messages exceeding a character limit.
- tone_check()
-
Guard that flags responses not matching the expected tone.
- disclaimer_required()
-
Guard that ensures a required disclaimer appears in the response.
- must_cite_sources()
-
Guard that requires responses to contain source citations.
- keyword_block()
-
Guard that blocks messages containing any of the specified keywords.
Evaluation
Prompt evaluation, scoring, and regression detection
- eval.HAS_PANDAS
- eval.HAS_GREAT_TABLES
- eval.DEFAULT_DIMENSIONS
- eval.ScorerFn
- eval_regression()
-
Compare two bot versions and flag regressions.
- eval_model_update()
-
Compare persona behavior across two model versions.
- eval_suite()
-
Evaluate a persona across multiple models (model comparison matrix).
- EvalCase
-
A single evaluation test case.
- EvalDimension
-
Scoring dimensions for evaluation.
- EvalResults
-
Collection of evaluation results with reporting capabilities.
- EvalResults.summary()
-
Compute summary statistics for the eval run.
- EvalResults.passed()
-
Check if all variants meet the minimum threshold.
- EvalResults.regressions()
-
Detect regressions between variants.
- EvalResults.scores_by_variant()
-
Aggregate mean scores per variant per dimension.
- EvalResults.to_dataframe()
-
Export results to a pandas DataFrame.
- EvalResults.to_great_table()
-
Create a Great Tables comparison report.
- EvalResults.to_scorecard()
-
Export results as a scorecard dictionary (optionally written to JSON).
- EvalResult
-
Results for a single query evaluated against a single bot variant.
- EvalScore
-
A score on a single dimension for a single response.
- scorecard_table()
-
Render a scorecard as a polished Great Table.
- sweep_table()
-
Render an eval sweep summary as a polished Great Table.
Model Profiles
Model capability registry for routing, eval, and prompt optimization.
- ModelProfile
-
Capability profile for a specific LLM model.
- ModelProfile.key
-
Canonical
provider:modelkey. - ModelProfile.name
-
Display name, falling back to model identifier.
- ModelProfile.supports()
-
Check whether a capability is supported.
- CostTier
-
Relative cost tier for a model.
- get_model_profile()
-
Look up a model’s capability profile.
- list_models()
-
List known model profiles, optionally filtered.
- register_model()
-
Register a custom model profile.
- model_profiles_table()
-
Render all known model profiles as a Great Table.
Ollama Detection
Auto-detect local Ollama instances and register available models.
- OllamaStatus
-
Status of the local Ollama instance.
- detect_ollama()
-
Detect whether a local Ollama instance is running.
- list_ollama_models()
-
Query Ollama for available models and return their profiles.
- sync_ollama_models()
-
Detect Ollama models and register them in the profile registry.
Context Window Management
Token-aware fitting of prompts and messages within model context limits.
- ContextWindow
-
Manages fitting content into a model’s token budget.
- ContextWindow.fit_messages()
-
Fit a list of conversation messages into the token budget.
- ContextWindow.fit_prompt()
-
Fit a PromptBuilder’s output into the token budget.
- ContextWindow.count_tokens()
-
Count tokens in text using the configured counter.
- ContextWindow.fits()
-
Check whether text fits within the input budget.
- ContextWindow.overflow()
-
Calculate how many tokens over budget the text is.
- FitResult
-
Result of fitting content into a context window budget.
- PromptFitResult
-
Result of fitting a PromptBuilder output into a token budget.
- FitStrategy
-
Strategy for fitting content into a token budget.
- estimate_tokens()
-
Estimate the token count for a string using a character-based heuristic.
Prompt Optimization
Reduce prompt token usage without losing semantic meaning.
- optimize_prompt()
-
Optimize a prompt for reduced token usage.
- OptimizationLevel
-
How aggressively to compress prompts.
- OptimizeResult
-
Result of prompt optimization.
Hybrid Routing
Route tasks between local and cloud models based on complexity and cost.
- route()
-
Route a task to the best available model.
- classify_complexity()
-
Estimate the complexity of a task from its prompt text.
- Router
-
Configurable model router for hybrid local/cloud routing.
- Router.route()
-
Route a task to the best available model.
- RoutingStrategy
-
Strategy that governs how the router selects models.
- RoutingResult
-
Result of routing a task to a model.
- TaskComplexity
-
Estimated complexity of a task or prompt.
Consensus Mode
Query multiple models, compare outputs, and resolve disagreements.
- consensus
-
Consensus mode: query multiple models, compare outputs, flag disagreements.
- find_disagreements()
-
Detect disagreements between model responses.
- ConsensusStrategy
-
Strategy for resolving consensus across multiple model responses.
- ConsensusResult
-
Result of running consensus across multiple model responses.
- ModelResponse
-
A single model’s response to a prompt.
- Disagreement
-
A detected disagreement between model responses.
Cascade Consensus
Start with one model, fan out to additional models when confidence is low.
- cascade.Responder
- estimate_confidence()
-
Estimate confidence in a model response based on textual signals.
- CascadeResult
-
Result of a cascade consensus execution.
- CascadeRound
-
Record of a single round in a cascade execution.
Memory Tiers
Working, short-term, and long-term memory for conversations.
- MemoryStore
-
Unified memory interface across all three tiers.
- MemoryStore.remember()
-
Store a memory in the specified tier.
- MemoryStore.recall()
-
Retrieve a memory, searching tiers if no specific tier is given.
- MemoryStore.forget()
-
Remove a memory from the specified tier, or from all tiers.
- MemoryStore.search()
-
Search memories across tiers.
- WorkingMemory
-
In-conversation key-value memory, lost when the conversation ends.
- ShortTermMemory
-
Recent session memory with TTL and max-entry eviction.
- LongTermMemory
-
Persistent memory backed by SQLite.
- MemoryEntry
-
A single memory entry across any tier.
- MemoryTier
-
Which memory tier an entry belongs to.
WorkingMemory Methods
Methods for the WorkingMemory class
- WorkingMemory.set()
-
Store a value in working memory.
- WorkingMemory.get()
-
Retrieve a value from working memory.
- WorkingMemory.has()
-
Check if a key exists in working memory.
- WorkingMemory.delete()
-
Remove a key from working memory.
- WorkingMemory.keys()
-
List all keys in working memory.
- WorkingMemory.entries()
-
List all entries in working memory.
- WorkingMemory.search()
-
Search working memory by tags.
- WorkingMemory.clear()
-
Remove all entries from working memory.
- WorkingMemory.__len__()
ShortTermMemory Methods
Methods for the ShortTermMemory class
- ShortTermMemory.set()
-
Store a value in short-term memory.
- ShortTermMemory.get()
-
Retrieve a value from short-term memory.
- ShortTermMemory.has()
-
Check if a key exists and is not expired.
- ShortTermMemory.delete()
-
Remove a key from short-term memory.
- ShortTermMemory.keys()
-
List all non-expired keys.
- ShortTermMemory.entries()
-
List all non-expired entries.
- ShortTermMemory.search()
-
Search short-term memory by tags.
- ShortTermMemory.clear()
-
Remove all entries.
- ShortTermMemory.__len__()
LongTermMemory Methods
Methods for the LongTermMemory class
- LongTermMemory.set()
-
Store a value in long-term memory.
- LongTermMemory.get()
-
Retrieve a value from long-term memory.
- LongTermMemory.has()
-
Check if a key exists in long-term memory.
- LongTermMemory.delete()
-
Remove a key from long-term memory.
- LongTermMemory.keys()
-
List all keys in long-term memory.
- LongTermMemory.entries()
-
List all entries in long-term memory.
- LongTermMemory.search()
-
Search long-term memory by tags and/or key prefix.
- LongTermMemory.clear()
-
Remove all entries from long-term memory.
- LongTermMemory.close()
-
Close the database connection.
- LongTermMemory.__len__()
Agent
Self-contained AI agent bundling persona, memory, tools, and conversation history.
- Agent
-
A self-contained AI agent bundling persona, memory, and conversation history.
- Agent.from_persona()
-
Create an agent from a registered persona name.
- Agent.respond()
-
Send a message and get a response from this agent.
- Agent.remember()
-
Store a value in the agent’s memory.
- Agent.recall()
-
Retrieve a value from the agent’s memory.
- Agent.retention
-
The agent’s retention policy (from its persona), if any.
- Agent.conversation
-
The agent’s current conversation, if any.
- Agent.reset_conversation()
-
Clear the agent’s conversation state and start fresh.
Agent Methods
Methods for the Agent class
- Agent.__post_init__()
- Agent.from_persona()
-
Create an agent from a registered persona name.
- Agent.respond()
-
Send a message and get a response from this agent.
- Agent.remember()
-
Store a value in the agent’s memory.
- Agent.recall()
-
Retrieve a value from the agent’s memory.
- Agent.reset_conversation()
-
Clear the agent’s conversation state and start fresh.
Human-in-the-Loop
Pause agent workflows for human review, approval, or revision.
- human_review()
-
Create a human-in-the-loop review request.
- approve()
-
Approve a pending review.
- reject()
-
Reject a pending review.
- revise()
-
Revise the content and approve the review.
- HumanReview
-
A request for human review before proceeding.
- HumanReview.status
-
Current status of this review.
- HumanReview.decision
-
The human’s decision, or
Noneif still pending. - HumanReview.is_pending
-
Whether the review is still awaiting a decision.
- HumanReview.is_resolved
-
Whether the review has been decided (approved, rejected, or revised).
- HumanReview.is_approved
-
Whether the review was approved (including revised).
- HumanReview.final_content
-
The content to use going forward.
- ReviewDecision
-
A human’s decision on a review request.
- ReviewStatus
-
Status of a human-in-the-loop review.
- ReviewQueue
-
Collects and tracks multiple review requests.
ReviewQueue Methods
Methods for the ReviewQueue class
- ReviewQueue.add()
-
Add a review to the queue.
- ReviewQueue.pending()
-
Return all pending reviews.
- ReviewQueue.resolved()
-
Return all resolved reviews.
- ReviewQueue.by_agent()
-
Return reviews from a specific agent.
- ReviewQueue.by_status()
-
Return reviews matching a specific status.
- ReviewQueue.__len__()
Skill System
Loadable capability packs for agents.
- SkillDefinition
-
A loadable skill pack that adds capabilities to an agent.
- create_skill()
-
Create a skill definition programmatically.
- get_skill()
-
Get a skill definition by name.
- list_skills()
-
List all available skill names.
- register_skill()
-
Register a skill definition in the global registry.
- load_skill()
-
Load a skill from an arbitrary YAML file.
- skill_categories()
-
Get all skills grouped by category.
Structured Outputs
Extract typed data from LLM responses using Pydantic models.
- ExtractResult
-
Result of extracting structured data from an LLM response.
- extract()
-
Extract structured data from an LLM response.
- schema_to_dict()
-
Convert a Pydantic model class to a JSON Schema dictionary.
Persona Traits
Composable modifiers that add constraints, expertise, and tools to any persona.
- TraitDefinition
-
A composable modifier that can be applied to any persona.
- apply_trait()
-
Apply a trait to a persona, returning a new modified persona.
- create_trait()
-
Create a trait definition programmatically.
- get_trait()
-
Get a registered trait by name.
- list_traits()
-
List all available trait names.
- register_trait()
-
Register a trait so it can be retrieved with
get_trait(). - load_trait()
-
Load a trait from an arbitrary YAML file path.
- trait_categories()
-
Get all traits grouped by category.
MCP Bridge
Bidirectional bridge between Talk Box tools and the Model Context Protocol.
- MCPToolInfo
-
Description of an MCP tool discovered from a remote server.
- MCPBridgeServer
-
An MCP server that exposes Talk Box tools over the MCP protocol.
- MCPBridgeServer.tool_names()
-
Return the names of all tools registered with this server.
- MCPBridgeServer.build()
-
Build and return a
FastMCPserver instance. - MCPBridgeServer.run()
-
Build the server (if needed) and run it.
- tools_to_mcp_server()
-
Create an
MCPBridgeServerfrom a list of Talk Box tools. - mcp_tool_to_talk_box()
-
Convert an
MCPToolInfointo aTalkBoxTool. - list_mcp_tools()
-
Convert raw MCP tool dicts into
MCPToolInfoobjects. - discover_mcp_tools()
-
Discover tools from a live MCP client session.
Knowledge Graph
SQLite-backed knowledge graph with nodes, edges, traversal, search, and embedding support.
- KnowledgeGraph
-
SQLite-backed knowledge graph with nodes, edges, and optional embeddings.
- KnowledgeGraph.add_node()
-
Add a node to the graph, or update it if the ID already exists.
- KnowledgeGraph.get_node()
-
Get a node by ID.
- KnowledgeGraph.delete_node()
-
Delete a node and all its edges.
- KnowledgeGraph.list_nodes()
-
List nodes, optionally filtered by type.
- KnowledgeGraph.node_count()
-
Count nodes in the graph.
- KnowledgeGraph.add_edge()
-
Add an edge to the graph, or update it if the key already exists.
- KnowledgeGraph.get_edges()
-
Get edges connected to a node.
- KnowledgeGraph.delete_edge()
-
Delete a specific edge.
- KnowledgeGraph.edge_count()
-
Count edges in the graph.
- KnowledgeGraph.neighbors()
-
Get neighboring nodes connected by edges.
- KnowledgeGraph.search()
-
Search nodes by name or content (case-insensitive substring match).
- KnowledgeGraph.stats()
-
Get summary statistics about the graph.
- KnowledgeGraph.health()
-
Get health metrics for the graph.
- KnowledgeGraph.pending_questions()
-
Get pending enrichment questions for this knowledge graph.
- KnowledgeGraph.answer_question()
-
Answer a pending enrichment question.
- KnowledgeGraph.dismiss_question()
-
Dismiss a pending enrichment question without answering.
- KnowledgeGraph.question_stats()
-
Get summary statistics for the enrichment question queue.
- KnowledgeGraph.clear()
-
Delete all nodes and edges from the graph.
- KnowledgeGraph.close()
-
Close the database connection.
- Node
-
A node in the knowledge graph.
- Edge
-
A directed relationship between two nodes.
- NodeType
-
Type of a knowledge graph node.
- cosine_similarity()
-
Compute cosine similarity between two vectors.
KnowledgeGraph Methods
Methods for the KnowledgeGraph class
- KnowledgeGraph.add_node()
-
Add a node to the graph, or update it if the ID already exists.
- KnowledgeGraph.get_node()
-
Get a node by ID.
- KnowledgeGraph.delete_node()
-
Delete a node and all its edges.
- KnowledgeGraph.list_nodes()
-
List nodes, optionally filtered by type.
- KnowledgeGraph.node_count()
-
Count nodes in the graph.
- KnowledgeGraph.add_edge()
-
Add an edge to the graph, or update it if the key already exists.
- KnowledgeGraph.get_edges()
-
Get edges connected to a node.
- KnowledgeGraph.delete_edge()
-
Delete a specific edge.
- KnowledgeGraph.edge_count()
-
Count edges in the graph.
- KnowledgeGraph.neighbors()
-
Get neighboring nodes connected by edges.
- KnowledgeGraph.search()
-
Search nodes by name or content (case-insensitive substring match).
- KnowledgeGraph.stats()
-
Get summary statistics about the graph.
- KnowledgeGraph.health()
-
Get health metrics for the graph.
- KnowledgeGraph.pending_questions()
-
Get pending enrichment questions for this knowledge graph.
- KnowledgeGraph.answer_question()
-
Answer a pending enrichment question.
- KnowledgeGraph.dismiss_question()
-
Dismiss a pending enrichment question without answering.
- KnowledgeGraph.question_stats()
-
Get summary statistics for the enrichment question queue.
- KnowledgeGraph.clear()
-
Delete all nodes and edges from the graph.
- KnowledgeGraph.close()
-
Close the database connection.
- KnowledgeGraph.__repr__()
KG Visualization
Render knowledge graphs as Mermaid diagrams or interactive HTML pages.
- VisNode
-
A node prepared for visualization.
- VisEdge
-
An edge prepared for visualization.
- VisGraph
-
A complete graph prepared for visualization.
- VisGraph.node_count
-
Number of nodes in the visualization.
- VisGraph.edge_count
-
Number of edges in the visualization.
- VisGraph.to_dict()
-
Serialize to a dictionary.
- prepare_vis_graph()
-
Prepare a knowledge graph for visualization.
- to_mermaid()
-
Render a knowledge graph as a Mermaid diagram string.
- to_html()
-
Render a knowledge graph as an interactive HTML page.
- visualize()
-
Render a knowledge graph and open it in the browser.
Connectors
Ingest documents from files, directories, and Apple Notes into the knowledge graph.
- Document
-
A document to ingest into the knowledge graph.
- Connector
-
Base class for knowledge graph connectors.
- Connector.scan()
-
Yield documents from this source.
- MarkdownDir
-
Ingest Markdown files from a directory.
- MarkdownDir.scan()
-
Yield Markdown documents from the directory tree.
- DirectoryConnector
-
Ingest text-based files from a directory by extension.
- DirectoryConnector.scan()
-
Yield documents from the directory tree.
- AppleNotes
-
Ingest notes from macOS Apple Notes (read-only).
- AppleNotes.scan()
-
Yield documents from Apple Notes matching the folder/tag filter.
- SyncResult
-
Result of a connector sync operation.
- SyncResult.total
-
Total documents processed.
- connector()
-
Create a connector from a generator function.
- sync()
-
Sync documents from connectors into a knowledge graph.
Enrichment
Extract entities, topics, relationships, and summaries from documents in the knowledge graph.
- ExtractedEntity
-
An entity extracted from a document.
- ExtractedRelationship
-
A relationship extracted between two entities.
- EnrichmentResult
-
Complete enrichment output for a single document.
- EnrichmentResult.entity_names
-
Names of all extracted entities.
- EnrichmentResult.entity_count
-
Number of extracted entities.
- EnrichmentResult.topic_count
-
Number of assigned topics.
- EnrichmentResult.relationship_count
-
Number of extracted relationships.
- EnrichmentPipeline
-
Configurable pipeline for enriching documents in a knowledge graph.
- EnrichmentPipeline.run()
-
Run enrichment on document nodes in the knowledge graph.
- PipelineResult
-
Result of running the enrichment pipeline.
- PipelineResult.total
-
Total documents processed (enriched + skipped).
- EnrichmentConfig
-
Configuration for how enrichment results are applied.
- regex_enricher()
-
Simple regex-based enrichment (no LLM required).
Compliance Export
Export conversation transcripts as auditable JSON or HTML files.
- export_json()
-
Export a conversation capture as an auditable JSON file.
- export_html()
-
Export a conversation capture as a human-readable HTML transcript.
CLI
Command-line interface for managing and testing AI assistants.
- cli.main()
-
Talk Box: build production AI assistants.
- cli.info()
-
Show Talk Box configuration, personas, and models.
- cli.personas()
-
List personas or show details for a specific persona.
- cli.models()
-
List registered model profiles.
- cli.test_cmd()
-
Run eval suite for a persona across one or more models.
Configuration
Layered configuration system with profiles, environment overrides, and CLI flags.
- TalkBoxConfig
-
Complete Talk Box configuration.
- TalkBoxConfig.resolve()
-
Resolve effective settings from config + profile + overrides.
- TalkBoxConfig.to_dict()
- TalkBoxConfig.validate_model()
-
Validate that a model string is allowed under the current config.
- TalkBoxConfig.is_cloud_model()
-
Check whether a model string refers to a cloud provider.
- ProfileConfig
-
A named profile bundling model + persona + settings.
- ProfileConfig.to_dict()
- ResolvedConfig
-
The final resolved configuration after all layers are merged.
- TUIMode
-
TUI display mode.
- load_config()
-
Load and merge the full config stack.
- save_config()
-
Write a config to a YAML file.
- load_profile()
-
Load a named profile from the profiles directory.
- save_profile()
-
Save a named profile to the profiles directory.
- list_profiles()
-
List available profile names from the profiles directory.