# 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.
