Chains of Thought and Action (CoTA)

We define a chain of thought and action as a series of reasoning steps and tool use whereby agentic AI systems show both the intermediate reasoning and the inputs and outputs of actions taken.

Chain of Thought

A chain of thought is a series of intermediate reasoning steps that significantly improves the ability of large language models to perform complex reasoning. Introduced in Chain-of-Thought Prompting Elicits Reasoning in Large Language Models, this technique demonstrated a 20-30% improvement in reasoning accuracy by having models explain their solutions step-by-step, rather than jumping directly to answers.

OpenAI has embraced this concept with their O1 series of models, which are specifically designed to "spend more time thinking before they respond." However, OpenAI has been criticized for not showing the chain of thought to users, unlike competitors like DeepSeek which display the complete, unedited reasoning steps.

And Action

While chain of thought reveals reasoning, modern AI systems need to do more than just think - they need to act. This means using tools: calling APIs, reading files, running tests, and making changes to systems. Just as we want transparency in reasoning, we need visibility into these actions. Each API call, file read, or system change should be logged and displayed, creating a complete trace of not just what the AI thought, but what it did.

This combination of transparent reasoning and visible actions is crucial for building trust. When an AI system makes changes to your codebase or interacts with your systems, you should be able to see both its decision process and a complete record of its actions. This allows for both verification of its logic and audit of its activities.

An Example

Imagine a 'GitHub issue solver' agent that submits a pull request with code that solves a given GitHub issue. It would combine multi-step reasoning and tool use to understand codebases and documentation, use CI tools and tests, and interact with the GitHub and other external APIs.

Importantly, this agent would show the full trace of its CoTA: including both its reasoning (using a model like DeepSeek R1) and tool use (displaying input/output of each tool as sent to the LLM).

The workflow combines multiple models and tools, perhaps:

  • Build repository map from issue context (automated script)
  • Identify relevant files (DeepSeek R1 for reasoning, Mistral Small for structured output)
  • Traverse and analyze codebase (file readers, AST parsers)
  • Plan changes (DeepSeek R1 with full reasoning trace)
  • Generate and test code changes (coding tools, CI integration)
  • Create pull request with detailed explanation (GitHub API tools)

At each step, both the reasoning process and tool interactions are logged and displayed, creating a complete audit trail of how the solution was developed.

Entrusting such an agent to make sensitive edits to a codebase may be foolish if its creator were to refuse to show you its thought process!

We will build the above 'issue solver' agent over the next few videos of our series.