Skip to main content

Overview

The Kapso class is the main entry point for the framework. It provides methods for research, learning, evolving, and deploying solutions.

Constructor

Parameters

Examples

Methods

research()

Run deep web research for a query.

Parameters

Returns

ResearchFindings containing:
  • ideas: List of Source.Idea objects
  • implementations: List of Source.Implementation objects
  • report: Optional Source.ResearchReport (if mode includes study)

Example

learn()

Learn from knowledge sources.

Parameters

Returns

PipelineResult with:
  • sources_processed: Number of sources processed
  • total_pages_extracted: Pages extracted
  • created: New pages created
  • edited: Pages merged/edited with existing
  • errors: List of errors

Example

evolve()

Evolve a solution through experimentation.

Parameters

initial_repo Options

The initial_repo parameter accepts three types of values:

Returns

SolutionResult with:
  • goal: Original goal
  • code_path: Path to generated code
  • experiment_logs: List of experiment summaries
  • final_feedback: FeedbackResult with stop decision and score
  • metadata: Cost, iterations, final evaluation

Example

deploy()

Deploy a solution as running software.

Parameters

Returns

Software instance with:
  • run(inputs): Execute with inputs
  • stop(): Stop and cleanup
  • start(): Restart
  • is_healthy(): Health check
  • logs(): Get logs

Example

index_kg()

Index knowledge data into the KG.

Parameters

Returns

Path to created .index file.

Example

Data Classes

SolutionResult

FeedbackResult

Source Types

DeployStrategy

Exceptions

KGIndexError

Raised when KG index is invalid or backend data is missing.

Complete Example