MCPcopy Create free account

hub / github.com/anvix9/basis_research_agents / functions

Functions339 in github.com/anvix9/basis_research_agents

↓ 50 callersMethodclose
(self)
core/argument_tree.py:154
↓ 48 callersFunction_fmt
Format a context section.
core/context.py:16
↓ 26 callersFunctiongenerate_id
Generate a short unique ID with prefix.
core/utils.py:36
↓ 21 callersMethodadd_evidence
Add an evidence node under a claim. Links to a source_id in the sources table. evidence_type: paper, book, report, legal_doc
core/argument_tree.py:222
↓ 19 callersFunctionget
Get an API key by environment variable name. If required=True and key is missing, logs a clear warning. Returns empty string if not set.
core/keys.py:41
↓ 18 callersMethodadd_claim
Add a claim node under a question.
core/argument_tree.py:210
↓ 18 callersMethodcall
Route LLM call with automatic fallback. Priority: 1. Claude API (primary model for agent) 2. Claude API
core/llm.py:242
↓ 15 callersMethodadd_question
Add a sub-question node under a parent (usually root).
core/argument_tree.py:199
↓ 14 callersFunction_sources_summary
Format a list of sources into readable text.
core/context.py:21
↓ 13 callersMethodget_stats
Summary statistics of the tree.
core/argument_tree.py:472
↓ 11 callersFunction_now
()
core/database.py:281
↓ 11 callersFunction_run_step
Run a single pipeline step with error handling. Returns True on success, False on failure.
main.py:83
↓ 11 callersFunctioninsert
Generic insert into any table.
core/database.py:300
↓ 10 callersFunctionfetch
Generic fetch from any table.
core/database.py:314
↓ 10 callersFunctionget_limiter
(run_id: str = "")
core/rate_limiter.py:208
↓ 9 callersFunction_agent_done
Infer whether an agent already ran for this run by checking for data in the table it writes to. Used to skip re-running agents on resume.
main.py:389
↓ 9 callersMethod_insert
(self, node_id: str, parent_id: Optional[str], node_type: str, content: str, status: str = "un
core/argument_tree.py:160
↓ 9 callersMethodbackoff
Exponential backoff after a failed request. Call this when you get a 429 or 5xx response.
core/rate_limiter.py:116
↓ 9 callersMethodget_nodes_by_type
Get all nodes of a specific type.
core/argument_tree.py:450
↓ 9 callersMethodsearch
(self, query: str, keywords: list[str], limit: int = 10, run_id: str = "")
agents/social.py:282
↓ 9 callersMethodwait
Block until it is safe to make a call to source_id. Respects min_delay between calls. Prints a countdown if waiting more than
core/rate_limiter.py:85
↓ 8 callersFunction_abort
(run_id: str, step: str)
main.py:381
↓ 8 callersFunction_json
(value: Any)
core/database.py:284
↓ 8 callersMethodadd_audit_note
Add an audit note from the Historian. Optionally updates the target node's status and confidence.
core/argument_tree.py:318
↓ 8 callersMethodget_children
Get all direct children of a node.
core/argument_tree.py:399
↓ 7 callersFunction_apa_author
Convert 'First Last' to 'Last, F.' for APA.
tools/generate_references.py:110
↓ 7 callersMethodcreate_root
Create the root node from the research question.
core/argument_tree.py:191
↓ 7 callersMethodto_context
Serialize the tree into a structured text context for LLM prompts.
core/argument_tree.py:588
↓ 6 callersFunction_gaps_summary
(gaps: list[dict])
core/context.py:37
↓ 6 callersFunction_process_results
Save each result to all_sources and build tree nodes.
agents/grounder.py:504
↓ 6 callersFunction_src_on
(name: str)
agents/grounder.py:424
↓ 6 callersFunction_tree_context
Get argument tree context if tree exists for this run.
core/context.py:116
↓ 6 callersFunctionload_config
Load config.json — theme bank and source stack.
core/utils.py:46
↓ 5 callersFunction_normalize
Lowercase, strip punctuation, collapse whitespace.
tools/eval_references.py:150
↓ 5 callersMethodadd_external
Add an external factor node — events, policies, wars, institutional changes that shaped the intellectual trajectory but aren't publis
core/argument_tree.py:298
↓ 5 callersMethodfind_gaps
Find structural gaps in the tree: - Questions with no claims - Claims with no evidence - Claims with low confidence
core/argument_tree.py:494
↓ 5 callersFunctionget_connection
()
core/database.py:37
↓ 5 callersMethodget_node
Get a single node as a dict.
core/argument_tree.py:392
↓ 4 callersMethod_get
Rate-limited GET with backoff on 429/5xx.
agents/social.py:45
↓ 4 callersFunction_make_title
Generate a short title from the problem.
agents/scribe.py:354
↓ 4 callersFunction_proposals_summary
(proposals: list[dict])
core/context.py:62
↓ 4 callersFunctionupdate
Generic update on any table.
core/database.py:333
↓ 3 callersFunction_author_match
Check if any author surname appears in both lists.
tools/eval_references.py:160
↓ 3 callersFunction_check_contradictions
Check if instructions contradict prior agent outputs. Returns a list of contradiction notices to inject into the next agent's context.
core/breaks.py:282
↓ 3 callersFunction_check_contradictions
Check if instructions contradict prior agent outputs. Returns a list of contradiction notices to inject into the next agent's context.
agents/breaks.py:292
↓ 3 callersFunction_clean_doi
Normalize DOI — accept raw DOI or URL form. Returns bare DOI.
core/references.py:143
↓ 3 callersMethod_get_config
(self, source_id: str)
core/rate_limiter.py:81
↓ 3 callersFunction_get_conn
()
core/concept_mapper.py:63
↓ 3 callersFunction_implications_summary
(implications: list[dict])
core/context.py:50
↓ 3 callersFunction_now_str
()
core/breaks.py:32
↓ 3 callersFunction_now_str
()
agents/breaks.py:32
↓ 3 callersFunction_rate_wait
(api: str, delay: float = 1.0)
tools/eval_references.py:57
↓ 3 callersFunction_title_similarity
(a: str, b: str)
tools/eval_references.py:156
↓ 3 callersFunction_wait_for_instruction_file
Wait for the human to upload an instruction file. Polls every 10 seconds. Press Ctrl+C to abort.
core/breaks.py:219
↓ 3 callersFunction_wait_for_instruction_file
Wait for the human to upload an instruction file. Polls every 10 seconds. Press Ctrl+C to abort.
agents/breaks.py:229
↓ 3 callersMethodadd_bridge
Add a bridge node connecting two distant parts of the tree. bridge_type: temporal (fills a time gap), disciplinary (connects fields),
core/argument_tree.py:249
↓ 3 callersMethodadd_historical
Add a historical context node.
core/argument_tree.py:286
↓ 3 callersFunctioncontent_words
(text)
tools/eval_claims.py:262
↓ 3 callersMethodfind_bridge_needs
Find pairs of evidence nodes under the same question that have a large temporal gap — these need bridge papers.
core/argument_tree.py:539
↓ 3 callersFunctionfor_synthesizer
Context for Synthesizer — tree + everything.
core/context.py:193
↓ 3 callersFunctionfor_understanding_map
Context for the Understanding Map — the core mandatory Scribe output. Provides the richest possible context: seminal works, historical timeli
core/context.py:241
↓ 3 callersFunctionfor_vision
Context for Vision — tree + gaps + social + Break 1.
core/context.py:132
↓ 3 callersFunctionsetup_logging
Configure logging — file + console.
core/utils.py:20
↓ 2 callersFunction_async_search
( query: str, limit: int = 10, year_min: int | None = None, year_max: int | None = None, s
core/consensus_mcp.py:266
↓ 2 callersMethod_call_claude
( self, prompt: str, system: str, model: str, agent_name: str )
core/llm.py:131
↓ 2 callersMethod_call_ollama
( self, prompt: str, system: str, model: str, agent_name: str )
core/llm.py:185
↓ 2 callersMethod_check_link
Check if a URL is alive. Returns: active / dead / redirected.
agents/social.py:74
↓ 2 callersMethod_check_ollama_model
Check if a model is available in Ollama.
core/llm.py:227
↓ 2 callersFunction_collect_for_theme
Collect papers for a single theme from its configured sources.
agents/social.py:784
↓ 2 callersMethod_get_field
(self, node_id: str, field: str)
core/argument_tree.py:386
↓ 2 callersFunction_get_structural_gaps
Extract structural gaps directly from the argument tree.
agents/gaper.py:137
↓ 2 callersMethod_init_anthropic
(self)
core/llm.py:106
↓ 2 callersFunction_load_env
Load .env file into os.environ if not already set.
core/keys.py:18
↓ 2 callersMethod_load_env_first
Load .env before initializing clients — keys.py may not have run yet.
core/llm.py:88
↓ 2 callersMethod_ncbi_params
(self, extra: dict)
agents/social.py:181
↓ 2 callersFunction_paper_for_export
Return a clean export dict for one paper.
export_seminal.py:182
↓ 2 callersFunction_paper_for_export
Return a clean export dict for one paper.
tools/export_seminal.py:182
↓ 2 callersMethod_parse_and_respond
(self, path: str, body: str, handler)
core/consensus_mcp.py:200
↓ 2 callersFunction_parse_json
Robust JSON extraction — handles fences and partial truncation.
agents/theorist.py:71
↓ 2 callersMethod_print_wait
Print a visible wait notice with countdown.
core/rate_limiter.py:130
↓ 2 callersMethod_save
(self)
core/consensus_mcp.py:116
↓ 2 callersFunction_save_doc
(run_id: str, problem: str, data: dict)
agents/theorist.py:198
↓ 2 callersFunction_split_key_list
Split a comma-separated key list from inside a single [..] bracket.
core/references.py:289
↓ 2 callersFunction_surname
Best-effort surname extraction. Handles 'Last, First' and 'First Last'.
core/references.py:92
↓ 2 callersFunction_to_json_safe
Pydantic v2: use mode='json' to convert AnyUrl → plain strings.
core/consensus_mcp.py:66
↓ 2 callersFunction_verify_conn
()
core/references.py:425
↓ 2 callersMethodadd_counter
Add a counter-argument to a claim. Updates parent status to contested.
core/argument_tree.py:269
↓ 2 callersFunctioncount_words
(term: str)
tools/import_conceptnet.py:104
↓ 2 callersFunctionextract_term
Extract the human-readable term from a ConceptNet URI. /c/en/artificial_intelligence/n -> "artificial intelligence" /c/en/mind_body_probl
tools/import_conceptnet.py:83
↓ 2 callersFunctionfor_rude
Context for Rude — tree + proposals + dead ends + social.
core/context.py:172
↓ 2 callersFunctionfor_theorist
Context for Theorist — tree + all prior outputs.
core/context.py:151
↓ 2 callersFunctionfor_thinker
Context for Thinker — tree + synthesis + pipeline.
core/context.py:218
↓ 2 callersMethodget_all_source_ids
Get all unique source_ids referenced in the tree.
core/argument_tree.py:458
↓ 2 callersMethodget_tree
Get the full tree as a nested dict. Efficient: one query, then build in memory.
core/argument_tree.py:407
↓ 2 callersFunctionload_all_run_sources
Fallback: load all sources for a run if no tree exists.
tools/generate_references.py:69
↓ 2 callersFunctionprint_key_status
Print a clear table of which keys are set and which are missing.
core/keys.py:101
↓ 2 callersFunctionrecheck_links
Recheck all active links in the database. Move dead links to dead_links archive. Returns summary dict.
agents/social.py:901
↓ 2 callersFunctionreset_limiter
(run_id: str = "")
core/rate_limiter.py:214
↓ 2 callersFunctionsearch_consensus
Synchronous entry point. First call triggers registration + browser login.
core/consensus_mcp.py:434
↓ 2 callersFunctionsurnames
(authors)
tools/eval_references.py:162
next →1–100 of 339, ranked by callers