Skip to content

Built-in Features & Database

The engine provides built-in tools and call management capabilities out of the box. Enable or disable them via [tools] builtin in chakra.toml.


1. Built-in Tools

Built-in tool Parameters What it does
save_caller_memory summary, language_preference Stores a short summary of the call against the caller's phone number
capture_feedback score (1 to 5) Records caller satisfaction rating
query_knowledge_base search_query Searches data/ documents and returns top grounded passages
end_call None Says goodbye and hangs up. Requires tools.end_call.description in instructions.json

2. Caller Memory & Greetings

When [features] database = true is set and a PostgreSQL database is connected, the engine automatically tracks callers: - Returning Callers: A caller is identified by phone number. If they have called before, the agent greets them using greeting.returning_caller_template, which can reference {last_date}, {base_greeting}, or any stored memory fields. - Memory Fallback: If a call ends abruptly before the model calls save_caller_memory, the engine automatically saves an extractive summary from the caller's spoken turns ([features] memory_fallback = true).


3. Silence Handling

When the caller goes quiet, the agent checks in using prompts from [silence] prompts in order. If the caller still does not respond, it speaks [silence] goodbye and ends the call. - monitor mode: Used on the turn-based chakra pipeline. - away mode: Used on Gemini Live (user_away_timeout_seconds, max_check_ins).


4. Maximum Call Length

Set [call] max_duration_seconds to cap long calls (e.g., 900 for 15 minutes). The agent speaks the line at max_duration_goodbye and closes the session. Set to 0 for unlimited duration.


5. Daily Talk Time Per Caller

Daily talk time limits are configured centrally in Chakra Console and enforced per phone number: 1. When a call connects, the engine sums up the caller's total talk time since midnight in the configured timezone (Asia/Colombo). 2. If less than min_usable_seconds remains, the call is rejected before the greeting with call_limit.limit_reached. 3. If the quota approaches during a call, the caller is warned (call_limit.approaching_limit) and disconnected when time runs out (call_limit.time_up). 4. Daily talk limits reset automatically at midnight.


6. Call Records & PostgreSQL Schema

When DATABASE_URL is configured, the engine maintains the following tables:

Table One row per Main columns
call_sessions Call session session_id, phone_number, language, status, duration_seconds, start_time, end_time, handoff_requested, location fields, session_type
caller_memory Caller profile phone_number, summary, language_preference, last_interaction_date
session_feedback User rating session_id, rating, comment, timestamp
conversation_turns Spoken turn Transcripts of each turn with speaker role and timestamp ([features] transcripts = true)
knowledge_gaps Unanswered query Questions the agent could not answer, frequency count, and timestamp
system_errors Error Unhandled exceptions and system warnings for diagnostic auditing

Data Privacy: This data stays entirely in your own PostgreSQL database. Chakra Labs receives only aggregate call duration, tokens, and billing usage metrics.


7. Distributed Tracing with Langfuse

Set the standard Langfuse environment variables in .env to record end-to-end tracing: - LANGFUSE_PUBLIC_KEY - LANGFUSE_SECRET_KEY - LANGFUSE_HOST

Every call generates a trace containing each turn, token usage, latency breakdowns, and tool invocations.