> For the complete documentation index, see [llms.txt](https://jamiewen00.gitbook.io/ai-engineering-handbook/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://jamiewen00.gitbook.io/ai-engineering-handbook/building-ai-products/agentic-systems.md).

# Agentic Systems

> "Let's call these agentic systems with various degrees of autonomy instead of arguing if something is or isn't an agent" by Andrew Ng in LangChain Interrupt in May 2025

<mark style="background-color:purple;">Agentic Systems</mark> have three core capabilities and it actively generate queries, select tools, and retain information.

* **Retrieval**: Access external information
* **Tools**: Use services and APIs
* **Memory**: Remember across interactions

## LLM Calls vs Agents

**LLM Calls:** LLMs and tools follow predefined paths

* Predictable and consistent
* Best for defined tasks
* Lower risk

**Agents:** LLMs control their own processes

* Flexible decisions
* Higher autonomy
* More complex

## Agentic Patterns

See [Anthropic's guide](https://www.anthropic.com/engineering/building-effective-agents) for details.

* **Prompt Chaining:** Sequential steps. Each LLM processes previous outputs.
* **Routing:** Classify inputs. Direct to specialised tasks.
* **Parallelisation:** LLMs work simultaneously. Aggregate outputs.
* **Orchestrator-Workers:** Central LLM delegates to workers.
* **Evaluator-Optimiser:** One LLM generates. Another evaluates.

## Best Practices

### Tool is important

Tools need prompt engineering attention.

### Iterate

1. **Start Simple:** Single LLM calls with retrieval
2. **Test:** Measure performance
3. **Add Workflows:** When proven beneficial
4. **Consider Agents:** When simpler fails ‼️

### Agent Frameworks or Not?

* **Start Direct:** Use LLM APIs first
* **Understand Code:** Know what frameworks do
* **Reduce Layers:** Move to basic components
* **Keep Control:** Debug and modify freely

Build the <mark style="background-color:purple;">right system</mark> for your needs. Not the most sophisticated one.


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://jamiewen00.gitbook.io/ai-engineering-handbook/building-ai-products/agentic-systems.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
