Applied AI

Core patterns

In practice I think about agentic systems as orchestrated workflows with explicit roles: who plans, who executes and who validates. This keeps complex behavior understandable.

  • Single agent with tools. A single capable agent that can call multiple tools is often the simplest place to start.
  • Planner–executor. One component breaks a request into steps, another executes those steps while checking against constraints.
  • Coordinator–worker. A coordinator routes tasks to specialized agents (network, security, cloud) and aggregates results.

When thinking about incentives and strategic behaviour between agents (and humans), I also borrow ideas from game theory and how repeated games shape cooperation.

Safety and guardrails

Agentic systems make it easy for models to act, which means boundaries and approvals become non-negotiable.

  • Isolation boundaries. Separate read-only tools from tools that change configuration or data. Use different credentials, networks and approval flows.
  • Policy enforcement. Before executing a tool call, check it against explicit policies (who is the user, what resource is touched, what change is proposed).
  • Human-in-the-loop. For high-impact actions, require explicit review and approval, ideally with a human-readable summary of what the agent intends to do.

Observability

Observability is what keeps multi-agent systems from becoming opaque. You should be able to answer: what did the agent see, decide and do?

  • Structured traces. Capture each step in a workflow with inputs, tool calls, outputs and timing.
  • Replayability. Make it possible to replay problematic sessions in a lower-risk environment to understand and improve behavior.
  • Metrics and alerts. Track error rates, task success and policy violation attempts; alert when they deviate from normal baselines.

Resources

Useful entry points into agentic systems and the libraries I use most often in practice.

  • LangChain — single-agent with tools. A batteries-included framework for building LLM applications that call tools, retrieve knowledge and maintain state.
    from langchain_openai import ChatOpenAI
    from langchain_core.messages import HumanMessage
    
    llm = ChatOpenAI(model="gpt-4.1-mini")
    
    messages = [
        HumanMessage(
            content="Summarize the top 3 risks of exposing an admin panel "
            "directly to the internet."
        )
    ]
    
    response = llm.invoke(messages)
    print(response.content)

    Start with the LangChain quickstart and the tutorial gallery for end-to-end examples.

  • LangGraph — multi-step and multi-agent flows. LangGraph lets you draw your agent workflow as a graph of nodes (planner, tools, reviewers) with clear control over state and retry logic.
    from langgraph.graph import StateGraph, END
    from typing import TypedDict
    
    
    class State(TypedDict):
        question: str
        answer: str
    
    
    def answer_node(state: State) -> State:
        # In a real app you would call an LLM here
        state["answer"] = f"Placeholder answer for: {state['question']}"
        return state
    
    
    graph = StateGraph(State)
    graph.add_node("answer", answer_node)
    graph.set_entry_point("answer")
    graph.set_finish_point("answer")
    
    app = graph.compile()
    result = app.invoke({"question": "How do I harden an SSH endpoint?"})
    print(result["answer"])

    See the LangGraph docs and tutorials for more realistic planner–executor and tool-calling graphs.

  • crewAI — collaborating specialists. crewAI focuses on teams of specialized agents that collaborate on a task (for example, a security analyst, scribe and advisor).
    from crewai import Agent, Task, Crew
    
    security_analyst = Agent(
        role="Security Analyst",
        goal="Review logs and highlight suspicious activity",
        backstory="You are an experienced SOC analyst.",
    )
    
    report_writer = Agent(
        role="Report Writer",
        goal="Turn findings into a concise executive summary",
        backstory="You write clear, non-technical status updates.",
    )
    
    task = Task(
        description="Analyze today's VPN logs and produce a short summary.",
        agents=[security_analyst, report_writer],
    )
    
    crew = Crew(agents=[security_analyst, report_writer], tasks=[task])
    result = crew.kickoff()
    print(result)

    The crewAI documentation and example repo show more complex patterns like role hand-offs and human approval steps.

  • Provider guidance and safety. For any framework, combine it with official design and safety guidance from major AI providers on tool use, data handling and approvals.

Domain Experts I follow

People and teams whose work on agents, tool use and AI systems I follow closely: