Here is the direct answer: this quickstart answers what is ai engineering in practice by building a small calculator agent, not by describing agents in general. It uses the LangGraph Graph API or the Functional API, and the working example is a calculator with tools for adding, multiplying and dividing.
Start with the choice the guide asks you to make: pick the Graph API path or the Functional API path, and pick the language path that matches the project, Python or TypeScript. If there is no preference, the guide defaults to the Graph API path. Treat the matching guide page as the source of truth for package names, model strings and code, rather than inventing a different agent pattern.
Set up credentials before building: the quickstart uses Anthropic by default, so check whether the Anthropic key variable is set. If it is not, create a key, set it in the shell or in an environment file, and stop for confirmation instead of inventing, hardcoding or committing a key. If another chat model provider is preferred, adapt after confirming from the integrations docs.
The Graph API version then follows a clear sequence. First, define tools and a model: a chat model with temperature set to zero, plus tool functions for the three arithmetic operations, bound to the model so it can call them. Second, define state: a message list that appends rather than replaces, plus a count of model calls that persists through execution.
Third, define a model node: the model decides whether to call a tool or not, and returns its message plus an updated call count. Fourth, define a tool node: it runs each requested tool call and returns the observations as tool messages. Fifth, add the end logic: a conditional edge that routes to the tool node when the last message contains a tool call, and ends otherwise.
Finally, build and compile: assemble the graph with a start edge into the model node, conditional edges from the model node, and a return edge from the tool node to the model node, then compile it and invoke it with a sample message such as adding two numbers. Print the final result so the run can be verified, and use tracing to debug it when it misbehaves.
Two scope rules close the guide: stay inside this quickstart and do not add deployment, evals or unrelated frameworks unless asked, and ask rather than guess when a secret, model choice or project convention is unclear. That discipline is the point: a production agent is a small, verifiable loop first, and a bigger system only after the loop works.
Next How ambient intelligence changes the work of AI agent developer jobs →
All Replies (0) #
Want a live back-and-forth? Join the global AI chat room — login to talk. No replies yet — be the first!