Skip to content

Code-Fundi/dispersl-sdk

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

30 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Dispersl Multi-Agent SDK


Dispersl API SDKs

A comprehensive collection of production-grade SDKs for the Dispersl API Dispersl.

Flexible Workflow Automation with Plug-and-Play Agents. Dispersl helps you create flexible workflow automations powered by teams of AI, giving you intelligent and flexible automations with no-code workflows.


Overview

Production monorepo for official Dispersl SDKs:

  • typescript-sdk (Node.js 18+)
  • python-sdk (Python 3.9+)

This implementation follows DISPERSL_SDK_FULL IMPLEMENTATION.md and includes:

  • full support for the current production API surface,
  • robust timeout/retry and typed error mapping,
  • NDJSON streaming parser with split-buffer safety,
  • handover parsing and executor loop semantics,
  • MCP config loading + runtime custom tool registry,
  • CI/release workflows for both SDKs.

Current API Coverage

The SDKs currently target the updated API with these endpoint groups:

  • agent execution:

    • POST /agent/plan
    • POST /agent/completion
  • custom agent lifecycle:

    • GET /agents
    • POST /agents/create
    • POST /agents/edit/{id}
    • GET /agents/{id}
    • DELETE /agents/{id}

Customizable Agent Choices

Agent selection is runtime-configurable. The plan/executor flow does not assume fixed code/test/git/docs agents. You pass any compatible list in agent_choice / agentChoices, and handovers drive subsequent turns.

TypeScript:

import { AgenticExecutor, DisperslClient } from "@codefundi/dispersl-sdk";

const client = new DisperslClient({
  baseUrl: process.env.DISPERSL_API_URL ?? "https://api.dispersl.com/v1",
  apiKey: process.env.DISPERSL_API_KEY ?? ""
});

const executor = new AgenticExecutor(client);
await executor.runPlanAndAgentLoop({
  prompt: "Plan and execute migration",
  agentChoices: ["auto"]
});

Python:

from dispersl import AgenticExecutor, AsyncDisperslClient

client = AsyncDisperslClient(base_url="https://api.dispersl.com/v1", api_key="")
executor = AgenticExecutor(client)

result = await executor.run_plan_and_agent_loop(
    prompt="Plan and execute migration",
    agent_choices=["auto"],
)

Direct Completion Loop (Single Agent)

Both SDKs support direct looping against POST /agent/completion for a single agent by name_id until end_session.

TypeScript:

const out = await executor.runAgentCompletionLoop({
  nameId: "architect",
  prompt: "Review backend architecture and propose hardening steps",
});

Python:

out = await executor.run_agent_completion_loop(
    name_id="architect",
    prompt="Review backend architecture and propose hardening steps",
)

Repo Layout

dispersl-sdk/
├── API-DOCS.yaml
├── DISPERSL_SDK_FULL IMPLEMENTATION.md
├── .github/workflows/
│   ├── ci.yml
│   ├── release-typescript.yml
│   └── release-python.yml
├── scripts/
│   ├── verify.sh
│   └── release_check.sh
├── typescript-sdk/
│   ├── package.json
│   ├── README.md
│   ├── src/
│   ├── tests/
│   └── examples/
└── python-sdk/
    ├── pyproject.toml
    ├── README.md
    ├── src/dispersl/
    └── tests/

Local Verification

TypeScript:

cd typescript-sdk
pnpm install
pnpm run lint
pnpm run typecheck
pnpm run test -- --run
pnpm run build

Python:

cd python-sdk
python -m pip install -e ".[dev]"
python -m ruff check src tests
python -m ruff format --check src tests
python -m mypy src
python -m pytest -q
python -m build

Package Names

  • TypeScript: @codefundi/dispersl-sdk
  • Python: dispersl-sdk

About

Flexible Workflow Automation with Plug-and-Play Agents. Dispersl helps you create flexible workflow automations powered by teams of AI and MCP tools, giving you intelligent and flexible automations with no-code workflows.

Resources

License

Stars

Watchers

Forks

Packages

 
 
 

Contributors