Getting startedStep 45 min

4. Create your first agent

~5 minute read. An agent is chat that runs without you: multiple steps, real tools, and a memory.

Step 4: Open e.agent

Go to https://app.eworks.cloud/agents.

[Screenshot: Agent list with a Create agent button and a run history panel]

The e.agent dashboard

What is an agent?

Three things a chat message doesn't have:

  1. Multi-step workflow — an ordered set of tasks, each with its own prompt and model, where later steps consume earlier output.
  2. Tool invocation — the agent can search your knowledge, run a calculation, call an HTTP endpoint, or send an email. Every tool call is logged with its arguments.
  3. Memory — context carried between runs, so a daily agent knows what it said yesterday. Retained for 30 days by default.

Define a workflow

The visual builder writes this YAML for you; the YAML is what actually runs, and you can edit it directly.

yaml
name: docs-digest
description: Search the docs, summarize what changed, email the result.
trigger:
  type: schedule
  cron: "0 9 * * 1-5"      # weekdays at 09:00, workspace timezone
memory:
  enabled: true
  retention_days: 30
steps:
  - id: search
    tool: knowledge.search
    with:
      collection: product-docs
      query: "changes in the last 24 hours"
      limit: 20

  - id: summarize
    model: claude
    prompt: |
      Summarize the following documents into at most five bullet points.
      Call out anything that changes behavior for customers.
      {{ steps.search.results }}

  - id: notify
    tool: email.send
    with:
      to: alice@company.com
      subject: "Docs digest — {{ run.date }}"
      body: "{{ steps.summarize.output }}"

Create it in the UI

  1. Create agent.
  2. Name (docs-digest) and Description — both show up in the audit trail, so make them meaningful.
  3. Tools — tick what this agent may use: knowledge.search, calculator, email.send, http.request. Anything unticked is refused at runtime, even if the YAML asks for it.
  4. Steps — add them in the builder, or switch to the YAML tab and paste the above.
  5. Trigger — manual, schedule, webhook, or an event from e.gateway.
  6. Save.

Run and monitor

Hit Run now for a test run. The execution view shows each step live: input, output, tool calls, tokens, duration, and cost. Failed steps show the error and the exact payload that caused it, and you can re-run a single step without repeating the whole workflow.

bash
# Trigger a run from CI or a script
curl -X POST https://api.eworks.cloud/v1/agents/$AGENT_ID/runs \
  -H "Authorization: Bearer $ACCESS_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{"input": {"since": "24h"}}'
json
{ "run_id": "run_01J9C...", "status": "running", "started_at": "2026-09-08T09:00:02Z" }

Add a human-in-the-loop step before anything irreversible: the run pauses, the approver gets a notification, and it resumes only after someone approves — with their name attached in the audit trail.

Troubleshooting

"YAML syntax error." The editor points at the line. Nearly always indentation (spaces only, never tabs), or a {{ }} expression inside an unquoted string that starts with { — wrap the whole value in quotes.

"Tool not available." The tool isn't ticked on this agent, or your workspace hasn't enabled it (email.send needs a verified sending domain; http.request needs the host on the allowlist). Both are under Settings → Tools.

"Workflow timed out." Default limits are 5 minutes per step and 30 minutes per run. Usually it's an oversized search: lower limit, narrow the collection, or split one big summarize step into a map step and a reduce step.

Next: Audit trail and compliance