Your first agent
You can write an Ardent agent using TypeScript (or JavaScript, if you prefer). To build an agent, you’ll need to use the Ardent SDK. Here’s an example of a simple agent, which uses Anthropic’s Claude model and has a basic set of instructions:index.ts
For a full walkthrough of creating an agent, follow the quick start.
Adding capabilities
By itself, an agent doesn’t add much to the base model that it’s using. The real value of agents is unlocked by adding capabilities. Agents can have several kinds of capabilities:- Tools, custom executable functions that your agent can call
- Prompts, templates for prompting text generation models
- Workflows, a series of steps that the agent will follow, like a flowchart
How agents work
When you deploy an agent using the Ardent CLI, it bundles your code along with any libraries that you’re using, and uploads it to the Ardent platform. Your agent is combined with a wrapper library that provides access to platform service, and the resulting package is deployed as an HTTP server. Once deployed, the Ardent platform communicates with your agent via RPC. Although they are webservers, HTTP requests can’t be sent directly to agents — they can only be called by the Ardent platform. Agents are stateless. They make no guarantees about retaining state throughout their lifecycle, and the platform will automatically start and stop agents as needed. You can provide your agents with access to state scoped to the current Task by using the Database or KeyValueStore services.See also
- Agent in the SDK reference