Skip to content
kdepsPublic

About

Serverless AI agents: Lambda-style AI agents on your own hardware. One workflow.yaml runs once per event, offline, as an API, a binary, an image, or an ISO.

Topics

Resources

Code of conduct

Contributing

Security policy

Stars

38 stars

Watchers

1 watching

Forks

Latest commit

 

History

3,659 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

kdeps

Build and Test Coverage Release Go License CodeQL Docs Documentation Registry GitHub stars

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.

  1. 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.
  2. Agents - a chat with loop: calls tools, as one step of the workflow.
  3. Deploy - ship the same YAML as an image, a binary, or an ISO, on your own infrastructure.

Install

brew install kdeps/tap/kdeps                                              # macOS or Linux
curl -LsSf https://raw.githubusercontent.com/kdeps/kdeps/main/install.sh | sh   # or the install script
irm https://raw.githubusercontent.com/kdeps/kdeps/main/install.ps1 | iex   # Windows PowerShell

See the installation guide for other options.

1. Workflows

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 :16395

kdeps 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.

2. Agents

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 call
kdeps new helper --template assistant && cd helper && kdeps

See the agent docs.

3. Deploy on your infrastructure

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 model

API 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.

Contributing

Read CONTRIBUTING.md. kdeps has the Apache 2.0 license.

About

Serverless AI agents: Lambda-style AI agents on your own hardware. One workflow.yaml runs once per event, offline, as an API, a binary, an image, or an ISO.

Topics

Resources

Code of conduct

Contributing

Security policy

Stars

38 stars

Watchers

1 watching

Forks

Releases

Packages

Used by

Contributors

Languages