Serverless AI agents: Lambda-style AI agents on your own hardware. One workflow.yaml runs once per event (an API call, a chat message, a webhook), offline, and ships as an API, a binary, an image, or an ISO.
- Workflows - a YAML pipeline. Each event starts one run: an API call, a file, a prompt, or a listener (Telegram, Slack, Discord, WhatsApp, a webhook, a websocket, a polled API). Connectors send the answer.
- Agents - a
chatwithloop:calls tools, as one step of the workflow. - Deploy - ship the same YAML as an image, a binary, or an ISO, on your own infrastructure.
brew install kdeps/tap/kdeps # macOS or Linux
curl -LsSf https://raw.githubusercontent.com/kdeps/kdeps/main/install.sh | sh # or the install scriptirm https://raw.githubusercontent.com/kdeps/kdeps/main/install.ps1 | iex # Windows PowerShellSee the installation guide for other options.
A workflow is a YAML pipeline. Its resources run in requires: order, and a check can return 400 before any model call.
# resources/llm.yaml
actionId: llm
validations:
check:
- get('q') != '' # 400 before any model call
chat:
model:
name: llama3.2:1b # local model, no API key
context:
prompt: "{{ get('q') }}"kdeps new my-agent && cd my-agent
export KDEPS_API_AUTH_TOKEN=dev-token # local testing only
kdeps run workflow.yaml # serve POST /api/v1/chat on :16395kdeps test . runs the evals: of the workflow.
A listener starts one run for each event, and a connector sends the answer. This is a Telegram bot:
# workflow.yaml
deploy:
input:
listen:
- listener: telegram_updates # one run per message; token from the vault# resources/reply.yaml
actionId: reply
flow:
requires: [llm]
component:
name: telegram_post # connector: one Bot API call
with:
path: sendMessage
body:
chat_id: "{{ input('message').chat.id }}"
text: "{{ get('llm').message.content }}"See the quickstart, listeners, connectors and the examples.
A chat with loop: calls tools over many rounds. It is one step of the workflow.
# resources/assistant.yaml
chat:
loop:
tools: [read_file, edit_file, bash_exec] # the tools the agent may callkdeps new helper --template assistant && cd helper && kdepsSee the agent docs.
Ship the same YAML as an image, Kubernetes manifests, an ISO, or one binary.
kdeps bundle build . # container image
kdeps bundle prepackage my-agent-1.0.0.kdeps --include-models # binary with the modelAPI keys go in an encrypted vault (kdeps secret set NAME), read with secret('NAME') and by connectors such as github_get and slack_post. The vault ships with the image; give it KDEPS_VAULT_PASSWORD at run time.
See deploy, secrets and LLM server.
Read CONTRIBUTING.md. kdeps has the Apache 2.0 license.