mirror of
https://github.com/dograh-hq/dograh.git
synced 2026-06-22 08:38:13 +02:00
feat: refactor node spec and add mcp tools (#244)
* refactor: carve out extraction panel * refactor: create spec versions for node types * refactor: create a GenericNode and remove custom nodes * feat: add python and typescript sdk * add dograh sdk * fix: fetch draft workflow definition over published one * fix: fix routes of SDKs to use code gen * chore: remove doclink dependency to reduce image size * chore: format files * chore: bump pipecat * feat: let mcp fetch archived workflows on demand * chore: fix tests * feat: add sdk documentation * chore: change banner and add badge
This commit is contained in:
parent
0a61ef295f
commit
00a1a22b74
162 changed files with 14355 additions and 3554 deletions
75
docs/sdks/introduction.mdx
Normal file
75
docs/sdks/introduction.mdx
Normal file
|
|
@ -0,0 +1,75 @@
|
|||
---
|
||||
title: "Introduction"
|
||||
description: "Build and operate Dograh voice AI agents programmatically from Python or TypeScript"
|
||||
---
|
||||
|
||||
Dograh ships official SDKs for **Python** and **TypeScript** that wrap the Dograh REST API and the workflow builder. Use them to create or edit agents, place outbound calls, and inspect runs from your own code.
|
||||
|
||||
- **Python** — [`dograh-sdk`](https://pypi.org/project/dograh-sdk/) on PyPI
|
||||
- **TypeScript** — [`@dograh/sdk`](https://www.npmjs.com/package/@dograh/sdk) on npm
|
||||
|
||||
Both packages are generated from the same backend OpenAPI spec, so the method surface is equivalent — only the naming convention differs (`snake_case` in Python, `camelCase` in TypeScript).
|
||||
|
||||
## Install
|
||||
|
||||
<CodeGroup>
|
||||
```bash Python
|
||||
pip install dograh-sdk
|
||||
```
|
||||
```bash TypeScript
|
||||
npm install @dograh/sdk
|
||||
```
|
||||
</CodeGroup>
|
||||
|
||||
## Authenticate
|
||||
|
||||
Generate an API key at [`/api-keys`](https://app.dograh.com/api-keys) (or `http://localhost:3010/api-keys` for self-hosted). See [API Keys](/configurations/api-keys) for details.
|
||||
|
||||
Both SDKs read the API key from the `DOGRAH_API_KEY` environment variable by default, and the base URL from `DOGRAH_API_URL` (defaults to `http://localhost:8000`). You can also pass them explicitly.
|
||||
|
||||
<CodeGroup>
|
||||
```python Python
|
||||
from dograh_sdk import DograhClient
|
||||
|
||||
client = DograhClient(
|
||||
base_url="https://app.dograh.com",
|
||||
api_key="YOUR_API_KEY",
|
||||
)
|
||||
```
|
||||
```typescript TypeScript
|
||||
import { DograhClient } from "@dograh/sdk";
|
||||
|
||||
const client = new DograhClient({
|
||||
baseUrl: "https://app.dograh.com",
|
||||
apiKey: "YOUR_API_KEY",
|
||||
});
|
||||
```
|
||||
</CodeGroup>
|
||||
|
||||
<Note>
|
||||
For self-hosted deployments, swap `baseUrl` for your backend URL (e.g. `http://localhost:8000`).
|
||||
</Note>
|
||||
|
||||
## Quick tour
|
||||
|
||||
List the agents in your workspace:
|
||||
|
||||
<CodeGroup>
|
||||
```python Python
|
||||
workflows = client.list_workflows()
|
||||
for wf in workflows:
|
||||
print(wf.id, wf.name)
|
||||
```
|
||||
```typescript TypeScript
|
||||
const workflows = await client.listWorkflows();
|
||||
for (const wf of workflows) {
|
||||
console.log(wf.id, wf.name);
|
||||
}
|
||||
```
|
||||
</CodeGroup>
|
||||
|
||||
## Next steps
|
||||
|
||||
- [Build an agent](/sdks/build-an-agent) — assemble nodes and edges, save as a draft
|
||||
- [Place an outbound call](/sdks/outbound-calls) — trigger a call from an agent to a phone number
|
||||
- [MCP Server](/integrations/mcp) — let Claude and other coding agents drive the SDK for you
|
||||
Loading…
Add table
Add a link
Reference in a new issue