Skip to content

Built-in Templates

cbintel includes pre-built graph templates for common research patterns.

Using Templates

Via API

curl -X POST https://intel.nominate.ai/api/v1/jobs/graph \
  -H "Content-Type: application/json" \
  -d '{
    "template": "basic_research",
    "params": {
      "query": "AI regulation trends"
    }
  }'

Via Python

from cbintel.client import JobsClient

client = JobsClient()

job = await client.submit("graph", {
    "template": "deep_research",
    "params": {"query": "AI safety", "max_urls": 100}
})

List Available Templates

from cbintel.graph import list_templates

templates = list_templates()
for t in templates:
    print(f"{t.name}: {t.description}")

Available Templates

basic_research

Quick web research with synthesis.

Inputs: | Parameter | Type | Default | Description | |-----------|------|---------|-------------| | query | string | required | Research query | | max_urls | int | 30 | Max URLs to process |

Outputs: urls, synthesis

Example:

{
  "template": "basic_research",
  "params": {
    "query": "climate change policy",
    "max_urls": 50
  }
}


deep_research

Comprehensive research with entities and report.

Inputs: | Parameter | Type | Default | Description | |-----------|------|---------|-------------| | query | string | required | Research query | | max_urls | int | 100 | Max URLs | | geo | string | null | Geographic routing |

Outputs: urls, entities, synthesis, report

Example:

{
  "template": "deep_research",
  "params": {
    "query": "John Smith political career",
    "max_urls": 150,
    "geo": "us"
  }
}


opposition_research

Political opposition research profile.

Inputs: | Parameter | Type | Default | Description | |-----------|------|---------|-------------| | subject_name | string | required | Person to research | | include_archives | bool | true | Include historical | | include_video | bool | false | Include YouTube |

Outputs: entities, timeline, synthesis, report

Example:

{
  "template": "opposition_research",
  "params": {
    "subject_name": "Senator Jane Doe",
    "include_archives": true,
    "include_video": true
  }
}


company_profile

Corporate intelligence profile.

Inputs: | Parameter | Type | Default | Description | |-----------|------|---------|-------------| | company_name | string | required | Company name | | domain | string | null | Company domain | | include_news | bool | true | Include news |

Outputs: entities, executives, synthesis, report

Example:

{
  "template": "company_profile",
  "params": {
    "company_name": "Acme Corp",
    "domain": "acme.com"
  }
}


news_aggregation

Aggregate news from multiple sources.

Inputs: | Parameter | Type | Default | Description | |-----------|------|---------|-------------| | topic | string | required | News topic | | regions | string[] | ["us"] | Geographic regions | | days | int | 7 | Days to look back |

Outputs: articles, sources, synthesis

Example:

{
  "template": "news_aggregation",
  "params": {
    "topic": "AI legislation",
    "regions": ["us", "eu"],
    "days": 30
  }
}


temporal_analysis

Historical content analysis.

Inputs: | Parameter | Type | Default | Description | |-----------|------|---------|-------------| | url | string | required | URL to analyze | | start_date | string | "2020-01-01" | Start date | | end_date | string | now | End date |

Outputs: snapshots, changes, timeline, report

Example:

{
  "template": "temporal_analysis",
  "params": {
    "url": "https://example.com/policy",
    "start_date": "2018-01-01"
  }
}


source_comparison

Compare multiple sources on a topic.

Inputs: | Parameter | Type | Default | Description | |-----------|------|---------|-------------| | topic | string | required | Topic to compare | | sources | url[] | required | Source URLs |

Outputs: summaries, comparison, report

Example:

{
  "template": "source_comparison",
  "params": {
    "topic": "election coverage",
    "sources": [
      "https://source1.com/article",
      "https://source2.com/article",
      "https://source3.com/article"
    ]
  }
}


video_analysis

YouTube video research.

Inputs: | Parameter | Type | Default | Description | |-----------|------|---------|-------------| | query | string | required | Search query | | max_videos | int | 10 | Max videos | | channel | string | null | Specific channel |

Outputs: videos, transcripts, entities, synthesis

Example:

{
  "template": "video_analysis",
  "params": {
    "query": "AI safety interview",
    "max_videos": 20
  }
}


dark_web_monitor

Dark web monitoring.

Inputs: | Parameter | Type | Default | Description | |-----------|------|---------|-------------| | onion_urls | url[] | required | .onion URLs | | keywords | string[] | [] | Alert keywords |

Outputs: content, entities, alerts, screenshots

Example:

{
  "template": "dark_web_monitor",
  "params": {
    "onion_urls": ["http://example.onion"],
    "keywords": ["company name", "data leak"]
  }
}


iterative_crawl

Deep crawl with link following.

Inputs: | Parameter | Type | Default | Description | |-----------|------|---------|-------------| | seed_url | string | required | Starting URL | | max_depth | int | 3 | Crawl depth | | max_urls | int | 100 | Max total URLs | | same_domain | bool | true | Stay on domain |

Outputs: urls, content, synthesis

Example:

{
  "template": "iterative_crawl",
  "params": {
    "seed_url": "https://docs.example.com",
    "max_depth": 4,
    "max_urls": 200
  }
}

Creating Custom Templates

Template Structure

# templates/my_template.yaml
name: my_template
description: Custom research template
version: "1.0.0"

inputs:
  - name: param1
    type: string
    required: true
  - name: param2
    type: int
    default: 10

stages:
  - name: stage1
    sequential:
      - op: operation1
        # ...

outputs:
  - output1
  - output2

Register Template

from cbintel.graph import register_template

# From YAML file
register_template("templates/my_template.yaml")

# From string
register_template(yaml_content, name="my_template")

Template Best Practices

  1. Clear inputs - Document all parameters
  2. Sensible defaults - Minimize required inputs
  3. Useful outputs - Include synthesis and report
  4. Error handling - Handle common failures
  5. Reasonable limits - Default to safe values