Developer resources

Agent Plugin Package

Zero-boilerplate Lucidry integration for AI agent frameworks.

TypeScriptnpm install @lucidry/agent-plugin
Pythonpip install lucidry-agent-plugin

Quickstarts

The plugin loads your API key, opens the MCP connection, and binds all Lucidry tools to your framework.

LangChain (TypeScript)

typescript
import { getLucidryTools } from '@lucidry/agent-plugin';

// Tools auto-load from LUCIDRY_API_KEY env var
const tools = await getLucidryTools();

// Use with LangChain agent
import { AgentExecutor, createOpenAIToolsAgent } from 'langchain/agents';
const agent = createOpenAIToolsAgent({ tools, llm, prompt });
const executor = new AgentExecutor({ agent, tools });

LangChain (Python)

python
from lucidry_agent_plugin import get_lucidry_langchain_tools

# Tools auto-load from LUCIDRY_API_KEY env var
tools = get_lucidry_langchain_tools()

# Use with LangChain agent
from langchain.agents import AgentExecutor, create_openai_tools_agent
agent = create_openai_tools_agent(llm, tools, prompt)
executor = AgentExecutor(agent=agent, tools=tools)

LlamaIndex

python
from lucidry_agent_plugin import get_lucidry_llamaindex_tools

tools = get_lucidry_llamaindex_tools()

# Use with LlamaIndex agent
from llama_index.core.agent import ReActAgent
agent = ReActAgent.from_tools(tools, llm=llm)

CrewAI

python
from lucidry_agent_plugin import LucidryToolSet

toolset = LucidryToolSet()  # Auto-loads from env
tools = toolset.get_tools()

# Use with CrewAI
from crewai import Agent, Task, Crew
agent = Agent(tools=tools, ...)

Claude Desktop config generator

Generate a ready-to-paste Claude Desktop MCP config from an API key.

typescript
import { generateClaudeDesktopConfig } from '@lucidry/agent-plugin';

const config = generateClaudeDesktopConfig('sk_live_your_key');
// Returns ready-to-paste JSON for Claude Desktop config

Output

json
{
  "mcpServers": {
    "lucidry": {
      "url": "https://lucidry.io/api/mcp/sse",
      "headers": {
        "Authorization": "Bearer sk_live_your_key"
      }
    }
  }
}

Configuration

PluginOptions accepted by every entry point.

  • apiKey

    string

    Lucidry API key. Falls back to the LUCIDRY_API_KEY environment variable.

    Optional · default env: LUCIDRY_API_KEY

  • baseUrl

    string

    API base URL. Override only for a private deployment.

    Optional · default https://lucidry.io/api

  • timeoutMs

    number

    Per-request timeout in milliseconds.

    Optional · default 30000

  • enabledTools

    string[]

    Filter which Lucidry tools are exposed to the agent.

    Optional · default all 6 tools

Available tools

Six Lucidry tools are bound automatically.

  1. 1.lucidry_estimate

    Calculate price and time

    Full schemafor lucidry_estimate
  2. 2.lucidry_submit

    Submit document for processing

    Full schemafor lucidry_submit
  3. 3.lucidry_status

    Check job progress

    Full schemafor lucidry_status
  4. 4.lucidry_cancel

    Cancel running job

    Full schemafor lucidry_cancel
  5. 5.lucidry_get_artifact

    Get download links and quality data

    Full schemafor lucidry_get_artifact
  6. 6.lucidry_list_profiles

    List transform profiles

    Full schemafor lucidry_list_profiles

Error handling

Setup problems raise LucidryPluginError before any agent runs.

python
from lucidry_agent_plugin import LucidryPluginError

try:
    tools = get_lucidry_langchain_tools()
except LucidryPluginError as e:
    print(f"Setup error: {e}")
    # Example: "LUCIDRY_API_KEY environment variable is not set"

Debug mode

Debug mode writes MCP transport requests and responses to stderr.

bash
# Enable debug logging
export LUCIDRY_DEBUG=true