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.
You’ll need two things to run this project locally:
- Lamatic API Key → get it from your Lamatic account.
- lamatic-config.json payload → copy it from your Lamatic Studio project (this defines the orchestration flow).
⚠️ Note: Thelamatic-config.jsonin 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 |
Create .env with:
# Lamatic
LAMATIC_API_KEY=your_lamatic_keyCopy 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:
- 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 }
- 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 }
- 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"
}npm install
npm run dev
# Open http://localhost:3000/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
We welcome contributions! Open an issue or PR in this repo.
MIT License – see LICENSE.
