ENF News Bot
Automated News Bot
- Joined
- Apr 15, 2022
- Messages
- 2,591
We've released the Agents SDK ↗︎, a package and set of tools that help you build and ship AI Agents.
You can get up and running with a chat-based AI Agent ↗︎ (and deploy it to Workers) that uses the Agents SDK, tool calling, and state syncing with a React-based front-end by running the following command:
You can also add an Agent to any existing Workers application by installing the
... and then define your first Agent:
Head over to the Agents documentation to learn more about the Agents SDK, the SDK APIs, as well as how to test and deploying agents to production.
Continue reading...
You can get up and running with a chat-based AI Agent ↗︎ (and deploy it to Workers) that uses the Agents SDK, tool calling, and state syncing with a React-based front-end by running the following command:
Code:
npm create cloudflare@latest agents-starter -- --template="cloudflare/agents-starter"
# open up README.md and follow the instructions
You can also add an Agent to any existing Workers application by installing the
agents package directlynpm i agents... and then define your first Agent:
Code:
import { Agent } from "agents";
export class YourAgent extends Agent<Env> {
// Build it out
// Access state on this.state or query the Agent's database via this.sql
// Handle WebSocket events with onConnect and onMessage
// Run tasks on a schedule with this.schedule
// Call AI models
// ... and/or call other Agents.
}
Head over to the Agents documentation to learn more about the Agents SDK, the SDK APIs, as well as how to test and deploying agents to production.
Continue reading...