Skip to content

computer-agents/functions-examples

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Computer Agents Functions Examples

Practical examples for Computer Agents Functions.

Functions are lightweight backend endpoints that export a default handler:

export default async function handler(request, context) {
  return Response.json({ ok: true });
}

Computer Agents wraps the handler in a managed HTTP runtime. The handler receives:

  • request: a standard Web Request
  • context.computerAgents: connected project resource metadata
  • context.env: runtime environment variables

When a Function needs connected databases, secrets, auth modules, or agent runtimes, import the runtime helpers from the official SDK:

import { getSecretValue } from 'computer-agents/runtime/server';

Each example that uses runtime helpers includes computer-agents in its package.json, so Computer Agents installs the SDK during deployment.

Examples

Example What it shows
hello-world The smallest deployable function.
database-contact-form Validate a form submission and write it into a connected Computer Agents database.
secure-webhook Verify a signed webhook with a secret stored in a connected Secrets vault.
agent-run-api Start a connected Agent Runtime from an API endpoint and return the run id.

Deploy

  1. Create or open a Computer Agents project.
  2. Create a Function resource.
  3. Upload one example folder as the function source.
  4. Connect the resources required by that example.
  5. Deploy the function.

Each example includes its own setup notes.

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors