Skip to main content

What you’ll build

A web search tool that takes a query via HTTP, searches the web using Tavily, and returns formatted results. This is a minimal but complete use case that demonstrates the full lifecycle.

Prerequisites

  • codika CLI installed and authenticated (see Quickstart)
  • A Codika API key with deploy:use-case and workflows:trigger scopes

Step 1: Create the project

This creates project.json with your projectId and organizationId.

Step 2: Create version.json

version.json

Step 3: Create config.ts

config.ts

Step 4: Create the workflow

Create the workflows/ directory and the workflow JSON:
workflows/web-search.json

Step 5: Validate

Fix any issues:

Step 6: Deploy

Step 7: Test

Final folder structure

Key takeaways

  1. Every use case needs config.ts, version.json, and workflows/
  2. The config exports WORKFLOW_FILES and getConfiguration()
  3. Workflows follow the mandatory pattern: Trigger → Init → Logic → Submit/Error
  4. Credentials use placeholders (FLEXCRED, USERCRED, etc.)
  5. The CLI handles versioning, encoding, and API communication