Skip to content

Latest commit

 

History

History
40 lines (25 loc) · 993 Bytes

File metadata and controls

40 lines (25 loc) · 993 Bytes

Document Agent

A simple example of a CLI Agent that can edit a document. Traced for Arize Phoenix.

Document Agent

Running

The document agent leverages Node.js 24 in order to execute without transpilation.

To run, just simply run the following command:

pnpm i
export OPENAI_API_KEY=your-openai-api-key
# running nodejs v23 or higher
pnpm start

Tracing

Every interaction with the agent will be traced and sent to Phoenix in one giant agent trace when the user exits the agent.

To start a temporary in-memory Phoenix tracing server, run the following command:

pnpm d:up

To delete the phoenix server, run the following command:

pnpm d:down

Viewing Traces

Traces can be viewed at http://localhost:6006/ in the project "document-agent".

Many interstitial spans will be produced while talking to the agent. A final root span will be produced when the user exits the agent.