rust-soham/golem-claw/golem-add-http-endpoint-ts
- community
Checking that the SKILL.md file is still in the repository.
Exposing a TypeScript Golem agent over HTTP. Use when the user asks to add HTTP endpoints, mount an agent to a URL path, or expose agent methods as a REST API.
Install
npx vskill@latest install rust-soham/golem-claw/golem-add-http-endpoint-tsSKILL.md
Adding HTTP Endpoints to a TypeScript Golem Agent
Overview
Golem agents can be exposed over HTTP using code-first route definitions. This involves:
- Adding a
mountpath to the@agent()decorator - Annotating methods with
@endpoint() - Adding an
httpApideployment section togolem.yaml(load thegolem-configure-api-domainskill)
Related Skills
| Skill | When to Load | |
|---|---|---|
golem-http-params-ts | Path/query/header variable mapping, body mapping, supported types, response mapping | |
golem-make-http-request-ts | Making outgoing HTTP requests from agent code, especially when calling other Golem agent endpoints (required for correct JSON body formatting) | |
golem-add-http-auth-ts | Enabling authentication and receiving Principal | |
golem-add-cors-ts | Configuring CORS allowed origins | |
golem-configure-api-domain | Setting up httpApi in golem.yaml, security schemes, domain deployments |
Steps
- Add
mountto the@agent()decorator - Add
@endpoint()decorators to methods - Add
httpApideployment togolem.yaml(seegolem-configure-api-domainskill) - Build and deploy
Mount Path
The mount option on @agent() defines the base HTTP path. Path variables in {braces} map to constructor parameters:
Rules:
- Path must start with
/ - Every constructor parameter must appear as a
{variable}in the mount path (or be mapped via mount-levelheaders) - Every
{variable}must match a constructor parameter name - Catch-all
{*rest}variables are not allowed in mount paths
Endpoint Decorator
The @endpoint() decorator marks a method as an HTTP endpoint. Specify exactly one HTTP method (get, post, put, delete, or custom):
Endpoint paths are relative to the mount path. A method can have multiple @endpoint() decorators to expose it under different routes.
For details on how path variables, query parameters, headers, and request bodies map to method parameters, load the golem-http-params-ts skill.
Phantom Agents
Set phantom: true on the agent to create a new ephemeral agent instance for each HTTP request. This enables fully parallel request processing:
Return Type to HTTP Response Mapping
Golem maps method return types to HTTP status codes and response bodies according to the table below. This mapping is currently not configurable.
| Return Type | HTTP Status | Response Body | ||
|---|---|---|---|---|
void / no return | 204 No Content | empty | ||
T (any type) | 200 OK | JSON-serialized T | ||
| `T \ | undefined` | 200 OK if value, 404 Not Found if undefined | JSON T or empty | |
Result<T, E> | 200 OK if Ok, 500 Internal Server Error if Err | JSON T or JSON E | ||
Result<void, E> | 204 No Content if Ok, 500 if Err | empty or JSON E | ||
Result<T, void> | 200 OK if Ok, 500 if Err | JSON T or empty | ||
UnstructuredBinary | 200 OK | Raw binary with Content-Type |
Complete Example
Key Constraints
- A
mountpath is required on@agent()before any@endpoint()decorators can be used - All constructor parameters must be provided via mount path variables or header variables
- Path/query/header variable names must exactly match method parameter names
- Catch-all path variables
{*name}can only appear as the last path segment - The endpoint path must start with
/ - Exactly one HTTP method must be specified per
@endpoint()decorator
Security
- Security scanPassed, 90 of 100Pattern checks on the skill's files.
- Model reviewPassed
Quality evaluation
- Task evaluationNot runNo evaluation yet. Run one in Skill Studio.
Source
- SKILL.md in the repositoryCheckingpackages/golem/.agents/skills/golem-add-http-endpoint-ts/SKILL.md
Popularity
- 7-day trend score
- 0
Not refreshed yet.
Works with
Any agent vskill installs to: 56 targets in all. These 39 have a page on this site.
- Claude Code
- Cursor
- GitHub Copilot
- Windsurf
- Codex
- Gemini CLI
- Cline
- Amp
- Roo Code
- Goose
- Continue
- Kilo Code
- Junie
- Trae
- OpenHands
- Qwen Code
- AI Agent
- Tabnine Chat
- Sourcegraph Cody
- Amazon Q
- Firebase Genkit
- Sweep
- Devin
- Phind
- Mentat
- Claude Desktop
- Aider
- GPT Pilot
- Plandex
- bolt.new
- v0
- Replit Agent
- Anse
- TypingMind
- BetterChatGPT
- LibreChat
- Warp AI
- Pieces
- Fig AI
Embed badge
[](https://verified-skill.com/skills/rust-soham/golem-claw/golem-add-http-endpoint-ts)