Skip to content

Quick Start

Basic Usage

Python API

Python
1
2
3
4
5
6
7
8
from quantalogic import Agent

# Initialize the agent
agent = Agent(model_name="openai/gpt-4")

# Execute a task
result = agent.solve_task("Create a Python function that calculates the Fibonacci sequence")
print(result)

CLI Usage

Bash
1
2
3
4
5
6
7
# Basic task execution
quantalogic task "Create a Python script to analyze stock market trends"

# Specify model and mode
quantalogic --model-name "openrouter/deepseek/deepseek-chat" \
            --mode code \
            task "Develop a web scraping utility"

CLI Options

Option Description Example
--model-name Specify LLM (LiteLLM format) openrouter/deepseek/deepseek-chat
--mode Agent operation mode code, search, full
--max-iterations Task solving iterations 30 (default)
--verbose Enable detailed output

Example Scenarios

Code Generation

Bash
quantalogic task "Write a Flask API for a todo list app"

Web Search & Analysis

Bash
quantalogic --mode search task "Research latest AI trends in healthcare"