Back to directory

AI Agent Contract Template with OpenAI

A minimal template for building an OpenAI-powered AI agent that compiles to a contract and deploys to Phala Network's decentralized, TEE-secured serverless cloud rather than a conventional FaaS provider.

AI Agent Contract Template with OpenAI

This template scaffolds an AI agent that uses the OpenAI API and packages it for deployment as an Agent Contract on Phala Network. Compiled agent code is published to IPFS and run inside Phala's Trusted Execution Environment workers, which the project positions as more private for API keys and user data than a conventional cloud function host, since execution is hardware-guarded and the deployment itself does not depend on a centralized provider staying up.

The workflow installs dependencies with npm, builds the agent, runs a local test against expected output, and publishes the compiled code to IPFS through a storage-provider-backed step; each publish records the resulting IPFS identifier and access URL in a local log file for later reference when configuring secrets.

It is intended as a starting point for developers building on Phala's decentralized hosting rather than a complete application.

More in Agent frameworks

See all 902
  • Recurse

    recurse.run

    A serverless harness that lets a coding agent design, test, and deploy its own specialist sub-agents as tools, MCP servers, or bots, defined by a schema-validated manifest.

  • ProofForge

    shulgin.is-a.dev

    An AI-agent pipeline that decomposes a mathematics problem, proves each piece, and formalizes the result in Lean 4 and Mathlib until the Lean kernel accepts it, with six of its proofs already merged into Google DeepMind's formal-conjectures repository.

  • local-coder

    github.com

    Builds a local coding-agent team on top of Ollama and OpenCode by detecting the machine's hardware, recommending models for seven specialist roles, and testing whether each assigned model can actually use tools, edit a repository and pass verification.