Code
Hub
Workspaces
Following
Trending
Connect
MCP
copy
Create free account
hub
/
github.com/anvix9/basis_research_agents
/ functions
Functions
339 in github.com/anvix9/basis_research_agents
⨍
Functions
339
◇
Types & classes
23
↓ 50 callers
Method
close
(self)
core/argument_tree.py:154
↓ 48 callers
Function
_fmt
Format a context section.
core/context.py:16
↓ 26 callers
Function
generate_id
Generate a short unique ID with prefix.
core/utils.py:36
↓ 21 callers
Method
add_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 callers
Function
get
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 callers
Method
add_claim
Add a claim node under a question.
core/argument_tree.py:210
↓ 18 callers
Method
call
Route LLM call with automatic fallback. Priority: 1. Claude API (primary model for agent) 2. Claude API
core/llm.py:242
↓ 15 callers
Method
add_question
Add a sub-question node under a parent (usually root).
core/argument_tree.py:199
↓ 14 callers
Function
_sources_summary
Format a list of sources into readable text.
core/context.py:21
↓ 13 callers
Method
get_stats
Summary statistics of the tree.
core/argument_tree.py:472
↓ 11 callers
Function
_now
()
core/database.py:281
↓ 11 callers
Function
_run_step
Run a single pipeline step with error handling. Returns True on success, False on failure.
main.py:83
↓ 11 callers
Function
insert
Generic insert into any table.
core/database.py:300
↓ 10 callers
Function
fetch
Generic fetch from any table.
core/database.py:314
↓ 10 callers
Function
get_limiter
(run_id: str = "")
core/rate_limiter.py:208
↓ 9 callers
Function
_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 callers
Method
_insert
(self, node_id: str, parent_id: Optional[str], node_type: str, content: str, status: str = "un
core/argument_tree.py:160
↓ 9 callers
Method
backoff
Exponential backoff after a failed request. Call this when you get a 429 or 5xx response.
core/rate_limiter.py:116
↓ 9 callers
Method
get_nodes_by_type
Get all nodes of a specific type.
core/argument_tree.py:450
↓ 9 callers
Method
search
(self, query: str, keywords: list[str], limit: int = 10, run_id: str = "")
agents/social.py:282
↓ 9 callers
Method
wait
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 callers
Function
_abort
(run_id: str, step: str)
main.py:381
↓ 8 callers
Function
_json
(value: Any)
core/database.py:284
↓ 8 callers
Method
add_audit_note
Add an audit note from the Historian. Optionally updates the target node's status and confidence.
core/argument_tree.py:318
↓ 8 callers
Method
get_children
Get all direct children of a node.
core/argument_tree.py:399
↓ 7 callers
Function
_apa_author
Convert 'First Last' to 'Last, F.' for APA.
tools/generate_references.py:110
↓ 7 callers
Method
create_root
Create the root node from the research question.
core/argument_tree.py:191
↓ 7 callers
Method
to_context
Serialize the tree into a structured text context for LLM prompts.
core/argument_tree.py:588
↓ 6 callers
Function
_gaps_summary
(gaps: list[dict])
core/context.py:37
↓ 6 callers
Function
_process_results
Save each result to all_sources and build tree nodes.
agents/grounder.py:504
↓ 6 callers
Function
_src_on
(name: str)
agents/grounder.py:424
↓ 6 callers
Function
_tree_context
Get argument tree context if tree exists for this run.
core/context.py:116
↓ 6 callers
Function
load_config
Load config.json — theme bank and source stack.
core/utils.py:46
↓ 5 callers
Function
_normalize
Lowercase, strip punctuation, collapse whitespace.
tools/eval_references.py:150
↓ 5 callers
Method
add_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 callers
Method
find_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 callers
Function
get_connection
()
core/database.py:37
↓ 5 callers
Method
get_node
Get a single node as a dict.
core/argument_tree.py:392
↓ 4 callers
Method
_get
Rate-limited GET with backoff on 429/5xx.
agents/social.py:45
↓ 4 callers
Function
_make_title
Generate a short title from the problem.
agents/scribe.py:354
↓ 4 callers
Function
_proposals_summary
(proposals: list[dict])
core/context.py:62
↓ 4 callers
Function
update
Generic update on any table.
core/database.py:333
↓ 3 callers
Function
_author_match
Check if any author surname appears in both lists.
tools/eval_references.py:160
↓ 3 callers
Function
_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 callers
Function
_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 callers
Function
_clean_doi
Normalize DOI — accept raw DOI or URL form. Returns bare DOI.
core/references.py:143
↓ 3 callers
Method
_get_config
(self, source_id: str)
core/rate_limiter.py:81
↓ 3 callers
Function
_get_conn
()
core/concept_mapper.py:63
↓ 3 callers
Function
_implications_summary
(implications: list[dict])
core/context.py:50
↓ 3 callers
Function
_now_str
()
core/breaks.py:32
↓ 3 callers
Function
_now_str
()
agents/breaks.py:32
↓ 3 callers
Function
_rate_wait
(api: str, delay: float = 1.0)
tools/eval_references.py:57
↓ 3 callers
Function
_title_similarity
(a: str, b: str)
tools/eval_references.py:156
↓ 3 callers
Function
_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 callers
Function
_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 callers
Method
add_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 callers
Method
add_historical
Add a historical context node.
core/argument_tree.py:286
↓ 3 callers
Function
content_words
(text)
tools/eval_claims.py:262
↓ 3 callers
Method
find_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 callers
Function
for_synthesizer
Context for Synthesizer — tree + everything.
core/context.py:193
↓ 3 callers
Function
for_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 callers
Function
for_vision
Context for Vision — tree + gaps + social + Break 1.
core/context.py:132
↓ 3 callers
Function
setup_logging
Configure logging — file + console.
core/utils.py:20
↓ 2 callers
Function
_async_search
( query: str, limit: int = 10, year_min: int | None = None, year_max: int | None = None, s
core/consensus_mcp.py:266
↓ 2 callers
Method
_call_claude
( self, prompt: str, system: str, model: str, agent_name: str )
core/llm.py:131
↓ 2 callers
Method
_call_ollama
( self, prompt: str, system: str, model: str, agent_name: str )
core/llm.py:185
↓ 2 callers
Method
_check_link
Check if a URL is alive. Returns: active / dead / redirected.
agents/social.py:74
↓ 2 callers
Method
_check_ollama_model
Check if a model is available in Ollama.
core/llm.py:227
↓ 2 callers
Function
_collect_for_theme
Collect papers for a single theme from its configured sources.
agents/social.py:784
↓ 2 callers
Method
_get_field
(self, node_id: str, field: str)
core/argument_tree.py:386
↓ 2 callers
Function
_get_structural_gaps
Extract structural gaps directly from the argument tree.
agents/gaper.py:137
↓ 2 callers
Method
_init_anthropic
(self)
core/llm.py:106
↓ 2 callers
Function
_load_env
Load .env file into os.environ if not already set.
core/keys.py:18
↓ 2 callers
Method
_load_env_first
Load .env before initializing clients — keys.py may not have run yet.
core/llm.py:88
↓ 2 callers
Method
_ncbi_params
(self, extra: dict)
agents/social.py:181
↓ 2 callers
Function
_paper_for_export
Return a clean export dict for one paper.
export_seminal.py:182
↓ 2 callers
Function
_paper_for_export
Return a clean export dict for one paper.
tools/export_seminal.py:182
↓ 2 callers
Method
_parse_and_respond
(self, path: str, body: str, handler)
core/consensus_mcp.py:200
↓ 2 callers
Function
_parse_json
Robust JSON extraction — handles fences and partial truncation.
agents/theorist.py:71
↓ 2 callers
Method
_print_wait
Print a visible wait notice with countdown.
core/rate_limiter.py:130
↓ 2 callers
Method
_save
(self)
core/consensus_mcp.py:116
↓ 2 callers
Function
_save_doc
(run_id: str, problem: str, data: dict)
agents/theorist.py:198
↓ 2 callers
Function
_split_key_list
Split a comma-separated key list from inside a single [..] bracket.
core/references.py:289
↓ 2 callers
Function
_surname
Best-effort surname extraction. Handles 'Last, First' and 'First Last'.
core/references.py:92
↓ 2 callers
Function
_to_json_safe
Pydantic v2: use mode='json' to convert AnyUrl → plain strings.
core/consensus_mcp.py:66
↓ 2 callers
Function
_verify_conn
()
core/references.py:425
↓ 2 callers
Method
add_counter
Add a counter-argument to a claim. Updates parent status to contested.
core/argument_tree.py:269
↓ 2 callers
Function
count_words
(term: str)
tools/import_conceptnet.py:104
↓ 2 callers
Function
extract_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 callers
Function
for_rude
Context for Rude — tree + proposals + dead ends + social.
core/context.py:172
↓ 2 callers
Function
for_theorist
Context for Theorist — tree + all prior outputs.
core/context.py:151
↓ 2 callers
Function
for_thinker
Context for Thinker — tree + synthesis + pipeline.
core/context.py:218
↓ 2 callers
Method
get_all_source_ids
Get all unique source_ids referenced in the tree.
core/argument_tree.py:458
↓ 2 callers
Method
get_tree
Get the full tree as a nested dict. Efficient: one query, then build in memory.
core/argument_tree.py:407
↓ 2 callers
Function
load_all_run_sources
Fallback: load all sources for a run if no tree exists.
tools/generate_references.py:69
↓ 2 callers
Function
print_key_status
Print a clear table of which keys are set and which are missing.
core/keys.py:101
↓ 2 callers
Function
recheck_links
Recheck all active links in the database. Move dead links to dead_links archive. Returns summary dict.
agents/social.py:901
↓ 2 callers
Function
reset_limiter
(run_id: str = "")
core/rate_limiter.py:214
↓ 2 callers
Function
search_consensus
Synchronous entry point. First call triggers registration + browser login.
core/consensus_mcp.py:434
↓ 2 callers
Function
surnames
(authors)
tools/eval_references.py:162
next →
1–100 of 339, ranked by callers