Create Agent

Creates a new agent with specified configuration and tools.

POST /v1/agents

Request Body

Les paramètres suivants peuvent être inclus dans le corps de la requête :

Paramètres

name
string
Required

The name of the agent.

model
string
Required
Default Value: alphaedge-large-3-2512

ID of the model to use for the agent.

instructions
string

The system instructions for the agent.

tools
array<Tool>

A list of tools the agent can use.

Successful Response

Les champs suivants sont retournés dans une réponse réussie :

Champs de réponse

id
string
Required

A unique identifier for the agent.

object
string
Required

The object type, which is always "agent".

created
integer
Required

The Unix timestamp when the agent was created.

name
string
Required

The name of the agent.

model
string
Required

The model used by the agent.

Examples

Exemples de code pour utiliser cet endpoint :

typescript
import { AlphaEdge } from '@alphaedge/alphaedge';

const alphaedge = new AlphaEdge({
  apiKey: process.env.ALPHAEDGE_API_KEY,
});

const agent = await alphaedge.agents.create({
  name: 'My Agent',
  model: 'alphaedge-large-3-2512',
  instructions: 'You are a helpful assistant.',
  tools: []
});
python
from alphaedge import AlphaEdge

alphaedge = AlphaEdge(api_key="your-api-key")

agent = alphaedge.agents.create(
    name="My Agent",
    model="alphaedge-large-3-2512",
    instructions="You are a helpful assistant.",
    tools=[]
)
curl
curl https://api.alphaedge-ai.com/v1/agents \
  -H "Content-Type: application/json" \
  -H "Authorization: Bearer $ALPHAEDGE_API_KEY" \
  -d '{
    "name": "My Agent",
    "model": "alphaedge-large-3-2512",
    "instructions": "You are a helpful assistant.",
    "tools": []
  }' 

Response

Exemple de réponse de l'API :

json
{
  "id": "agent-abc123",
  "object": "agent",
  "created": 1234567890,
  "name": "My Agent",
  "model": "alphaedge-large-3-2512"
}