Skip to content

Orchestrate multi-step agentic reasoning with Lamatic.ai – search, process, and generate structured answers through a plug-and-play flow.

License

Notifications You must be signed in to change notification settings

Lamatic/agentkit-reasoning

Repository files navigation

Agent Kit Reasoning by Lamatic.ai

Demo

Live Demo

Agent Kit Reasoning is an AI-powered reasoning system built with Lamatic.ai. It uses a multi-agent flow defined in Lamatic YAML to orchestrate search, reasoning, and structured answering, and exposes it through a modern Next.js frontend.

Deploy with Vercel

Deploy with Lamatic


🔑 Setup

Required Keys and Config

You’ll need two things to run this project locally:

  1. Lamatic API Key → get it from your Lamatic account.
  2. lamatic-config.json payload → copy it from your Lamatic Studio project (this defines the orchestration flow).
    ⚠️ Note: The lamatic-config.json in this repo is just a dummy example.
    Replace it with your own exported config from Lamatic Studio.
Item Purpose Where to Get It
Lamatic API Key Authentication for Lamatic AI APIs lamatic.ai
Lamatic Config Defines your agent orchestration flow From your Lamatic Studio Agent Kit Project

1. Environment Variables

Create .env with:

# Lamatic
LAMATIC_API_KEY=your_lamatic_key

2. Config File

Copy your project payload into lamatic-config.json in the repo root.
(Export this directly from your Lamatic Studio project and paste it into the file.)

Your config uses three flows that run sequentially:

Step 1 – Generate Steps

  • Name: Generate Steps
  • Workflow ID: your-flow1
  • Purpose: Generates high-level reasoning steps for the given query.
  • Input Schema: { query: string, history: array }
  • Output Schema: { steps: string }

Step 2 – Process Steps

  • Name: Process Steps
  • Workflow ID: your-flow2
  • Depends On: Step 1
  • Purpose: Transforms the generated steps into research queries and fetches supporting links.
  • Input Schema: { steps: string }
  • Output Schema: { result: string, links: array }

Step 3 – Final Writer

  • Name: Final Writer
  • Workflow ID: your-flow3
  • Depends On: Step 2
  • Purpose: Takes the query + research results and generates the final Markdown answer.
  • Input Schema: { query: string, research: array }
  • Output Schema: { answer: string }

⚙️ Finally, the api block in your config should look like this (replace with your actual project details):

"api": {
  "endpoint": "your-endpoint",
  "projectId": "your-project-id"
}

3. Install & Run

npm install
npm run dev
# Open http://localhost:3000

📂 Repo Structure

/actions
 └── orchestrate.ts        # Handles orchestration logic
/app
 └── page.tsx              # Main chat UI
/lib
 └── lamatic-client.ts     # Lamatic API client
/lamatic-config.json       # Lamatic flow configuration
/package.json              # Dependencies & scripts

🤝 Contributing

We welcome contributions! Open an issue or PR in this repo.


📜 License

MIT License – see LICENSE.

About

Orchestrate multi-step agentic reasoning with Lamatic.ai – search, process, and generate structured answers through a plug-and-play flow.

Topics

Resources

License

Stars

Watchers

Forks

Contributors 2

  •  
  •