> ## Documentation Index
> Fetch the complete documentation index at: https://docs.gulp.ai/llms.txt
> Use this file to discover all available pages before exploring further.

# Overview

> Osmosis Agent Improvement API

<Note>
  Welcome to the Osmosis API documentation. Our API helps you build smarter AI agents that learn and improve from experience.
</Note>

## Base URL

<CodeGroup>
  <Code title="API Endpoint">
    ```bash
    https://osmosis.gulp.dev
    ```
  </Code>
</CodeGroup>

## Authentication

<Info>
  All API requests require authentication using an API key in the `x-api-key` header.
</Info>

<CodeGroup>
  <Code title="Example Request">
    ```bash
    curl -H "x-api-key: your-api-key" https://osmosis.gulp.dev/enhance_task
    ```
  </Code>
</CodeGroup>

See our [Authentication Guide](/quickstart/authentication) for detailed instructions.

## API Endpoints

<CardGroup cols={1}>
  <Card title="Task Enhancement" icon="wand-magic-sparkles">
    ### [Enhance Task](/api-reference/enhance-task)

    `POST /enhance_task`

    Enriches tasks with relevant knowledge and context from past interactions. Perfect for:

    * Adding historical context to queries
    * Improving response accuracy
    * Learning from past successes
  </Card>

  <Card title="Knowledge Storage" icon="database">
    ### [Store Knowledge](/api-reference/store-knowledge)

    `POST /store_knowledge`

    Stores agent interactions and experiences for future reference. Use it to:

    * Record successful interactions
    * Build a knowledge base
    * Track agent performance
  </Card>

  <Card title="Data Management" icon="trash-can">
    ### [Delete by Intent](/api-reference/delete-by-intent)

    `POST /delete_by_intent`

    Manages your knowledge base by removing outdated or irrelevant entries. Features:

    * Intent-based deletion
    * Semantic matching
    * Bulk operations
  </Card>

  <Card title="Job Status" icon="clock">
    ### [Knowledge Status](/api-reference/knowledge-status)

    `GET /knowledge_status/{job_id}`

    Check the status of knowledge upload jobs. Features:

    * Real-time progress tracking
    * Job status monitoring
    * Error handling
  </Card>
</CardGroup>

## Response Codes

<ResponseField name="Success Codes" type="object">
  <Expandable title="2xx Success Codes">
    | Code | Description                                |
    | ---- | ------------------------------------------ |
    | 200  | Success - Request completed successfully   |
    | 202  | Accepted - Request accepted for processing |
  </Expandable>
</ResponseField>

<ResponseField name="Error Codes" type="object">
  <Expandable title="4xx Client Errors">
    | Code | Description                      |
    | ---- | -------------------------------- |
    | 400  | Bad Request - Invalid parameters |
    | 401  | Unauthorized - Invalid API key   |
  </Expandable>
</ResponseField>

<ResponseField name="Server Errors" type="object">
  <Expandable title="5xx Server Errors">
    | Code | Description           |
    | ---- | --------------------- |
    | 500  | Internal Server Error |
  </Expandable>
</ResponseField>

## Error Format

All API errors follow a consistent format:

<CodeGroup>
  <Code title="Error Response">
    ```json
    {
      "code": "error_type",
      "message": "Human-readable error message",
      "details": {
        "field": "specific_field",
        "reason": "detailed explanation"
      }
    }
    ```
  </Code>
</CodeGroup>

Common error codes:

<AccordionGroup>
  <Accordion title="Validation Errors" icon="triangle-exclamation">
    * `validation_error`: Request validation failed
    * `invalid_request`: Invalid request format or parameters
  </Accordion>

  <Accordion title="Authentication Errors" icon="lock">
    * `unauthorized`: Invalid or missing API key
  </Accordion>

  <Accordion title="Server Errors" icon="server">
    * `internal_error`: Internal server error
  </Accordion>
</AccordionGroup>

## Quick Links

<CardGroup cols={2}>
  <Card title="Getting Started" icon="rocket" href="/quickstart/authentication">
    Set up authentication and make your first API call
  </Card>

  <Card title="API Examples" icon="code" href="/api-reference/enhance-task">
    View detailed examples for each endpoint
  </Card>
</CardGroup>
